You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-commits@xmlgraphics.apache.org by vh...@apache.org on 2009/10/27 20:07:58 UTC

svn commit: r830293 [1/2] - in /xmlgraphics/fop/trunk: ./ src/documentation/content/xdocs/ src/documentation/content/xdocs/trunk/ src/java/META-INF/services/ src/java/org/apache/fop/accessibility/ src/java/org/apache/fop/apps/ src/java/org/apache/fop/a...

Author: vhennebert
Date: Tue Oct 27 19:07:52 2009
New Revision: 830293

URL: http://svn.apache.org/viewvc?rev=830293&view=rev
Log:
Merged back Temp_Accessibility branch into Trunk

Added:
    xmlgraphics/fop/trunk/src/documentation/content/xdocs/trunk/accessibility.xml
      - copied unchanged from r830281, xmlgraphics/fop/branches/Temp_Accessibility/src/documentation/content/xdocs/trunk/accessibility.xml
    xmlgraphics/fop/trunk/src/java/org/apache/fop/accessibility/
      - copied from r830281, xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/accessibility/
    xmlgraphics/fop/trunk/src/java/org/apache/fop/accessibility/Accessibility.java
      - copied unchanged from r830281, xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/accessibility/Accessibility.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/accessibility/AccessibilityEventProducer.java
      - copied unchanged from r830281, xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/accessibility/AccessibilityEventProducer.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/accessibility/AccessibilityEventProducer.xml
      - copied unchanged from r830281, xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/accessibility/AccessibilityEventProducer.xml
    xmlgraphics/fop/trunk/src/java/org/apache/fop/accessibility/AccessibilityPreprocessor.java
      - copied unchanged from r830281, xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/accessibility/AccessibilityPreprocessor.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/accessibility/StructureTree.java
      - copied unchanged from r830281, xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/accessibility/StructureTree.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/accessibility/StructureTreeBuilder.java
      - copied unchanged from r830281, xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/accessibility/StructureTreeBuilder.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/accessibility/addPtr.xsl
      - copied unchanged from r830281, xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/accessibility/addPtr.xsl
    xmlgraphics/fop/trunk/src/java/org/apache/fop/accessibility/reduceFOTree.xsl
      - copied unchanged from r830281, xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/accessibility/reduceFOTree.xsl
    xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/extensions/InternalElementMapping.java
      - copied unchanged from r830281, xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/fo/extensions/InternalElementMapping.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/properties/StructurePointerPropertySet.java
      - copied unchanged from r830281, xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/fo/properties/StructurePointerPropertySet.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/pdf/PDFParentTree.java
      - copied unchanged from r830281, xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/pdf/PDFParentTree.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/pdf/PDFStructElem.java
      - copied unchanged from r830281, xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/pdf/PDFStructElem.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/pdf/PDFStructTreeRoot.java
      - copied unchanged from r830281, xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/pdf/PDFStructTreeRoot.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/render/afp/AFPEventProducer.xml
      - copied unchanged from r830281, xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/render/afp/AFPEventProducer.xml
    xmlgraphics/fop/trunk/src/java/org/apache/fop/render/pdf/FOToPDFRoleMap.java
      - copied unchanged from r830281, xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/render/pdf/FOToPDFRoleMap.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/render/pdf/PDFLogicalStructureHandler.java
      - copied unchanged from r830281, xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/render/pdf/PDFLogicalStructureHandler.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/util/TransformerDefaultHandler.java
      - copied unchanged from r830281, xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/util/TransformerDefaultHandler.java
    xmlgraphics/fop/trunk/test/accessibility/
      - copied from r830281, xmlgraphics/fop/branches/Temp_Accessibility/test/accessibility/
    xmlgraphics/fop/trunk/test/accessibility/README
      - copied unchanged from r830281, xmlgraphics/fop/branches/Temp_Accessibility/test/accessibility/README
    xmlgraphics/fop/trunk/test/accessibility/background-image_jpg_repeat.fo
      - copied unchanged from r830281, xmlgraphics/fop/branches/Temp_Accessibility/test/accessibility/background-image_jpg_repeat.fo
    xmlgraphics/fop/trunk/test/accessibility/background-image_jpg_single.fo
      - copied unchanged from r830281, xmlgraphics/fop/branches/Temp_Accessibility/test/accessibility/background-image_jpg_single.fo
    xmlgraphics/fop/trunk/test/accessibility/background-image_png_repeat.fo
      - copied unchanged from r830281, xmlgraphics/fop/branches/Temp_Accessibility/test/accessibility/background-image_png_repeat.fo
    xmlgraphics/fop/trunk/test/accessibility/background-image_png_single.fo
      - copied unchanged from r830281, xmlgraphics/fop/branches/Temp_Accessibility/test/accessibility/background-image_png_single.fo
    xmlgraphics/fop/trunk/test/accessibility/background-image_svg_repeat.fo
      - copied unchanged from r830281, xmlgraphics/fop/branches/Temp_Accessibility/test/accessibility/background-image_svg_repeat.fo
    xmlgraphics/fop/trunk/test/accessibility/background-image_svg_single.fo
      - copied unchanged from r830281, xmlgraphics/fop/branches/Temp_Accessibility/test/accessibility/background-image_svg_single.fo
    xmlgraphics/fop/trunk/test/accessibility/complete.fo
      - copied unchanged from r830281, xmlgraphics/fop/branches/Temp_Accessibility/test/accessibility/complete.fo
    xmlgraphics/fop/trunk/test/accessibility/config-painter.xconf
      - copied unchanged from r830281, xmlgraphics/fop/branches/Temp_Accessibility/test/accessibility/config-painter.xconf
    xmlgraphics/fop/trunk/test/accessibility/config-renderer.xconf
      - copied unchanged from r830281, xmlgraphics/fop/branches/Temp_Accessibility/test/accessibility/config-renderer.xconf
    xmlgraphics/fop/trunk/test/accessibility/image_jpg.fo
      - copied unchanged from r830281, xmlgraphics/fop/branches/Temp_Accessibility/test/accessibility/image_jpg.fo
    xmlgraphics/fop/trunk/test/accessibility/image_png.fo
      - copied unchanged from r830281, xmlgraphics/fop/branches/Temp_Accessibility/test/accessibility/image_png.fo
    xmlgraphics/fop/trunk/test/accessibility/image_svg.fo
      - copied unchanged from r830281, xmlgraphics/fop/branches/Temp_Accessibility/test/accessibility/image_svg.fo
    xmlgraphics/fop/trunk/test/accessibility/image_wmf.fo
      - copied unchanged from r830281, xmlgraphics/fop/branches/Temp_Accessibility/test/accessibility/image_wmf.fo
    xmlgraphics/fop/trunk/test/accessibility/leader.fo
      - copied unchanged from r830281, xmlgraphics/fop/branches/Temp_Accessibility/test/accessibility/leader.fo
    xmlgraphics/fop/trunk/test/accessibility/links.fo
      - copied unchanged from r830281, xmlgraphics/fop/branches/Temp_Accessibility/test/accessibility/links.fo
    xmlgraphics/fop/trunk/test/accessibility/pdf/
      - copied from r830281, xmlgraphics/fop/branches/Temp_Accessibility/test/accessibility/pdf/
    xmlgraphics/fop/trunk/test/accessibility/pdf/background-image_jpg_repeat_painter_orig.pdf
      - copied unchanged from r830281, xmlgraphics/fop/branches/Temp_Accessibility/test/accessibility/pdf/background-image_jpg_repeat_painter_orig.pdf
    xmlgraphics/fop/trunk/test/accessibility/pdf/background-image_jpg_repeat_renderer_orig.pdf
      - copied unchanged from r830281, xmlgraphics/fop/branches/Temp_Accessibility/test/accessibility/pdf/background-image_jpg_repeat_renderer_orig.pdf
    xmlgraphics/fop/trunk/test/accessibility/pdf/background-image_jpg_single_painter_orig.pdf
      - copied unchanged from r830281, xmlgraphics/fop/branches/Temp_Accessibility/test/accessibility/pdf/background-image_jpg_single_painter_orig.pdf
    xmlgraphics/fop/trunk/test/accessibility/pdf/background-image_jpg_single_renderer_orig.pdf
      - copied unchanged from r830281, xmlgraphics/fop/branches/Temp_Accessibility/test/accessibility/pdf/background-image_jpg_single_renderer_orig.pdf
    xmlgraphics/fop/trunk/test/accessibility/pdf/background-image_png_repeat_painter_orig.pdf
      - copied unchanged from r830281, xmlgraphics/fop/branches/Temp_Accessibility/test/accessibility/pdf/background-image_png_repeat_painter_orig.pdf
    xmlgraphics/fop/trunk/test/accessibility/pdf/background-image_png_repeat_renderer_orig.pdf
      - copied unchanged from r830281, xmlgraphics/fop/branches/Temp_Accessibility/test/accessibility/pdf/background-image_png_repeat_renderer_orig.pdf
    xmlgraphics/fop/trunk/test/accessibility/pdf/background-image_png_single_painter_orig.pdf
      - copied unchanged from r830281, xmlgraphics/fop/branches/Temp_Accessibility/test/accessibility/pdf/background-image_png_single_painter_orig.pdf
    xmlgraphics/fop/trunk/test/accessibility/pdf/background-image_png_single_renderer_orig.pdf
      - copied unchanged from r830281, xmlgraphics/fop/branches/Temp_Accessibility/test/accessibility/pdf/background-image_png_single_renderer_orig.pdf
    xmlgraphics/fop/trunk/test/accessibility/pdf/background-image_svg_repeat_painter_orig.pdf
      - copied unchanged from r830281, xmlgraphics/fop/branches/Temp_Accessibility/test/accessibility/pdf/background-image_svg_repeat_painter_orig.pdf
    xmlgraphics/fop/trunk/test/accessibility/pdf/background-image_svg_repeat_renderer_orig.pdf
      - copied unchanged from r830281, xmlgraphics/fop/branches/Temp_Accessibility/test/accessibility/pdf/background-image_svg_repeat_renderer_orig.pdf
    xmlgraphics/fop/trunk/test/accessibility/pdf/background-image_svg_single_painter_orig.pdf
      - copied unchanged from r830281, xmlgraphics/fop/branches/Temp_Accessibility/test/accessibility/pdf/background-image_svg_single_painter_orig.pdf
    xmlgraphics/fop/trunk/test/accessibility/pdf/background-image_svg_single_renderer_orig.pdf
      - copied unchanged from r830281, xmlgraphics/fop/branches/Temp_Accessibility/test/accessibility/pdf/background-image_svg_single_renderer_orig.pdf
    xmlgraphics/fop/trunk/test/accessibility/pdf/complete_painter_orig.pdf
      - copied unchanged from r830281, xmlgraphics/fop/branches/Temp_Accessibility/test/accessibility/pdf/complete_painter_orig.pdf
    xmlgraphics/fop/trunk/test/accessibility/pdf/complete_renderer_orig.pdf
      - copied unchanged from r830281, xmlgraphics/fop/branches/Temp_Accessibility/test/accessibility/pdf/complete_renderer_orig.pdf
    xmlgraphics/fop/trunk/test/accessibility/pdf/image_jpg_painter_orig.pdf
      - copied unchanged from r830281, xmlgraphics/fop/branches/Temp_Accessibility/test/accessibility/pdf/image_jpg_painter_orig.pdf
    xmlgraphics/fop/trunk/test/accessibility/pdf/image_jpg_renderer_orig.pdf
      - copied unchanged from r830281, xmlgraphics/fop/branches/Temp_Accessibility/test/accessibility/pdf/image_jpg_renderer_orig.pdf
    xmlgraphics/fop/trunk/test/accessibility/pdf/image_png_painter_orig.pdf
      - copied unchanged from r830281, xmlgraphics/fop/branches/Temp_Accessibility/test/accessibility/pdf/image_png_painter_orig.pdf
    xmlgraphics/fop/trunk/test/accessibility/pdf/image_png_renderer_orig.pdf
      - copied unchanged from r830281, xmlgraphics/fop/branches/Temp_Accessibility/test/accessibility/pdf/image_png_renderer_orig.pdf
    xmlgraphics/fop/trunk/test/accessibility/pdf/image_svg_painter_orig.pdf
      - copied unchanged from r830281, xmlgraphics/fop/branches/Temp_Accessibility/test/accessibility/pdf/image_svg_painter_orig.pdf
    xmlgraphics/fop/trunk/test/accessibility/pdf/image_svg_renderer_orig.pdf
      - copied unchanged from r830281, xmlgraphics/fop/branches/Temp_Accessibility/test/accessibility/pdf/image_svg_renderer_orig.pdf
    xmlgraphics/fop/trunk/test/accessibility/pdf/image_wmf_painter_orig.pdf
      - copied unchanged from r830281, xmlgraphics/fop/branches/Temp_Accessibility/test/accessibility/pdf/image_wmf_painter_orig.pdf
    xmlgraphics/fop/trunk/test/accessibility/pdf/image_wmf_renderer_orig.pdf
      - copied unchanged from r830281, xmlgraphics/fop/branches/Temp_Accessibility/test/accessibility/pdf/image_wmf_renderer_orig.pdf
    xmlgraphics/fop/trunk/test/accessibility/pdf/leader_painter_orig.pdf
      - copied unchanged from r830281, xmlgraphics/fop/branches/Temp_Accessibility/test/accessibility/pdf/leader_painter_orig.pdf
    xmlgraphics/fop/trunk/test/accessibility/pdf/leader_renderer_orig.pdf
      - copied unchanged from r830281, xmlgraphics/fop/branches/Temp_Accessibility/test/accessibility/pdf/leader_renderer_orig.pdf
    xmlgraphics/fop/trunk/test/accessibility/pdf/links_painter_orig.pdf
      - copied unchanged from r830281, xmlgraphics/fop/branches/Temp_Accessibility/test/accessibility/pdf/links_painter_orig.pdf
    xmlgraphics/fop/trunk/test/accessibility/pdf/links_renderer_orig.pdf
      - copied unchanged from r830281, xmlgraphics/fop/branches/Temp_Accessibility/test/accessibility/pdf/links_renderer_orig.pdf
    xmlgraphics/fop/trunk/test/accessibility/pdf/text_1_painter_orig.pdf
      - copied unchanged from r830281, xmlgraphics/fop/branches/Temp_Accessibility/test/accessibility/pdf/text_1_painter_orig.pdf
    xmlgraphics/fop/trunk/test/accessibility/pdf/text_1_renderer_orig.pdf
      - copied unchanged from r830281, xmlgraphics/fop/branches/Temp_Accessibility/test/accessibility/pdf/text_1_renderer_orig.pdf
    xmlgraphics/fop/trunk/test/accessibility/pdf/text_2_painter_orig.pdf
      - copied unchanged from r830281, xmlgraphics/fop/branches/Temp_Accessibility/test/accessibility/pdf/text_2_painter_orig.pdf
    xmlgraphics/fop/trunk/test/accessibility/pdf/text_2_renderer_orig.pdf
      - copied unchanged from r830281, xmlgraphics/fop/branches/Temp_Accessibility/test/accessibility/pdf/text_2_renderer_orig.pdf
    xmlgraphics/fop/trunk/test/accessibility/pdf/text_font-embedding_painter_orig.pdf
      - copied unchanged from r830281, xmlgraphics/fop/branches/Temp_Accessibility/test/accessibility/pdf/text_font-embedding_painter_orig.pdf
    xmlgraphics/fop/trunk/test/accessibility/pdf/text_font-embedding_renderer_orig.pdf
      - copied unchanged from r830281, xmlgraphics/fop/branches/Temp_Accessibility/test/accessibility/pdf/text_font-embedding_renderer_orig.pdf
    xmlgraphics/fop/trunk/test/accessibility/text_1.fo
      - copied unchanged from r830281, xmlgraphics/fop/branches/Temp_Accessibility/test/accessibility/text_1.fo
    xmlgraphics/fop/trunk/test/accessibility/text_2.fo
      - copied unchanged from r830281, xmlgraphics/fop/branches/Temp_Accessibility/test/accessibility/text_2.fo
    xmlgraphics/fop/trunk/test/accessibility/text_font-embedding.fo
      - copied unchanged from r830281, xmlgraphics/fop/branches/Temp_Accessibility/test/accessibility/text_font-embedding.fo
    xmlgraphics/fop/trunk/test/resources/images/list-item.png
      - copied unchanged from r830281, xmlgraphics/fop/branches/Temp_Accessibility/test/resources/images/list-item.png
    xmlgraphics/fop/trunk/test/resources/images/rgb-circles.svg
      - copied unchanged from r830281, xmlgraphics/fop/branches/Temp_Accessibility/test/resources/images/rgb-circles.svg
Modified:
    xmlgraphics/fop/trunk/   (props changed)
    xmlgraphics/fop/trunk/build.xml
    xmlgraphics/fop/trunk/src/documentation/content/xdocs/site.xml
    xmlgraphics/fop/trunk/src/documentation/content/xdocs/trunk/pdfa.xml
    xmlgraphics/fop/trunk/src/java/META-INF/services/org.apache.fop.fo.ElementMapping
    xmlgraphics/fop/trunk/src/java/org/apache/fop/apps/FOUserAgent.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/apps/Fop.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/apps/FopFactory.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/apps/FopFactoryConfigurator.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/area/AreaTreeParser.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/area/Trait.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/cli/CommandLineOptions.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/events/EventFormatter.xml
    xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/Constants.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/FONode.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/FOPropertyMapping.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/FOValidationEventProducer.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/extensions/ExtensionElementMapping.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/extensions/ExternalDocument.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/AbstractGraphics.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/AbstractPageNumberCitation.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/Block.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/Character.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/Inline.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/PageNumber.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/table/TableFObj.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/BlockLayoutManager.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/TraitSetter.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/AbstractGraphicsLayoutManager.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/AbstractPageNumberCitationLayoutManager.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/BasicLinkLayoutManager.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/CharacterLayoutManager.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/PageNumberLayoutManager.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/TextLayoutManager.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/pdf/PDFAMode.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/pdf/PDFArray.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/pdf/PDFDocument.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/pdf/PDFFactory.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/pdf/PDFLink.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/pdf/PDFNumsArray.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/pdf/PDFPage.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/pdf/PDFProfile.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/pdf/PDFRoot.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/render/AbstractRendererConfigurator.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/render/intermediate/IFConstants.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/render/intermediate/IFContext.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/render/intermediate/IFParser.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/render/intermediate/IFRenderer.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/render/intermediate/IFSerializer.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/render/intermediate/extensions/AbstractAction.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/render/intermediate/extensions/DocumentNavigationHandler.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/render/pdf/PDFContentGenerator.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/render/pdf/PDFDocumentHandler.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/render/pdf/PDFDocumentNavigationHandler.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/render/pdf/PDFImageHandlerGraphics2D.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/render/pdf/PDFImageHandlerRawJPEG.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/render/pdf/PDFImageHandlerRenderedImage.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/render/pdf/PDFImageHandlerSVG.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/render/pdf/PDFPainter.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/render/pdf/PDFRenderer.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/render/pdf/PDFRenderingContext.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/render/pdf/PDFRenderingUtil.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/render/txt/TXTRenderer.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/render/xml/XMLRenderer.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/util/DOM2SAX.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/util/XMLUtil.java
    xmlgraphics/fop/trunk/src/sandbox/org/apache/fop/render/svg/SVGPainter.java
    xmlgraphics/fop/trunk/status.xml
    xmlgraphics/fop/trunk/test/java/org/apache/fop/render/pdf/PDFAConformanceTestCase.java
    xmlgraphics/fop/trunk/test/layoutengine/standard-testcases/foreign-attributes.xml
    xmlgraphics/fop/trunk/test/layoutengine/standard-testcases/page-sequence_language.xml

Propchange: xmlgraphics/fop/trunk/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Oct 27 19:07:52 2009
@@ -1,3 +1,4 @@
 /xmlgraphics/fop/branches/Temp_AFPGOCAResources:630874-721418
+/xmlgraphics/fop/branches/Temp_Accessibility:745924-830281
 /xmlgraphics/fop/branches/Temp_AreaTreeNewDesign:603620-746655
 /xmlgraphics/fop/branches/fop-0_95:684572,688085,688696

Modified: xmlgraphics/fop/trunk/build.xml
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/build.xml?rev=830293&r1=830292&r2=830293&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/build.xml (original)
+++ xmlgraphics/fop/trunk/build.xml Tue Oct 27 19:07:52 2009
@@ -365,9 +365,16 @@
         <include name="**/*.java"/>
         <exclude name="org/apache/fop/render/*/**/*.java"/>
         <exclude name="org/apache/fop/afp/**/*.java"/>
+        <exclude name="org/apache/fop/accessibility/**/*.java"/>
       </fileset>
     </eventResourceGenerator>
     <fixcrlf file="${src.java.dir}/org/apache/fop/events/EventFormatter.xml" tab="remove" tablength="2"/>
+    <eventResourceGenerator modelfile="${build.gensrc.dir}/org/apache/fop/accessibility/event-model.xml" translationfile="${src.java.dir}/org/apache/fop/accessibility/AccessibilityEventProducer.xml">
+      <fileset dir="${src.java.dir}">
+        <include name="org/apache/fop/accessibility/**/*.java"/>
+      </fileset>
+    </eventResourceGenerator>
+    <fixcrlf file="${src.java.dir}/org/apache/fop/afp/AFPEventProducer.xml" tab="remove" tablength="2"/>
     <eventResourceGenerator modelfile="${build.gensrc.dir}/org/apache/fop/afp/event-model.xml" translationfile="${src.java.dir}/org/apache/fop/afp/AFPEventProducer.xml">
       <fileset dir="${src.java.dir}">
         <include name="org/apache/fop/afp/**/*.java"/>

Modified: xmlgraphics/fop/trunk/src/documentation/content/xdocs/site.xml
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/documentation/content/xdocs/site.xml?rev=830293&r1=830292&r2=830293&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/documentation/content/xdocs/site.xml (original)
+++ xmlgraphics/fop/trunk/src/documentation/content/xdocs/site.xml Tue Oct 27 19:07:52 2009
@@ -159,6 +159,7 @@
       <extensions label="Extensions" href="extensions.html"/>
       <events label="Events" href="events.html"/>
       <metadata label="Metadata" href="metadata.html"/>
+      <accessibility label="Accessibility" href="accessibility.html"/>
     </features>
     
   </trunk>

Modified: xmlgraphics/fop/trunk/src/documentation/content/xdocs/trunk/pdfa.xml
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/documentation/content/xdocs/trunk/pdfa.xml?rev=830293&r1=830292&r2=830293&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/documentation/content/xdocs/trunk/pdfa.xml (original)
+++ xmlgraphics/fop/trunk/src/documentation/content/xdocs/trunk/pdfa.xml Tue Oct 27 19:07:52 2009
@@ -53,8 +53,9 @@
         lack of a full license to get a detailed error protocol.
       </p>
       <p>
-        <strong>PDF/A-1a</strong> is not implemented, yet. This is mostly because of the requirement
-        for tagged PDF which is not available in FOP, yet.
+        <strong>PDF/A-1a</strong> is based on PDF-A-1b and adds accessibility features
+        (such as Tagged PDF). This format is available within the limitation described on
+        the <a href="accessibility.html">Accessibility page</a>.
       </p>
     </section>
     <section id="command-line">
@@ -64,6 +65,9 @@
         as a parameter. If there is a violation of one of the validation rules for 
         PDF/A, an error message is presented and the processing stops.
       </p>
+      <p>
+        PDF/A-1a is enabled by specifying "-pdfprofile PDF/A-1a".
+      </p>
     </section>
     <section id="embedded">
       <title>Usage (embedded)</title>
@@ -80,6 +84,9 @@
         If one of the validation rules of PDF/A is violated, an PDFConformanceException
         (descendant of RuntimeException) is thrown.
       </p>
+      <p>
+        For PDF/A-1a, just use the string "PDF/A-1a" instead of "PDF/A-1b".
+      </p>
     </section>
     <section id="rules">
       <title>PDF/A in Action</title>
@@ -118,12 +125,17 @@
           embedded in clear text so non-PDF-aware applications can extract the XMP metadata.
         </li>
       </ul>
+      <note>
+        There are additional requirements if you want to enabled PDF/A-1a (Tagged PDF). This is
+        particularly the specification of the natural language and alternative descriptions for
+        images. Please refer to the <a href="accessibility.html">Accessibility page</a> for details.
+      </note> 
     </section>
     <section id="profile-compatibility">
       <title>PDF profile compatibility</title>
       <p>
-        The PDF profiles "PDF/X-3:2003" and "PDF/A-1b" are compatible and can both be 
-        activated at the same time.
+        The PDF profiles "PDF/X-3:2003" and "PDF/A-1b" (or "PDF/A-1a") are compatible and can
+        both be activated at the same time.
       </p>
     </section>
     <section id="interoperability">

Modified: xmlgraphics/fop/trunk/src/java/META-INF/services/org.apache.fop.fo.ElementMapping
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/META-INF/services/org.apache.fop.fo.ElementMapping?rev=830293&r1=830292&r2=830293&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/META-INF/services/org.apache.fop.fo.ElementMapping (original)
+++ xmlgraphics/fop/trunk/src/java/META-INF/services/org.apache.fop.fo.ElementMapping Tue Oct 27 19:07:52 2009
@@ -2,9 +2,10 @@
 org.apache.fop.fo.extensions.svg.SVGElementMapping
 org.apache.fop.fo.extensions.svg.BatikExtensionElementMapping
 org.apache.fop.fo.extensions.ExtensionElementMapping
+org.apache.fop.fo.extensions.InternalElementMapping
 org.apache.fop.fo.extensions.OldExtensionElementMapping
 org.apache.fop.fo.extensions.xmp.XMPElementMapping
 org.apache.fop.fo.extensions.xmp.RDFElementMapping
 org.apache.fop.render.ps.extensions.PSExtensionElementMapping
 org.apache.fop.render.afp.extensions.AFPElementMapping
-org.apache.fop.render.pcl.extensions.PCLElementMapping
\ No newline at end of file
+org.apache.fop.render.pcl.extensions.PCLElementMapping

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/apps/FOUserAgent.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/apps/FOUserAgent.java?rev=830293&r1=830292&r2=830293&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/apps/FOUserAgent.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/apps/FOUserAgent.java Tue Oct 27 19:07:52 2009
@@ -37,6 +37,8 @@
 import org.apache.xmlgraphics.image.loader.impl.AbstractImageSessionContext;
 
 import org.apache.fop.Version;
+import org.apache.fop.accessibility.Accessibility;
+import org.apache.fop.accessibility.StructureTree;
 import org.apache.fop.events.DefaultEventBroadcaster;
 import org.apache.fop.events.Event;
 import org.apache.fop.events.EventBroadcaster;
@@ -99,6 +101,8 @@
     private boolean conserveMemoryPolicy = false;
     private EventBroadcaster eventBroadcaster = new FOPEventBroadcaster();
 
+    private StructureTree structureTree;
+
     /** Producer:  Metadata element for the system/software that produces
      * the document. (Some renderers can store this in the document.)
      */
@@ -152,6 +156,7 @@
         this.factory = factory;
         setBaseURL(factory.getBaseURL());
         setTargetResolution(factory.getTargetResolution());
+        setAccessibility(factory.isAccessibilityEnabled());
     }
 
     /** @return the associated FopFactory instance */
@@ -196,6 +201,7 @@
         return rendererOverride;
     }
 
+
     /**
      * Sets an explicit FOEventHandler instance which overrides the one
      * defined by the render type setting.
@@ -642,5 +648,49 @@
         this.conserveMemoryPolicy = conserveMemoryPolicy;
     }
 
+    /**
+     * Activates accessibility (for output formats that support it).
+     *
+     * @param accessibility <code>true</code> to enable accessibility support
+     */
+    public void setAccessibility(boolean accessibility) {
+        if (accessibility) {
+            getRendererOptions().put(Accessibility.ACCESSIBILITY, Boolean.TRUE);
+        }
+    }
+
+    /**
+     * Check if accessibility is enabled.
+     * @return true if accessibility is enabled
+     */
+    public boolean isAccessibilityEnabled() {
+        Boolean enabled = (Boolean)this.getRendererOptions().get(Accessibility.ACCESSIBILITY);
+        if (enabled != null) {
+            return enabled.booleanValue();
+        } else {
+            return false;
+        }
+    }
+
+    /**
+     * Sets the document's structure tree, for use by accessible output formats.
+     *
+     * @param structureTree a simplified version of the FO tree, retaining only
+     * its logical structure
+     */
+    public void setStructureTree(StructureTree structureTree) {
+        this.structureTree = structureTree;
+    }
+
+    /**
+     * Returns the document's structure tree, for use by accessible output
+     * formats.
+     *
+     * @return a simplified version of the FO tree, retaining only its logical
+     * structure
+     */
+    public StructureTree getStructureTree() {
+        return this.structureTree;
+    }
 }
 

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/apps/Fop.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/apps/Fop.java?rev=830293&r1=830292&r2=830293&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/apps/Fop.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/apps/Fop.java Tue Oct 27 19:07:52 2009
@@ -24,6 +24,7 @@
 
 import org.xml.sax.helpers.DefaultHandler;
 
+import org.apache.fop.accessibility.Accessibility;
 import org.apache.fop.fo.FOTreeBuilder;
 
 /**
@@ -110,7 +111,11 @@
         if (foTreeBuilder == null) {
             createDefaultHandler();
         }
-        return this.foTreeBuilder;
+        if (this.foUserAgent.isAccessibilityEnabled()) {
+            return Accessibility.decorateDefaultHandler(this.foTreeBuilder, foUserAgent);
+        } else {
+            return this.foTreeBuilder;
+        }
     }
 
     /**

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/apps/FopFactory.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/apps/FopFactory.java?rev=830293&r1=830292&r2=830293&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/apps/FopFactory.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/apps/FopFactory.java Tue Oct 27 19:07:52 2009
@@ -100,6 +100,11 @@
      */
     private String base = null;
 
+    /**
+     *  Controls if accessibility is turned on or off
+     */
+    private boolean accessibility = false;
+
     /** The base URL for all hyphen URL resolutions. */
     private String hyphenBase = null;
 
@@ -185,6 +190,19 @@
     }
 
     /**
+     * Sets accessibility support.
+     *
+     * @param value <code>true</code> to enable accessibility, <code>false</code> otherwise
+     */
+    void setAccessibility(boolean value) {
+        this.accessibility = value;
+    }
+
+    boolean isAccessibilityEnabled() {
+        return accessibility;
+    }
+
+    /**
      * Returns a new {@link Fop} instance. FOP will be configured with a default user agent
      * instance.
      * <p>

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/apps/FopFactoryConfigurator.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/apps/FopFactoryConfigurator.java?rev=830293&r1=830292&r2=830293&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/apps/FopFactoryConfigurator.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/apps/FopFactoryConfigurator.java Tue Oct 27 19:07:52 2009
@@ -92,6 +92,15 @@
             log.debug("Initializing FopFactory Configuration");
         }
 
+        if (cfg.getChild("accessibility", false) != null) {
+            try {
+                this.factory.setAccessibility(
+                        cfg.getChild("accessibility").getValueAsBoolean());
+            } catch (ConfigurationException e) {
+                throw new FOPException(e);
+            }
+        }
+
         // strict configuration
         if (cfg.getChild("strict-configuration", false) != null) {
             try {

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/area/AreaTreeParser.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/area/AreaTreeParser.java?rev=830293&r1=830292&r2=830293&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/area/AreaTreeParser.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/area/AreaTreeParser.java Tue Oct 27 19:07:52 2009
@@ -39,8 +39,6 @@
 import javax.xml.transform.sax.SAXTransformerFactory;
 import javax.xml.transform.sax.TransformerHandler;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
 import org.w3c.dom.DOMImplementation;
 import org.w3c.dom.Document;
 import org.xml.sax.Attributes;
@@ -50,12 +48,17 @@
 import org.xml.sax.helpers.AttributesImpl;
 import org.xml.sax.helpers.DefaultHandler;
 
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
 import org.apache.xmlgraphics.image.loader.ImageException;
 import org.apache.xmlgraphics.image.loader.ImageInfo;
 import org.apache.xmlgraphics.image.loader.ImageManager;
 import org.apache.xmlgraphics.image.loader.ImageSessionContext;
 import org.apache.xmlgraphics.util.QName;
 
+import org.apache.fop.accessibility.AccessibilityEventProducer;
+import org.apache.fop.accessibility.StructureTreeBuilder;
 import org.apache.fop.apps.FOUserAgent;
 import org.apache.fop.area.Trait.Background;
 import org.apache.fop.area.Trait.InternalLink;
@@ -84,6 +87,8 @@
 import org.apache.fop.util.ContentHandlerFactoryRegistry;
 import org.apache.fop.util.ConversionUtils;
 import org.apache.fop.util.DefaultErrorListener;
+import org.apache.fop.util.DelegatingContentHandler;
+import org.apache.fop.util.XMLConstants;
 import org.apache.fop.util.XMLUtil;
 
 /**
@@ -156,6 +161,26 @@
         private Locator locator;
 
 
+        private StructureTreeBuilder structureTreeBuilder;
+
+        private ContentHandler structureTreeBuilderWrapper;
+
+        private Attributes pageSequenceAttributes;
+
+        private final class StructureTreeBuilderWrapper extends DelegatingContentHandler {
+
+            private StructureTreeBuilderWrapper()
+                    throws SAXException {
+                super(structureTreeBuilder.getHandlerForNextPageSequence());
+            }
+
+            public void endDocument() throws SAXException {
+                super.endDocument();
+                startAreaTreeElement("pageSequence", pageSequenceAttributes);
+                pageSequenceAttributes = null;
+            }
+        }
+
         public Handler(AreaTreeModel treeModel, FOUserAgent userAgent,
                 ElementMappingRegistry elementMappingRegistry) {
             this.treeModel = treeModel;
@@ -192,6 +217,11 @@
             makers.put("bookmarkTree", new BookmarkTreeMaker());
             makers.put("bookmark", new BookmarkMaker());
             makers.put("destination", new DestinationMaker());
+
+            if (userAgent.isAccessibilityEnabled()) {
+                structureTreeBuilder = new StructureTreeBuilder(tFactory);
+                userAgent.setStructureTree(structureTreeBuilder.getStructureTree());
+            }
         }
 
         private Area findAreaType(Class clazz) {
@@ -265,19 +295,35 @@
                 delegate.startDocument();
                 delegate.startElement(uri, localName, qName, attributes);
             } else {
-                lastAttributes = new AttributesImpl(attributes);
                 boolean handled = true;
                 if ("".equals(uri)) {
-                    Maker maker = (Maker)makers.get(localName);
-                    content.clear();
-                    ignoreCharacters = true;
-                    if (maker != null) {
-                        ignoreCharacters = maker.ignoreCharacters();
-                        maker.startElement(attributes);
-                    } else if ("extension-attachments".equals(localName)) {
-                        //TODO implement me
+                    if (localName.equals("pageSequence") && userAgent.isAccessibilityEnabled()) {
+                        structureTreeBuilderWrapper = new StructureTreeBuilderWrapper();
+                        pageSequenceAttributes = new AttributesImpl(attributes);
+                    } else if (localName.equals("structureTree")) {
+                        if (userAgent.isAccessibilityEnabled()) {
+                            delegate = structureTreeBuilderWrapper;
+                        } else {
+                            /* Delegate to a handler that does nothing */
+                            delegate = new DefaultHandler();
+                        }
+                        delegateStack.push(qName);
+                        delegate.startDocument();
+                        delegate.startElement(uri, localName, qName, attributes);
                     } else {
-                        handled = false;
+                        if (pageSequenceAttributes != null) {
+                            /*
+                             * This means that no structure-element tag was
+                             * found in the XML, otherwise a
+                             * StructureTreeBuilderWrapper object would have
+                             * been created, which would have reset the
+                             * pageSequenceAttributes field.
+                             */
+                            AccessibilityEventProducer.Provider
+                                    .get(userAgent.getEventBroadcaster())
+                                    .noStructureTreeInXML(this);
+                        }
+                        handled = startAreaTreeElement(localName, attributes);
                     }
                 } else {
                     ContentHandlerFactoryRegistry registry
@@ -304,6 +350,23 @@
             }
         }
 
+        private boolean startAreaTreeElement(String localName, Attributes attributes)
+                throws SAXException {
+            lastAttributes = new AttributesImpl(attributes);
+            Maker maker = (Maker)makers.get(localName);
+            content.clear();
+            ignoreCharacters = true;
+            if (maker != null) {
+                ignoreCharacters = maker.ignoreCharacters();
+                maker.startElement(attributes);
+            } else if ("extension-attachments".equals(localName)) {
+                //TODO implement me
+            } else {
+                return false;
+            }
+            return true;
+        }
+
         /** {@inheritDoc} */
         public void endElement(String uri, String localName, String qName) throws SAXException {
             if (delegate != null) {
@@ -700,6 +763,7 @@
                 setTraits(attributes, ip, SUBSET_BOX);
                 setTraits(attributes, ip, SUBSET_COLOR);
                 setTraits(attributes, ip, SUBSET_LINK);
+                setPtr(ip, attributes);
                 Area parent = (Area)areaStack.peek();
                 parent.addChildArea(ip);
                 areaStack.push(ip);
@@ -748,6 +812,7 @@
                         "tlsadjust", 0));
                 text.setTextWordSpaceAdjust(XMLUtil.getAttributeAsInt(attributes,
                         "twsadjust", 0));
+                setPtr(text, attributes);
                 Area parent = (Area)areaStack.peek();
                 parent.addChildArea(text);
                 areaStack.push(text);
@@ -840,6 +905,7 @@
                 viewport.setContentPosition(XMLUtil.getAttributeAsRectangle2D(attributes, "pos"));
                 viewport.setClip(XMLUtil.getAttributeAsBoolean(attributes, "clip", false));
                 viewport.setOffset(XMLUtil.getAttributeAsInt(attributes, "offset", 0));
+                setPtr(viewport, attributes);
                 Area parent = (Area)areaStack.peek();
                 parent.addChildArea(viewport);
                 areaStack.push(viewport);
@@ -858,6 +924,7 @@
                 transferForeignObjects(attributes, image);
                 setAreaAttributes(attributes, image);
                 setTraits(attributes, image, SUBSET_COMMON);
+                setPtr(image, attributes);
                 getCurrentViewport().setContent(image);
             }
         }
@@ -991,10 +1058,10 @@
                     ExtensionAttachment attachment = (ExtensionAttachment)obj;
                     ato.addExtensionAttachment(attachment);
                 } else {
-                    log.warn("Don't know how to handle externally generated object: " + obj);
-                }
+                log.warn("Don't know how to handle externally generated object: " + obj);
             }
         }
+        }
 
         private void setAreaAttributes(Attributes attributes, Area area) {
             area.setIPD(Integer.parseInt(attributes.getValue("ipd")));
@@ -1133,7 +1200,7 @@
             for (int i = 0, c = atts.getLength(); i < c; i++) {
                 String ns = atts.getURI(i);
                 if (ns.length() > 0) {
-                    if ("http://www.w3.org/2000/xmlns/".equals(ns)) {
+                    if (XMLConstants.XMLNS_NAMESPACE_URI.equals(ns)) {
                         continue;
                     }
                     QName qname = new QName(ns, atts.getQName(i));
@@ -1142,6 +1209,13 @@
             }
         }
 
+        private void setPtr(Area area, Attributes attributes) {
+            String ptr = attributes.getValue("ptr");
+            if (ptr != null) {
+                area.addTrait(Trait.PTR, ptr);
+            }
+        }
+
         /** {@inheritDoc} */
         public void characters(char[] ch, int start, int length) throws SAXException {
             if (delegate != null) {

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/area/Trait.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/area/Trait.java?rev=830293&r1=830292&r2=830293&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/area/Trait.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/area/Trait.java Tue Oct 27 19:07:52 2009
@@ -194,9 +194,12 @@
     public static final Integer OVERLINE_COLOR = new Integer(35);
     /** Trait for color of linethrough decorations when rendering inline parent. */
     public static final Integer LINETHROUGH_COLOR = new Integer(36);
+    
+    /** The ptr trait. Used for accessibility   */
+    public static final Integer PTR = new Integer(37);
 
     /** Maximum value used by trait keys */
-    public static final int MAX_TRAIT_KEY = 36;
+    public static final int MAX_TRAIT_KEY = 37;
 
     private static final TraitInfo[] TRAIT_INFO = new TraitInfo[MAX_TRAIT_KEY + 1];
 
@@ -225,6 +228,7 @@
     static {
         // Create a hashmap mapping trait code to name for external representation
         //put(ID_LINK, new TraitInfo("id-link", String.class));
+        put(PTR, new TraitInfo("ptr", String.class));
         put(INTERNAL_LINK, new TraitInfo("internal-link", InternalLink.class));
         put(EXTERNAL_LINK, new TraitInfo("external-link", ExternalLink.class));
         put(FONT,         new TraitInfo("font", FontTriplet.class));

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/cli/CommandLineOptions.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/cli/CommandLineOptions.java?rev=830293&r1=830292&r2=830293&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/cli/CommandLineOptions.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/cli/CommandLineOptions.java Tue Oct 27 19:07:52 2009
@@ -36,6 +36,7 @@
 import org.apache.commons.logging.LogFactory;
 
 import org.apache.fop.Version;
+import org.apache.fop.accessibility.Accessibility;
 import org.apache.fop.apps.FOPException;
 import org.apache.fop.apps.FOUserAgent;
 import org.apache.fop.apps.FopFactory;
@@ -342,6 +343,8 @@
                 i = i + parseAreaTreeOption(args, i);
             } else if (args[i].equals("-if")) {
                 i = i + parseIntermediateFormatOption(args, i);
+            } else if (args[i].equals("-a")) {
+                this.renderingOptions.put(Accessibility.ACCESSIBILITY, Boolean.TRUE);
             } else if (args[i].equals("-v")) {
                 /* Currently just print the version */
                 printVersion();
@@ -1155,6 +1158,7 @@
             + "  -nocopy           PDF file will be encrypted without copy content permission\n"
             + "  -noedit           PDF file will be encrypted without edit content permission\n"
             + "  -noannotations    PDF file will be encrypted without edit annotation permission\n"
+            + "  -a                enables accessibility features (Tagged PDF etc., default off)\n"
             + "  -pdfprofile prof  PDF file will be generated with the specified profile\n"
             + "                    (Examples for prof: PDF/A-1b or PDF/X-3:2003)\n\n"
             + "  -conserve         Enable memory-conservation policy (trades memory-consumption for disk I/O)\n"

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/events/EventFormatter.xml
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/events/EventFormatter.xml?rev=830293&r1=830292&r2=830293&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/events/EventFormatter.xml (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/events/EventFormatter.xml Tue Oct 27 19:07:52 2009
@@ -107,4 +107,5 @@
   <message key="org.apache.fop.fonts.FontEventAdapter.fontSubstituted">Font "{requested}" not found. Substituting with "{effective}".</message>
   <message key="org.apache.fop.fonts.FontEventAdapter.fontLoadingErrorAtAutoDetection">Unable to load font file: {fontURL}.[ Reason: {e}]</message>
   <message key="org.apache.fop.fonts.FontEventAdapter.glyphNotAvailable">Glyph "{ch}" (0x{ch,hex}[, {ch,glyph-name}]) not available in font "{fontName}".</message>
+  <message key="org.apache.fop.fo.FOValidationEventProducer.altTextMissing">Alternate text is missing on {foElement}.{{locator}}</message>
 </catalogue>

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/Constants.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/Constants.java?rev=830293&r1=830292&r2=830293&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/Constants.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/Constants.java Tue Oct 27 19:07:52 2009
@@ -771,8 +771,16 @@
      * multi-column layouts.
      */
     int PR_X_DISABLE_COLUMN_BALANCING = 273;
+    /** Property constant - FOP proprietary: FOP internal use for accessibility */
+    int PR_X_PTR = 274;
+    /**
+     * Property constant - FOP proprietary: alternative text for e-g and i-f-o.
+     * Used for accessibility.
+     */
+    int PR_X_ALT_TEXT = 275;
+
     /** Number of property constants defined */
-    int PROPERTY_COUNT = 273;
+    int PROPERTY_COUNT = 275;
 
     // compound property constants
 

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/FONode.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/FONode.java?rev=830293&r1=830292&r2=830293&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/FONode.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/FONode.java Tue Oct 27 19:07:52 2009
@@ -36,6 +36,7 @@
 import org.apache.fop.apps.FOUserAgent;
 import org.apache.fop.fo.extensions.ExtensionAttachment;
 import org.apache.fop.fo.extensions.ExtensionElementMapping;
+import org.apache.fop.fo.extensions.InternalElementMapping;
 import org.apache.fop.fo.extensions.svg.SVGElementMapping;
 import org.apache.fop.fo.pagination.Root;
 import org.apache.fop.util.CharUtilities;
@@ -415,6 +416,8 @@
             return "fo:" + localName;
         } else if (namespaceURI.equals(ExtensionElementMapping.URI)) {
             return "fox:" + localName;
+        } else if (namespaceURI.equals(InternalElementMapping.URI)) {
+            return "foi:" + localName;  // used FOP internally for accessibility
         } else if (namespaceURI.equals(SVGElementMapping.URI)) {
             return "svg:" + localName;
         } else {

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/FOPropertyMapping.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/FOPropertyMapping.java?rev=830293&r1=830292&r2=830293&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/FOPropertyMapping.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/FOPropertyMapping.java Tue Oct 27 19:07:52 2009
@@ -2515,6 +2515,18 @@
         m.setDefault("");
         addPropertyMaker("id", m);
 
+        // foi:ptr, used for accessibility
+        m = new StringProperty.Maker(PR_X_PTR);
+        m.setInherited(false);
+        m.setDefault("");
+        addPropertyMaker("foi:ptr", m);
+
+        // fox:alt-text, used for accessibility
+        m = new StringProperty.Maker(PR_X_ALT_TEXT);
+        m.setInherited(false);
+        m.setDefault("");
+        addPropertyMaker("fox:alt-text", m);
+
         // provisional-label-separation
         m  = new LengthProperty.Maker(PR_PROVISIONAL_LABEL_SEPARATION);
         m.setInherited(true);

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/FOValidationEventProducer.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/FOValidationEventProducer.java?rev=830293&r1=830292&r2=830293&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/FOValidationEventProducer.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/FOValidationEventProducer.java Tue Oct 27 19:07:52 2009
@@ -36,7 +36,9 @@
     /**
      * Provider class for the event producer.
      */
-    class Provider {
+    final class Provider {
+
+        private Provider() { }
 
         /**
          * Returns an event producer.
@@ -354,4 +356,13 @@
     void unknownFormattingObject(Object source, String elementName,
             QName offendingNode, Locator loc);
 
+    /**
+     * Alternate text is missing for a graphic element.
+     *
+     * @param source the event source
+     * @param foElement name of the element (external-graphic or instream-foreign-object)
+     * @param loc the location of the error or null
+     * @event.severity WARN
+     */
+    void altTextMissing(Object source, String foElement, Locator loc);
 }

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/extensions/ExtensionElementMapping.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/extensions/ExtensionElementMapping.java?rev=830293&r1=830292&r2=830293&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/extensions/ExtensionElementMapping.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/extensions/ExtensionElementMapping.java Tue Oct 27 19:07:52 2009
@@ -46,6 +46,8 @@
         propertyAttributes.add("orphan-content-limit");
         propertyAttributes.add("internal-destination");
         propertyAttributes.add("disable-column-balancing");
+        //These are FOP's extension properties for accessibility
+        propertyAttributes.add("alt-text");
     }
 
     /**

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/extensions/ExternalDocument.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/extensions/ExternalDocument.java?rev=830293&r1=830292&r2=830293&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/extensions/ExternalDocument.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/extensions/ExternalDocument.java Tue Oct 27 19:07:52 2009
@@ -31,7 +31,7 @@
 import org.apache.fop.fo.properties.LengthRangeProperty;
 
 /**
- * Class for the fox:external-document extenstion element.
+ * Class for the fox:external-document extension element.
  */
 public class ExternalDocument extends AbstractPageSequence implements GraphicsProperties {
 

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/AbstractGraphics.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/AbstractGraphics.java?rev=830293&r1=830292&r2=830293&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/AbstractGraphics.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/AbstractGraphics.java Tue Oct 27 19:07:52 2009
@@ -29,6 +29,7 @@
 import org.apache.fop.fo.properties.KeepProperty;
 import org.apache.fop.fo.properties.LengthRangeProperty;
 import org.apache.fop.fo.properties.SpaceProperty;
+import org.apache.fop.fo.properties.StructurePointerPropertySet;
 
 /**
  * Common base class for the <a href="http://www.w3.org/TR/xsl/#fo_instream-foreign-object">
@@ -36,7 +37,8 @@
  * and <a href="http://www.w3.org/TR/xsl/#fo_external-graphic">
  * <code>fo:external-graphic</code></a> flow formatting objects.
  */
-public abstract class AbstractGraphics extends FObj implements GraphicsProperties {
+public abstract class AbstractGraphics extends FObj
+        implements GraphicsProperties, StructurePointerPropertySet {
 
     // The value of properties relevant for fo:instream-foreign-object
     // and external-graphics.
@@ -60,6 +62,7 @@
     private int scaling;
     private int textAlign;
     private Length width;
+    private String ptr;   // used for accessibility
     // Unused but valid items, commented out for performance:
     //     private CommonAccessibility commonAccessibility;
     //     private CommonAural commonAural;
@@ -94,6 +97,7 @@
         dominantBaseline = pList.get(PR_DOMINANT_BASELINE).getEnum();
         height = pList.get(PR_HEIGHT).getLength();
         id = pList.get(PR_ID).getString();
+        ptr = pList.get(PR_X_PTR).getString();   // used for accessibility
         inlineProgressionDimension = pList.get(PR_INLINE_PROGRESSION_DIMENSION).getLengthRange();
         keepWithNext = pList.get(PR_KEEP_WITH_NEXT).getKeep();
         keepWithPrevious = pList.get(PR_KEEP_WITH_PREVIOUS).getKeep();
@@ -102,6 +106,12 @@
         scaling = pList.get(PR_SCALING).getEnum();
         textAlign = pList.get(PR_TEXT_ALIGN).getEnum();
         width = pList.get(PR_WIDTH).getLength();
+        if (getUserAgent().isAccessibilityEnabled()) {
+            String altText = pList.get(PR_X_ALT_TEXT).getString();
+            if (altText.equals("")) {
+                getFOValidationEventProducer().altTextMissing(this, getLocalName(), getLocator());
+            }
+        }
     }
 
     /**
@@ -207,6 +217,11 @@
         return keepWithPrevious;
     }
 
+    /** {@inheritDoc} */
+    public String getPtr() {
+        return ptr;
+    }
+
     /** @return the graphic's intrinsic width in millipoints */
     public abstract int getIntrinsicWidth();
 

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/AbstractPageNumberCitation.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/AbstractPageNumberCitation.java?rev=830293&r1=830292&r2=830293&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/AbstractPageNumberCitation.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/AbstractPageNumberCitation.java Tue Oct 27 19:07:52 2009
@@ -21,8 +21,8 @@
 
 import java.awt.Color;
 
-import org.xml.sax.Locator;
 import org.xml.sax.Attributes;
+import org.xml.sax.Locator;
 
 import org.apache.fop.apps.FOPException;
 import org.apache.fop.datatypes.Length;
@@ -35,6 +35,7 @@
 import org.apache.fop.fo.properties.CommonFont;
 import org.apache.fop.fo.properties.CommonTextDecoration;
 import org.apache.fop.fo.properties.SpaceProperty;
+import org.apache.fop.fo.properties.StructurePointerPropertySet;
 
 /**
  * Common base class for the <a href="http://www.w3.org/TR/xsl/#fo_page-number-citation">
@@ -42,7 +43,8 @@
  * <a href="http://www.w3.org/TR/xsl/#fo_page-number-citation-last">
  * <code>fo:page-number-citation-last</code></a> objects.
  */
-public abstract class AbstractPageNumberCitation extends FObj {
+public abstract class AbstractPageNumberCitation extends FObj
+            implements StructurePointerPropertySet {
 
     // The value of properties relevant for fo:page-number-citation(-last).
     private CommonBorderPaddingBackground commonBorderPaddingBackground;
@@ -51,6 +53,7 @@
     private int alignmentBaseline;
     private Length baselineShift;
     private int dominantBaseline;
+    private String ptr;  // used for accessibility
     // private ToBeImplementedProperty letterSpacing;
     private SpaceProperty lineHeight;
     private String refId;
@@ -96,6 +99,7 @@
         dominantBaseline = pList.get(PR_DOMINANT_BASELINE).getEnum();
         // letterSpacing = pList.get(PR_LETTER_SPACING);
         lineHeight = pList.get(PR_LINE_HEIGHT).getSpace();
+        ptr = pList.get(PR_X_PTR).getString();   // used for accessibility
         refId = pList.get(PR_REF_ID).getString();
         textDecoration = pList.getTextDecorationProps();
         // textShadow = pList.get(PR_TEXT_SHADOW);
@@ -138,6 +142,11 @@
         return textDecoration;
     }
 
+    /** {@inheritDoc} */
+    public String getPtr() {
+        return ptr;
+    }
+
     /** @return the "alignment-adjust" property */
     public Length getAlignmentAdjust() {
         return alignmentAdjust;

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/Block.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/Block.java?rev=830293&r1=830292&r2=830293&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/Block.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/Block.java Tue Oct 27 19:07:52 2009
@@ -21,6 +21,8 @@
 
 import java.awt.Color;
 
+import org.xml.sax.Locator;
+
 import org.apache.fop.apps.FOPException;
 import org.apache.fop.datatypes.Length;
 import org.apache.fop.datatypes.Numeric;
@@ -38,13 +40,13 @@
 import org.apache.fop.fo.properties.CommonRelativePosition;
 import org.apache.fop.fo.properties.KeepProperty;
 import org.apache.fop.fo.properties.SpaceProperty;
-import org.xml.sax.Locator;
+import org.apache.fop.fo.properties.StructurePointerPropertySet;
 
  /**
   * Class modelling the <a href="http://www.w3.org/TR/xsl/#fo_block">
   * <code>fo:block object</code></a>.
   */
-public class Block extends FObjMixed implements BreakPropertySet {
+public class Block extends FObjMixed implements BreakPropertySet, StructurePointerPropertySet {
 
     // used for FO validation
     private boolean blockOrInlineItemFound = false;
@@ -71,6 +73,7 @@
     private int lineHeightShiftAdjustment;
     private int lineStackingStrategy;
     private Numeric orphans;
+    private String ptr;  //used for accessibility
     private int whiteSpaceTreatment;
     private int span;
     private int textAlign;
@@ -122,6 +125,7 @@
         lineHeightShiftAdjustment = pList.get(PR_LINE_HEIGHT_SHIFT_ADJUSTMENT).getEnum();
         lineStackingStrategy = pList.get(PR_LINE_STACKING_STRATEGY).getEnum();
         orphans = pList.get(PR_ORPHANS).getNumeric();
+        ptr = pList.get(PR_X_PTR).getString();  //used for accessibility
         whiteSpaceTreatment = pList.get(PR_WHITE_SPACE_TREATMENT).getEnum();
         span = pList.get(PR_SPAN).getEnum();
         textAlign = pList.get(PR_TEXT_ALIGN).getEnum();
@@ -171,6 +175,11 @@
         return breakAfter;
     }
 
+    /** {@inheritDoc} */
+    public String getPtr() {
+        return ptr;
+    }
+
     /** @return the "break-before" property. */
     public int getBreakBefore() {
         return breakBefore;

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/Character.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/Character.java?rev=830293&r1=830292&r2=830293&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/Character.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/Character.java Tue Oct 27 19:07:52 2009
@@ -38,12 +38,13 @@
 import org.apache.fop.fo.properties.KeepProperty;
 import org.apache.fop.fo.properties.Property;
 import org.apache.fop.fo.properties.SpaceProperty;
+import org.apache.fop.fo.properties.StructurePointerPropertySet;
 
 /**
  * Class modelling the <a href="http://www.w3.org/TR/xsl/#fo_character">
  * <code>fo:character</code></a> object.
  */
-public class Character extends FObj {
+public class Character extends FObj implements StructurePointerPropertySet {
     // The value of properties relevant for fo:character.
     private CommonBorderPaddingBackground commonBorderPaddingBackground;
     private CommonFont commonFont;
@@ -62,6 +63,7 @@
     private CommonTextDecoration textDecoration;
     // private ToBeImplementedProperty textShadow;
     private Property wordSpacing;
+    private String ptr;  // used for accessibility
     // Unused but valid items, commented out for performance:
     //     private CommonAural commonAural;
     //     private CommonMarginInline commonMarginInline;
@@ -108,6 +110,7 @@
         lineHeight = pList.get(PR_LINE_HEIGHT).getSpace();
         textDecoration = pList.getTextDecorationProps();
         wordSpacing = pList.get(PR_WORD_SPACING);
+        ptr = pList.get(PR_X_PTR).getString();  // used for accessibility
     }
 
     /** {@inheritDoc} */
@@ -208,6 +211,11 @@
     }
 
     /** {@inheritDoc} */
+    public String getPtr() {
+        return ptr;
+    }
+
+    /** {@inheritDoc} */
     public String getLocalName() {
         return "character";
     }

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/Inline.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/Inline.java?rev=830293&r1=830292&r2=830293&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/Inline.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/Inline.java Tue Oct 27 19:07:52 2009
@@ -26,17 +26,19 @@
 import org.apache.fop.fo.FONode;
 import org.apache.fop.fo.PropertyList;
 import org.apache.fop.fo.ValidationException;
+import org.apache.fop.fo.properties.StructurePointerPropertySet;
 
 /**
  * Class modelling the <a href="http://www.w3.org/TR/xsl/#fo_inline">
  * <code>fo:inline</code></a> formatting object.
  */
-public class Inline extends InlineLevel {
+public class Inline extends InlineLevel implements StructurePointerPropertySet {
     // The value of properties relevant for fo:inline.
     // See also superclass InlineLevel
     private Length alignmentAdjust;
     private int alignmentBaseline;
     private Length baselineShift;
+    private String ptr;  // used for accessibility
     private int dominantBaseline;
     // Unused but valid items, commented out for performance:
     //     private CommonRelativePosition commonRelativePosition;
@@ -66,6 +68,7 @@
         alignmentBaseline = pList.get(PR_ALIGNMENT_BASELINE).getEnum();
         baselineShift = pList.get(PR_BASELINE_SHIFT).getLength();
         dominantBaseline = pList.get(PR_DOMINANT_BASELINE).getEnum();
+        ptr = pList.get(PR_X_PTR).getString(); // used for accessibility
     }
 
     /** {@inheritDoc} */
@@ -145,6 +148,11 @@
     }
 
     /** {@inheritDoc} */
+    public String getPtr() {
+        return ptr;
+    }
+
+    /** {@inheritDoc} */
     public String getLocalName() {
         return "inline";
     }

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/PageNumber.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/PageNumber.java?rev=830293&r1=830292&r2=830293&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/PageNumber.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/PageNumber.java Tue Oct 27 19:07:52 2009
@@ -34,12 +34,13 @@
 import org.apache.fop.fo.properties.CommonFont;
 import org.apache.fop.fo.properties.CommonTextDecoration;
 import org.apache.fop.fo.properties.SpaceProperty;
+import org.apache.fop.fo.properties.StructurePointerPropertySet;
 
 /**
  * Class modelling the <a href="http://www.w3.org/TR/xsl/#fo_page-number">
  * <code>fo:page-number</code></a> object.
  */
-public class PageNumber extends FObj {
+public class PageNumber extends FObj implements StructurePointerPropertySet {
     // The value of properties relevant for fo:page-number.
     private CommonBorderPaddingBackground commonBorderPaddingBackground;
     private CommonFont commonFont;
@@ -47,6 +48,7 @@
     private int alignmentBaseline;
     private Length baselineShift;
     private int dominantBaseline;
+    private String ptr; // used for accessibility
     // private ToBeImplementedProperty letterSpacing;
     private SpaceProperty lineHeight;
     /** Holds the text decoration values. May be null */
@@ -92,6 +94,7 @@
         // letterSpacing = pList.get(PR_LETTER_SPACING);
         lineHeight = pList.get(PR_LINE_HEIGHT).getSpace();
         textDecoration = pList.getTextDecorationProps();
+        ptr = pList.get(PR_X_PTR).getString(); // used for accessibility
         // textShadow = pList.get(PR_TEXT_SHADOW);
 
         // implicit properties
@@ -166,6 +169,11 @@
     }
 
     /** {@inheritDoc} */
+    public String getPtr() {
+        return ptr;
+    }
+
+    /** {@inheritDoc} */
     public String getLocalName() {
         return "page-number";
     }

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/table/TableFObj.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/table/TableFObj.java?rev=830293&r1=830292&r2=830293&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/table/TableFObj.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/table/TableFObj.java Tue Oct 27 19:07:52 2009
@@ -19,6 +19,9 @@
 
 package org.apache.fop.fo.flow.table;
 
+import org.xml.sax.Attributes;
+import org.xml.sax.Locator;
+
 import org.apache.fop.apps.FOPException;
 import org.apache.fop.datatypes.Numeric;
 import org.apache.fop.datatypes.ValidationPercentBaseContext;
@@ -33,19 +36,19 @@
 import org.apache.fop.fo.properties.NumberProperty;
 import org.apache.fop.fo.properties.Property;
 import org.apache.fop.fo.properties.PropertyMaker;
+import org.apache.fop.fo.properties.StructurePointerPropertySet;
 import org.apache.fop.layoutmgr.table.CollapsingBorderModel;
-import org.xml.sax.Locator;
-import org.xml.sax.Attributes;
 
 /**
  * Common base class for table-related FOs
  */
-public abstract class TableFObj extends FObj {
+public abstract class TableFObj extends FObj implements StructurePointerPropertySet {
 
     private Numeric borderAfterPrecedence;
     private Numeric borderBeforePrecedence;
     private Numeric borderEndPrecedence;
     private Numeric borderStartPrecedence;
+    private String ptr;
 
     ConditionalBorder borderBefore;
     ConditionalBorder borderAfter;
@@ -71,6 +74,7 @@
         borderBeforePrecedence = pList.get(PR_BORDER_BEFORE_PRECEDENCE).getNumeric();
         borderEndPrecedence = pList.get(PR_BORDER_END_PRECEDENCE).getNumeric();
         borderStartPrecedence = pList.get(PR_BORDER_START_PRECEDENCE).getNumeric();
+        ptr = pList.get(PR_X_PTR).getString();
         if (getNameId() != FO_TABLE //Separate check for fo:table in Table.java
                 && getNameId() != FO_TABLE_CELL
                 && getCommonBorderPaddingBackground().hasPadding(
@@ -235,6 +239,11 @@
         }
     }
 
+    /** {@inheritDoc} */
+    public String getPtr() {
+        return ptr;
+    }
+
     /**
      * Prepares the borders of this element if the collapsing-border model is in use.
      * Conflict resolution with parent elements is done where applicable.

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/BlockLayoutManager.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/BlockLayoutManager.java?rev=830293&r1=830292&r2=830293&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/BlockLayoutManager.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/BlockLayoutManager.java Tue Oct 27 19:07:52 2009
@@ -391,6 +391,7 @@
 
         addMarkersToPage(false, isFirst(firstPos), isLast(lastPos));
 
+        TraitSetter.addPtr(curBlockArea, getBlockFO().getPtr());  // used for accessibility
         TraitSetter.addSpaceBeforeAfter(curBlockArea, layoutContext.getSpaceAdjust(),
                 effSpaceBefore, effSpaceAfter);
         flush();

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/TraitSetter.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/TraitSetter.java?rev=830293&r1=830292&r2=830293&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/TraitSetter.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/TraitSetter.java Tue Oct 27 19:07:52 2009
@@ -584,6 +584,17 @@
     }
 
     /**
+     * Adds the ptr trait to the area.
+     * @param area the area to set the traits on
+     * @param ptr string
+     */
+    public static void addPtr(Area area, String ptr) {
+        if (ptr != null && ptr.length() > 0) {
+            area.addTrait(Trait.PTR, ptr);
+        }
+    }
+    
+    /**
      * Sets the producer's ID as a trait on the area. This can be used to track back the
      * generating FO node.
      * @param area the area to set the traits on

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/AbstractGraphicsLayoutManager.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/AbstractGraphicsLayoutManager.java?rev=830293&r1=830292&r2=830293&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/AbstractGraphicsLayoutManager.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/AbstractGraphicsLayoutManager.java Tue Oct 27 19:07:52 2009
@@ -85,6 +85,7 @@
         transferForeignAttributes(viewportArea);
 
         Viewport vp = new Viewport(viewportArea);
+        TraitSetter.addPtr(vp, fobj.getPtr());  // used for accessibility
         TraitSetter.setProducerID(vp, fobj.getId());
         vp.setIPD(imageLayout.getViewportSize().width);
         vp.setBPD(imageLayout.getViewportSize().height);

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/AbstractPageNumberCitationLayoutManager.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/AbstractPageNumberCitationLayoutManager.java?rev=830293&r1=830292&r2=830293&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/AbstractPageNumberCitationLayoutManager.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/AbstractPageNumberCitationLayoutManager.java Tue Oct 27 19:07:52 2009
@@ -138,6 +138,7 @@
         text.setBaselineOffset(font.getAscender());
         TraitSetter.addFontTraits(text, font);
         text.addTrait(Trait.COLOR, fobj.getColor());
+        TraitSetter.addPtr(text, fobj.getPtr());   // used for accessibility
         TraitSetter.addTextDecoration(text, fobj.getTextDecoration());
     }
 

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/BasicLinkLayoutManager.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/BasicLinkLayoutManager.java?rev=830293&r1=830292&r2=830293&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/BasicLinkLayoutManager.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/BasicLinkLayoutManager.java Tue Oct 27 19:07:52 2009
@@ -19,13 +19,14 @@
 
 package org.apache.fop.layoutmgr.inline;
 
+import org.apache.fop.area.LinkResolver;
+import org.apache.fop.area.Trait;
+import org.apache.fop.area.inline.InlineArea;
 import org.apache.fop.datatypes.URISpecification;
-import org.apache.fop.fo.flow.BasicLink;
 import org.apache.fop.fo.Constants;
+import org.apache.fop.fo.flow.BasicLink;
 import org.apache.fop.layoutmgr.PageSequenceLayoutManager;
-import org.apache.fop.area.inline.InlineArea;
-import org.apache.fop.area.Trait;
-import org.apache.fop.area.LinkResolver;
+import org.apache.fop.layoutmgr.TraitSetter;
 
 /**
  * LayoutManager for the fo:basic-link formatting object
@@ -56,6 +57,7 @@
     private void setupBasicLinkArea(InlineArea area) {
         BasicLink fobj = (BasicLink) this.fobj;
         // internal destinations take precedence:
+        TraitSetter.addPtr(area, fobj.getPtr()); // used for accessibility
         if (fobj.hasInternalDestination()) {
             String idref = fobj.getInternalDestination();
             PageSequenceLayoutManager pslm = getPSLM();

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/CharacterLayoutManager.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/CharacterLayoutManager.java?rev=830293&r1=830292&r2=830293&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/CharacterLayoutManager.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/CharacterLayoutManager.java Tue Oct 27 19:07:52 2009
@@ -86,6 +86,7 @@
         }
         TraitSetter.setProducerID(text, node.getId());
         TraitSetter.addTextDecoration(text, node.getTextDecoration());
+        TraitSetter.addPtr(text, node.getPtr()); // used for accessibility
         return text;
     }
 

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/PageNumberLayoutManager.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/PageNumberLayoutManager.java?rev=830293&r1=830292&r2=830293&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/PageNumberLayoutManager.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/PageNumberLayoutManager.java Tue Oct 27 19:07:52 2009
@@ -85,7 +85,7 @@
         text.setBaselineOffset(font.getAscender());
         TraitSetter.addFontTraits(text, font);
         text.addTrait(Trait.COLOR, fobj.getColor());
-
+        TraitSetter.addPtr(text, fobj.getPtr()); // used for accessibility
         TraitSetter.addTextDecoration(text, fobj.getTextDecoration());
 
         return text;

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/TextLayoutManager.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/TextLayoutManager.java?rev=830293&r1=830292&r2=830293&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/TextLayoutManager.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/TextLayoutManager.java Tue Oct 27 19:07:52 2009
@@ -25,10 +25,13 @@
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
+
 import org.apache.fop.area.Trait;
 import org.apache.fop.area.inline.TextArea;
 import org.apache.fop.fo.Constants;
 import org.apache.fop.fo.FOText;
+import org.apache.fop.fo.FObj;
+import org.apache.fop.fo.properties.StructurePointerPropertySet;
 import org.apache.fop.fonts.Font;
 import org.apache.fop.fonts.FontSelector;
 import org.apache.fop.layoutmgr.InlineKnuthSequence;
@@ -506,12 +509,26 @@
         }
         TraitSetter.addFontTraits(textArea, font);
         textArea.addTrait(Trait.COLOR, this.foText.getColor());
-
+        TraitSetter.addPtr(textArea, getPtr()); // used for accessibility
         TraitSetter.addTextDecoration(textArea, this.foText.getTextDecoration());
 
         return textArea;
     }
 
+    /**
+     * used for accessibility
+     * @return ptr of fobj
+     */
+    private String getPtr() {
+        FObj fobj = this.parentLM.getFObj();
+        if (fobj instanceof StructurePointerPropertySet) {
+            return (((StructurePointerPropertySet) fobj).getPtr());
+        } else {
+            //No structure pointer applicable
+            return null;
+        }
+    }
+
     private void addToLetterAdjust(final int index, final int width) {
         if (this.letterAdjustArray[index] == null) {
             this.letterAdjustArray[index] = new MinOptMax(width);

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/pdf/PDFAMode.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/pdf/PDFAMode.java?rev=830293&r1=830292&r2=830293&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/pdf/PDFAMode.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/pdf/PDFAMode.java Tue Oct 27 19:07:52 2009
@@ -44,7 +44,18 @@
         return this.name;
     }
 
-    /** @return true if this mode obey the restrictions established by PDF/A-1b. */
+    /**
+     * Indicates whether this mode obeys the restrictions established by PDF/A-1a.
+     * @return true if this mode obeys the restrictions established by PDF/A-1a.
+     */
+    public boolean isPDFA1LevelA() {
+        return (this != DISABLED);
+    }
+
+    /**
+     * Indicates whether this mode obeys the restrictions established by PDF/A-1b.
+     * @return true if this mode obeys the restrictions established by PDF/A-1b.
+     */
     public boolean isPDFA1LevelB() {
         return (this != DISABLED);
         //PDF/A-1a is a superset of PDF/A-1b!

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/pdf/PDFArray.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/pdf/PDFArray.java?rev=830293&r1=830292&r2=830293&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/pdf/PDFArray.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/pdf/PDFArray.java Tue Oct 27 19:07:52 2009
@@ -107,6 +107,15 @@
     }
 
     /**
+     * Indicates whether the given object exists in the array.
+     * @param obj the object to look for
+     * @return true if obj is contained
+     */
+    public boolean contains(Object obj) {
+        return this.values.contains(obj);
+    }
+
+    /**
      * Returns the length of the array
      * @return the length of the array
      */

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/pdf/PDFDocument.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/pdf/PDFDocument.java?rev=830293&r1=830292&r2=830293&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/pdf/PDFDocument.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/pdf/PDFDocument.java Tue Oct 27 19:07:52 2009
@@ -355,6 +355,25 @@
     }
 
     /**
+     * Makes sure a Lang entry has been set on the document catalog, setting it
+     * to a default value if necessary. When accessibility is enabled the
+     * language must be specified for any text element in the document.
+     */
+    public void enforceLanguageOnRoot() {
+        if (root.getLanguage() == null) {
+            String fallbackLanguage;
+            if (getProfile().getPDFAMode().isPDFA1LevelA()) {
+                //According to Annex B of ISO-19005-1:2005(E), section B.2
+                fallbackLanguage = "x-unknown";
+            } else {
+                //No language has been set on the first page-sequence, so fall back to "en".
+                fallbackLanguage = "en";
+            }
+            root.setLanguage(fallbackLanguage);
+        }
+    }
+
+    /**
      * Get the {@link PDFInfo} object for this document.
      *
      * @return the {@link PDFInfo} object

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/pdf/PDFFactory.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/pdf/PDFFactory.java?rev=830293&r1=830292&r2=830293&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/pdf/PDFFactory.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/pdf/PDFFactory.java Tue Oct 27 19:07:52 2009
@@ -185,6 +185,10 @@
     public PDFPage makePage(PDFResources resources, int pageIndex,
                             Rectangle2D mediaBox, Rectangle2D cropBox,
                             Rectangle2D bleedBox, Rectangle2D trimBox) {
+        /*
+         * create a PDFPage with the next object number, the given
+         * resources, contents and dimensions
+         */
         PDFPage page = new PDFPage(resources, pageIndex, mediaBox, cropBox, bleedBox, trimBox);
 
         getDocument().assignObjectNumber(page);
@@ -883,6 +887,35 @@
     }
 
     /**
+     * Creates and returns a StructTreeRoot object. Used for accessibility.
+     * @param parentTree the value of the ParenTree entry
+     * @return structure Tree Root element
+     */
+    public PDFStructTreeRoot makeStructTreeRoot(PDFParentTree parentTree) {
+        PDFStructTreeRoot structTreeRoot = new PDFStructTreeRoot(parentTree);
+        getDocument().assignObjectNumber(structTreeRoot);
+        getDocument().addTrailerObject(structTreeRoot);
+        getDocument().getRoot().setStructTreeRoot(structTreeRoot);
+        return structTreeRoot;
+    }
+
+    /**
+     * Creates and returns a StructElem object.
+     *
+     * @param structureType the structure type of the new element (value for the
+     * S entry)
+     * @param parent the parent of the new structure element in the structure
+     * hierarchy
+     * @return the newly created element
+     */
+    public PDFStructElem makeStructureElement(PDFName structureType, PDFObject parent) {
+        PDFStructElem structElem = new PDFStructElem(parent, structureType);
+        getDocument().assignObjectNumber(structElem);
+        getDocument().addTrailerObject(structElem);
+        return structElem;
+    }
+
+    /**
      * Make a the head object of the name dictionary (the /Dests object).
      *
      * @param destinationList a list of PDFDestination instances

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/pdf/PDFLink.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/pdf/PDFLink.java?rev=830293&r1=830292&r2=830293&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/pdf/PDFLink.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/pdf/PDFLink.java Tue Oct 27 19:07:52 2009
@@ -42,6 +42,7 @@
     private float bry;
     private String color;
     private PDFAction action;
+    private Integer structParent;
 
     /**
      * create objects associated with a link annotation (GoToR)
@@ -68,6 +69,16 @@
         this.action = action;
     }
 
+
+    /**
+     * Sets the value of the StructParent entry for this link.
+     *
+     * @param structParent key in the structure parent tree
+     */
+    public void setStructParent(int structParent) {
+        this.structParent = new Integer(structParent);
+    }
+
     /**
      * {@inheritDoc}
      */
@@ -87,6 +98,8 @@
                    + (brx) + " " + (bry) + " ]\n" + "/C [ "
                    + this.color + " ]\n" + "/Border [ 0 0 0 ]\n" + "/A "
                    + this.action.getAction() + "\n" + "/H /I\n"
+                   + (this.structParent != null
+                           ? "/StructParent " + this.structParent.toString() + "\n" : "")
                    + fFlag + "\n>>\nendobj\n";
         return s;
     }

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/pdf/PDFNumsArray.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/pdf/PDFNumsArray.java?rev=830293&r1=830292&r2=830293&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/pdf/PDFNumsArray.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/pdf/PDFNumsArray.java Tue Oct 27 19:07:52 2009
@@ -57,8 +57,26 @@
      * @param key the key of the value to set
      * @param obj the new value
      */
+    public void put(Integer key, Object obj) {
+        this.map.put(key, obj);
+    }
+
+    /**
+     * Sets an entry.
+     * @param key the key of the value to set
+     * @param obj the new value
+     */
     public void put(int key, Object obj) {
-        this.map.put(new Integer(key), obj);
+        put(new Integer(key), obj);
+    }
+
+    /**
+     * Gets an entry.
+     * @param key the key of requested value
+     * @return the requested value
+     */
+    public Object get(Integer key) {
+        return this.map.get(key);
     }
 
     /**
@@ -67,7 +85,7 @@
      * @return the requested value
      */
     public Object get(int key) {
-        return this.map.get(new Integer(key));
+        return get(new Integer(key));
     }
 
     /** {@inheritDoc} */



---------------------------------------------------------------------
To unsubscribe, e-mail: fop-commits-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-commits-help@xmlgraphics.apache.org