<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<title>fop-commits@xmlgraphics.apache.org Archives</title>
<link rel="self" href="http://mail-archives.apache.org/mod_mbox/xmlgraphics-fop-commits/?format=atom"/>
<link href="http://mail-archives.apache.org/mod_mbox/xmlgraphics-fop-commits/"/>
<id>http://mail-archives.apache.org/mod_mbox/xmlgraphics-fop-commits/</id>
<updated>2009-12-07T08:32:19Z</updated>
<entry>
<title>=?utf-8?q?=5BXmlgraphics-fop_Wiki=5D_Update_of_=22HowTo/XmlCommonsResolve?= =?utf-8?q?r=22_by_JackBates?=</title>
<author><name>Apache Wiki &lt;wikidiffs@apache.org&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/xmlgraphics-fop-commits/200912.mbox/%3c20091204233708.28739.62332@eos.apache.org%3e"/>
<id>urn:uuid:%3c20091204233708-28739-62332@eos-apache-org%3e</id>
<updated>2009-12-04T23:37:08Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Xmlgraphics-fop Wiki" for change notification.

The "HowTo/XmlCommonsResolver" page has been changed by JackBates.
http://wiki.apache.org/xmlgraphics-fop/HowTo/XmlCommonsResolver?action=diff&amp;rev1=9&amp;rev2=10

--------------------------------------------------

  
  {{{  $ ./fop -catalog -xml icaatom.html -xsl icaatom.xsl icaatom.pdf}}}
  
- The -catalog option specifically only works for the conversion from XML to output. (In such
a case FOP sets up the transformation from XML to FO useing XSLT, and in that setup the -catalog
option adds a catalog resolver.) Even with the -catalog option the catalog resolver is not
used for image retrieval. (Maybe it should, but it has not been thought of.)
+ The -catalog option specifically only works for the conversion from XML to output. (In such
a case FOP sets up the transformation from XML to FO using XSLT, and in that setup the -catalog
option adds a catalog resolver.) Even with the -catalog option the catalog resolver is not
used for image retrieval. (Maybe it should, but it has not been thought of.)
  
  Since the W3C started [http://www.w3.org/blog/systeam/2008/02/08/w3c_s_excessive_dtd_traffic
blocking abusive request patterns] for DTDs, it may be necessary to use local copies of these
DTDs instead. A good way to do this is with the catalog resolver. Errors like the following
may happen when you try using a DTD from the W3C's servers:
  

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



</pre>
</div>
</content>
</entry>
<entry>
<title>=?utf-8?q?=5BXmlgraphics-fop_Wiki=5D_Update_of_=22HowTo/XmlCommonsResolve?= =?utf-8?q?r=22_by_JackBates?=</title>
<author><name>Apache Wiki &lt;wikidiffs@apache.org&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/xmlgraphics-fop-commits/200912.mbox/%3c20091204233329.24418.479@eos.apache.org%3e"/>
<id>urn:uuid:%3c20091204233329-24418-479@eos-apache-org%3e</id>
<updated>2009-12-04T23:33:29Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Xmlgraphics-fop Wiki" for change notification.

The "HowTo/XmlCommonsResolver" page has been changed by JackBates.
http://wiki.apache.org/xmlgraphics-fop/HowTo/XmlCommonsResolver?action=diff&amp;rev1=8&amp;rev2=9

--------------------------------------------------

  
  XML Commons Resolver is [http://thread.gmane.org/gmane.text.xml.fop.user/29585 included
in OpenJDK 6], so if you're running OpenJDK 6 or later, it's already installed. In OpenJDK
6 the catalog resolver class name is, com.sun.org.apache.xml.internal.resolver.tools.CatalogResolver
  
- XML Commons Resolver may be included in Java 6 installations other than the one from Sun
- this should be checked.
+ XML Commons Resolver may also be included in Java 6 installations other than the one from
Sun - this should be checked.
  
  = The Example =
  

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



</pre>
</div>
</content>
</entry>
<entry>
<title>=?utf-8?q?=5BXmlgraphics-fop_Wiki=5D_Update_of_=22HowTo/XmlCommonsResolve?= =?utf-8?q?r=22_by_JackBates?=</title>
<author><name>Apache Wiki &lt;wikidiffs@apache.org&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/xmlgraphics-fop-commits/200912.mbox/%3c20091204233219.24417.80056@eos.apache.org%3e"/>
<id>urn:uuid:%3c20091204233219-24417-80056@eos-apache-org%3e</id>
<updated>2009-12-04T23:32:19Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Xmlgraphics-fop Wiki" for change notification.

The "HowTo/XmlCommonsResolver" page has been changed by JackBates.
http://wiki.apache.org/xmlgraphics-fop/HowTo/XmlCommonsResolver?action=diff&amp;rev1=7&amp;rev2=8

--------------------------------------------------

  
  The main website is at: http://xml.apache.org/commons/components/resolver/
  
- XML Commons Resolver is [http://thread.gmane.org/gmane.text.xml.fop.user/29585 included
in Java 6], so if you're running Java 6 or later, it's already installed. In Java 6 the catalog
resolver class name is, com.sun.org.apache.xml.internal.resolver.tools.CatalogResolver
+ XML Commons Resolver is [http://thread.gmane.org/gmane.text.xml.fop.user/29585 included
in OpenJDK 6], so if you're running OpenJDK 6 or later, it's already installed. In OpenJDK
6 the catalog resolver class name is, com.sun.org.apache.xml.internal.resolver.tools.CatalogResolver
+ 
+ XML Commons Resolver may be included in Java 6 installations other than the one from Sun
- this should be checked.
  
  = The Example =
  
@@ -33, +35 @@

  
   * Run the ExampleFO2PDF!WithResolver class.
  
+ = Notes =
+ 
+ You will recognize that the FO file is specified through a "URN", too, not just the image
referenced in the FO file. This is simply to make it easier for you to set up the demo. The
FO file itself will be loaded directly from the Web.
+ 
  = Command line option =
  
  Simon Pepping [http://thread.gmane.org/gmane.text.xml.fop.user/29585 added a -catalog option]
in [http://svn.apache.org/viewvc?view=revision&amp;revision=825875 revision 825875]. With
this option you can render XML with the FOP command and use the catalog resolver:
  
  {{{  $ ./fop -catalog -xml icaatom.html -xsl icaatom.xsl icaatom.pdf}}}
  
+ The -catalog option specifically only works for the conversion from XML to output. (In such
a case FOP sets up the transformation from XML to FO useing XSLT, and in that setup the -catalog
option adds a catalog resolver.) Even with the -catalog option the catalog resolver is not
used for image retrieval. (Maybe it should, but it has not been thought of.)
- = Notes =
- 
- You will recognize that the FO file is specified through a "URN", too, not just the image
referenced in the FO file. This is simply to make it easier for you to set up the demo. The
FO file itself will be loaded directly from the Web.
  
  Since the W3C started [http://www.w3.org/blog/systeam/2008/02/08/w3c_s_excessive_dtd_traffic
blocking abusive request patterns] for DTDs, it may be necessary to use local copies of these
DTDs instead. A good way to do this is with the catalog resolver. Errors like the following
may happen when you try using a DTD from the W3C's servers:
  

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



</pre>
</div>
</content>
</entry>
<entry>
<title>=?utf-8?q?=5BXmlgraphics-fop_Wiki=5D_Update_of_=22HowTo/XmlCommonsResolve?= =?utf-8?q?r=22_by_JackBates?=</title>
<author><name>Apache Wiki &lt;wikidiffs@apache.org&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/xmlgraphics-fop-commits/200912.mbox/%3c20091203195349.17335.97637@eos.apache.org%3e"/>
<id>urn:uuid:%3c20091203195349-17335-97637@eos-apache-org%3e</id>
<updated>2009-12-03T19:53:49Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Xmlgraphics-fop Wiki" for change notification.

The "HowTo/XmlCommonsResolver" page has been changed by JackBates.
http://wiki.apache.org/xmlgraphics-fop/HowTo/XmlCommonsResolver?action=diff&amp;rev1=6&amp;rev2=7

--------------------------------------------------

  You can download it at: http://xml.apache.org/mirrors.cgi
  
  The main website is at: http://xml.apache.org/commons/components/resolver/
+ 
+ XML Commons Resolver is [http://thread.gmane.org/gmane.text.xml.fop.user/29585 included
in Java 6], so if you're running Java 6 or later, it's already installed. In Java 6 the catalog
resolver class name is, com.sun.org.apache.xml.internal.resolver.tools.CatalogResolver
  
  = The Example =
  
@@ -31, +33 @@

  
   * Run the ExampleFO2PDF!WithResolver class.
  
+ = Command line option =
+ 
+ Simon Pepping [http://thread.gmane.org/gmane.text.xml.fop.user/29585 added a -catalog option]
in [http://svn.apache.org/viewvc?view=revision&amp;revision=825875 revision 825875]. With
this option you can render XML with the FOP command and use the catalog resolver:
+ 
+ {{{  $ ./fop -catalog -xml icaatom.html -xsl icaatom.xsl icaatom.pdf}}}
+ 
  = Notes =
  
  You will recognize that the FO file is specified through a "URN", too, not just the image
referenced in the FO file. This is simply to make it easier for you to set up the demo. The
FO file itself will be loaded directly from the Web.
  
+ Since the W3C started [http://www.w3.org/blog/systeam/2008/02/08/w3c_s_excessive_dtd_traffic
blocking abusive request patterns] for DTDs, it may be necessary to use local copies of these
DTDs instead. A good way to do this is with the catalog resolver. Errors like the following
may happen when you try using a DTD from the W3C's servers:
+ 
+ {{{
+ java.io.IOException: Server returned HTTP response code: 503 for URL: http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd
+ }}}
+ 

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



</pre>
</div>
</content>
</entry>
<entry>
<title>svn commit: r884526 - in /xmlgraphics/fop/trunk: src/java/org/apache/fop/afp/modca/TagLogicalElement.java status.xml</title>
<author><name>cbowditch@apache.org</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/xmlgraphics-fop-commits/200911.mbox/%3c20091126112313.9D88B23888D6@eris.apache.org%3e"/>
<id>urn:uuid:%3c20091126112313-9D88B23888D6@eris-apache-org%3e</id>
<updated>2009-11-26T11:23:13Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Author: cbowditch
Date: Thu Nov 26 11:23:13 2009
New Revision: 884526

URL: http://svn.apache.org/viewvc?rev=884526&amp;view=rev
Log:
bug fix: 48290 AFP Renderer: AttributeQualifier Triplet occurs before TLE Value 

Modified:
    xmlgraphics/fop/trunk/src/java/org/apache/fop/afp/modca/TagLogicalElement.java
    xmlgraphics/fop/trunk/status.xml

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/afp/modca/TagLogicalElement.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/afp/modca/TagLogicalElement.java?rev=884526&amp;r1=884525&amp;r2=884526&amp;view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/afp/modca/TagLogicalElement.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/afp/modca/TagLogicalElement.java Thu Nov
26 11:23:13 2009
@@ -101,8 +101,8 @@
                 FullyQualifiedNameTriplet.TYPE_ATTRIBUTE_GID,
                 FullyQualifiedNameTriplet.FORMAT_CHARSTR,
                 name);
-        setAttributeQualifier(tleID, 1);
         setAttributeValue(value);
+        setAttributeQualifier(tleID, 1);        
         
         byte[] data = new byte[SF_HEADER.length];
         copySF(data, Type.ATTRIBUTE, Category.PROCESS_ELEMENT);

Modified: xmlgraphics/fop/trunk/status.xml
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/status.xml?rev=884526&amp;r1=884525&amp;r2=884526&amp;view=diff
==============================================================================
--- xmlgraphics/fop/trunk/status.xml (original)
+++ xmlgraphics/fop/trunk/status.xml Thu Nov 26 11:23:13 2009
@@ -58,6 +58,9 @@
       documents. Example: the fix of marks layering will be such a case when it's done.
     --&gt;
     &lt;release version="FOP Trunk" date="TBD"&gt;
+      &lt;action context="Renderers" dev="CB" type="fix" fixes-bug="48290"&gt;
+        Bugfix: AFP Renderer: AttributeQualifier Triplet occurs before TLE Value.
+      &lt;/action&gt;
       &lt;action context="Renderers" dev="JM" type="fix" fixes-bug="48048" due-to="D.W. Harks"&gt;
         Bugfix in AFP output: fixed flags in GOCA GBAR order.
       &lt;/action&gt;



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



</pre>
</div>
</content>
</entry>
<entry>
<title>svn commit: r884241 - /xmlgraphics/fop/trunk/src/java/org/apache/fop/render/pdf/PDFDocumentHandler.java</title>
<author><name>jeremias@apache.org</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/xmlgraphics-fop-commits/200911.mbox/%3c20091125195614.B57E123889CB@eris.apache.org%3e"/>
<id>urn:uuid:%3c20091125195614-B57E123889CB@eris-apache-org%3e</id>
<updated>2009-11-25T19:56:14Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Author: jeremias
Date: Wed Nov 25 19:56:14 2009
New Revision: 884241

URL: http://svn.apache.org/viewvc?rev=884241&amp;view=rev
Log:
Bugzilla #47311:
Fixes prepress boxes. Boxes need to be transformed into PDF's default coordinate system.

Modified:
    xmlgraphics/fop/trunk/src/java/org/apache/fop/render/pdf/PDFDocumentHandler.java

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/render/pdf/PDFDocumentHandler.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/render/pdf/PDFDocumentHandler.java?rev=884241&amp;r1=884240&amp;r2=884241&amp;view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/render/pdf/PDFDocumentHandler.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/render/pdf/PDFDocumentHandler.java Wed Nov
25 19:56:14 2009
@@ -24,7 +24,6 @@
 import java.awt.geom.AffineTransform;
 import java.awt.geom.Point2D;
 import java.awt.geom.Rectangle2D;
-import java.awt.geom.Rectangle2D.Double;
 import java.io.IOException;
 import java.util.Map;
 
@@ -219,13 +218,17 @@
             scaleY = scales.getY();
         }
 
+        //PDF uses the lower left as origin, need to transform from FOP's internal coord
system
+        AffineTransform boxTransform = new AffineTransform(
+                scaleX / 1000, 0, 0, -scaleY / 1000, 0, scaleY * size.getHeight() / 1000);
+
         this.currentPage = this.pdfDoc.getFactory().makePage(
                 this.pdfResources,
                 index,
-                toPointAndScale(mediaBox, scaleX, scaleY),
-                toPointAndScale(cropBox, scaleX, scaleY),
-                toPointAndScale(bleedBox, scaleX, scaleY),
-                toPointAndScale(trimBox, scaleX, scaleY));
+                toPDFCoordSystem(mediaBox, boxTransform),
+                toPDFCoordSystem(cropBox, boxTransform),
+                toPDFCoordSystem(bleedBox, boxTransform),
+                toPDFCoordSystem(trimBox, boxTransform));
         if (accessEnabled) {
             logicalStructureHandler.startPage(currentPage);
         }
@@ -244,11 +247,8 @@
         generator.concatenate(basicPageTransform);
     }
 
-    private Double toPointAndScale(Rectangle box, double scaleX, double scaleY) {
-        return new Rectangle2D.Double(box.getX() * scaleX / 1000,
-                box.getY() * scaleY / 1000,
-                box.getWidth() * scaleX / 1000,
-                box.getHeight() * scaleY / 1000);
+    private Rectangle2D toPDFCoordSystem(Rectangle box, AffineTransform transform) {
+        return transform.createTransformedShape(box).getBounds2D();
     }
 
     /** {@inheritDoc} */



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



</pre>
</div>
</content>
</entry>
<entry>
<title>svn commit: r884138 - /xmlgraphics/fop/trunk/src/java/org/apache/fop/render/pdf/PDFRenderer.java</title>
<author><name>jeremias@apache.org</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/xmlgraphics-fop-commits/200911.mbox/%3c20091125152229.7AAAF2388996@eris.apache.org%3e"/>
<id>urn:uuid:%3c20091125152229-7AAAF2388996@eris-apache-org%3e</id>
<updated>2009-11-25T15:22:29Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Author: jeremias
Date: Wed Nov 25 15:22:28 2009
New Revision: 884138

URL: http://svn.apache.org/viewvc?rev=884138&amp;view=rev
Log:
Bugzilla #48227:
Removed superfluous line.
Submitted by: Gerald Buchgraber &lt;gerald.buchgraber.at.student.tugraz.at&gt;

Modified:
    xmlgraphics/fop/trunk/src/java/org/apache/fop/render/pdf/PDFRenderer.java

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/render/pdf/PDFRenderer.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/render/pdf/PDFRenderer.java?rev=884138&amp;r1=884137&amp;r2=884138&amp;view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/render/pdf/PDFRenderer.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/render/pdf/PDFRenderer.java Wed Nov 25 15:22:28
2009
@@ -1258,8 +1258,6 @@
         context.setProperty(PDFRendererContextConstants.PDF_DOCUMENT, pdfDoc);
         context.setProperty(PDFRendererContextConstants.OUTPUT_STREAM, ostream);
         context.setProperty(PDFRendererContextConstants.PDF_PAGE, currentPage);
-        context.setProperty(PDFRendererContextConstants.PDF_CONTEXT,
-                    currentContext == null ? currentPage : currentContext);
         context.setProperty(PDFRendererContextConstants.PDF_CONTEXT, currentContext);
         context.setProperty(PDFRendererContextConstants.PDF_STREAM, generator.getStream());
         context.setProperty(PDFRendererContextConstants.PDF_FONT_INFO, fontInfo);



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



</pre>
</div>
</content>
</entry>
<entry>
<title>svn commit: r884129 - in /xmlgraphics/fop/trunk: src/java/org/apache/fop/afp/goca/GraphicsAreaBegin.java status.xml</title>
<author><name>jeremias@apache.org</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/xmlgraphics-fop-commits/200911.mbox/%3c20091125150409.414152388893@eris.apache.org%3e"/>
<id>urn:uuid:%3c20091125150409-414152388893@eris-apache-org%3e</id>
<updated>2009-11-25T15:04:09Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Author: jeremias
Date: Wed Nov 25 15:04:08 2009
New Revision: 884129

URL: http://svn.apache.org/viewvc?rev=884129&amp;view=rev
Log:
Bugzilla #48048:
Bugfix in AFP output: fixed flags in GOCA GBAR order.
Submitted by: d.w. harks &lt;dave.at.dwink.net&gt;

Modified:
    xmlgraphics/fop/trunk/src/java/org/apache/fop/afp/goca/GraphicsAreaBegin.java
    xmlgraphics/fop/trunk/status.xml

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/afp/goca/GraphicsAreaBegin.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/afp/goca/GraphicsAreaBegin.java?rev=884129&amp;r1=884128&amp;r2=884129&amp;view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/afp/goca/GraphicsAreaBegin.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/afp/goca/GraphicsAreaBegin.java Wed Nov
25 15:04:08 2009
@@ -27,8 +27,8 @@
  */
 public class GraphicsAreaBegin extends AbstractGraphicsDrawingOrder {
 
-    private static final int RES1 = 1;
-    private static final int BOUNDARY = 2;
+    private static final int RES1 = 128;
+    private static final int BOUNDARY = 64;
     private static final int NO_BOUNDARY = 0;
 
     /** draw boundary lines around this area */

Modified: xmlgraphics/fop/trunk/status.xml
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/status.xml?rev=884129&amp;r1=884128&amp;r2=884129&amp;view=diff
==============================================================================
--- xmlgraphics/fop/trunk/status.xml (original)
+++ xmlgraphics/fop/trunk/status.xml Wed Nov 25 15:04:08 2009
@@ -58,6 +58,9 @@
       documents. Example: the fix of marks layering will be such a case when it's done.
     --&gt;
     &lt;release version="FOP Trunk" date="TBD"&gt;
+      &lt;action context="Renderers" dev="JM" type="fix" fixes-bug="48048" due-to="D.W. Harks"&gt;
+        Bugfix in AFP output: fixed flags in GOCA GBAR order.
+      &lt;/action&gt;
       &lt;action context="Renderers" dev="VH" type="fix" fixes-bug="48185" due-to="Harald
G. Henne"&gt;
         Bugfix in AFP output: rounding error when computing the CMYK components of a color.
       &lt;/action&gt;



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



</pre>
</div>
</content>
</entry>
<entry>
<title>svn commit: r884117 - in /xmlgraphics/fop/trunk: src/java/org/apache/fop/util/ColorExt.java test/java/org/apache/fop/util/ColorUtilTestCase.java</title>
<author><name>jeremias@apache.org</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/xmlgraphics-fop-commits/200911.mbox/%3c20091125144248.920A223889B3@eris.apache.org%3e"/>
<id>urn:uuid:%3c20091125144248-920A223889B3@eris-apache-org%3e</id>
<updated>2009-11-25T14:42:48Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Author: jeremias
Date: Wed Nov 25 14:42:48 2009
New Revision: 884117

URL: http://svn.apache.org/viewvc?rev=884117&amp;view=rev
Log:
Bugfix: Added equals() method to ColorExt because the base class only compares the RGB value
but not any other value.

Modified:
    xmlgraphics/fop/trunk/src/java/org/apache/fop/util/ColorExt.java
    xmlgraphics/fop/trunk/test/java/org/apache/fop/util/ColorUtilTestCase.java

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/util/ColorExt.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/util/ColorExt.java?rev=884117&amp;r1=884116&amp;r2=884117&amp;view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/util/ColorExt.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/util/ColorExt.java Wed Nov 25 14:42:48 2009
@@ -21,6 +21,7 @@
 
 import java.awt.Color;
 import java.awt.color.ColorSpace;
+import java.util.Arrays;
 
 /**
  * Color helper class.
@@ -120,6 +121,7 @@
     public static ColorExt createFromSvgIccColor(float red, float green,
             float blue, float opacity, String profileName, String profileHref,
             ColorSpace profileCS, float[] colorValues) {
+        //TODO this method is not referenced by FOP, can it be deleted?
         ColorExt ce = new ColorExt(red, green, blue, opacity);
         ce.rgbReplacementRed = -1;
         ce.rgbReplacementGreen = -1;
@@ -132,6 +134,57 @@
 
     }
 
+    /** {@inheritDoc} */
+    public int hashCode() {
+        //implementation from the superclass should be good enough for our purposes
+        return super.hashCode();
+    }
+
+    /** {@inheritDoc} */
+    public boolean equals(Object obj) {
+        if (this == obj) {
+            return true;
+        }
+        if (!super.equals(obj)) {
+            return false;
+        }
+        if (getClass() != obj.getClass()) {
+            return false;
+        }
+        ColorExt other = (ColorExt)obj;
+        //TODO maybe use super.getColorComponents() instead
+        if (!Arrays.equals(colorValues, other.colorValues)) {
+            return false;
+        }
+        if (iccProfileName == null) {
+            if (other.iccProfileName != null) {
+                return false;
+            }
+        } else if (!iccProfileName.equals(other.iccProfileName)) {
+            return false;
+        }
+        if (iccProfileSrc == null) {
+            if (other.iccProfileSrc != null) {
+                return false;
+            }
+        } else if (!iccProfileSrc.equals(other.iccProfileSrc)) {
+            return false;
+        }
+        if (Float.floatToIntBits(rgbReplacementBlue)
+                != Float.floatToIntBits(other.rgbReplacementBlue)) {
+            return false;
+        }
+        if (Float.floatToIntBits(rgbReplacementGreen)
+                != Float.floatToIntBits(other.rgbReplacementGreen)) {
+            return false;
+        }
+        if (Float.floatToIntBits(rgbReplacementRed)
+                != Float.floatToIntBits(other.rgbReplacementRed)) {
+            return false;
+        }
+        return true;
+    }
+
     /**
      * Get ICC profile name
      *
@@ -154,14 +207,19 @@
      * @return the original ColorSpace
      */
     public ColorSpace getOrigColorSpace() {
+        //TODO this method is probably unnecessary due to super.cs and getColorSpace()
         return this.colorSpace;
     }
 
     /**
+     * Returns the original color values.
      * @return the original color values
      */
     public float[] getOriginalColorComponents() {
-        return this.colorValues;
+        //TODO this method is probably unnecessary due to super.fvalue and getColorComponents()
+        float[] copy = new float[this.colorValues.length];
+        System.arraycopy(this.colorValues, 0, copy, 0, copy.length);
+        return copy;
     }
 
     /**

Modified: xmlgraphics/fop/trunk/test/java/org/apache/fop/util/ColorUtilTestCase.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/test/java/org/apache/fop/util/ColorUtilTestCase.java?rev=884117&amp;r1=884116&amp;r2=884117&amp;view=diff
==============================================================================
--- xmlgraphics/fop/trunk/test/java/org/apache/fop/util/ColorUtilTestCase.java (original)
+++ xmlgraphics/fop/trunk/test/java/org/apache/fop/util/ColorUtilTestCase.java Wed Nov 25
14:42:48 2009
@@ -75,6 +75,13 @@
         Color col1 = ColorUtil.parseColorString(null, "#ff0000cc");
         Color col2 = ColorUtil.parseColorString(null, "#ff0000cc");
         assertEquals(col1, col2);
+
+        col1 = ColorUtil.parseColorString(null, "fop-rgb-icc(0.5,0.5,0.5,#CMYK,,0.0,0.0,0.0,0.5)");
+        col2 = ColorUtil.parseColorString(null, "cmyk(0.0,0.0,0.0,0.5)");
+        assertEquals(col1, col2);
+
+        col2 = ColorUtil.parseColorString(null, "fop-rgb-icc(0.5,0.5,0.5,#CMYK,,0.5,0.5,0.5,0.0)");
+        assertFalse(col1.equals(col2));
     }
 
     /**
@@ -120,7 +127,7 @@
         //TODO Anyone know what's going on here?
         assertEquals(0, colActual.getBlue());
         assertEquals(cs, colActual.getColorSpace());
-        float[] comps = colActual.getOriginalColorComponents();
+        float[] comps = colActual.getColorComponents(null);
         assertEquals(3, comps.length);
         assertEquals(1f, comps[0], 0);
         assertEquals(0f, comps[1], 0);
@@ -148,7 +155,7 @@
         assertEquals(255, colActual.getGreen());
         assertEquals(0, colActual.getBlue());
         assertEquals(CMYKColorSpace.getInstance(), colActual.getColorSpace());
-        float[] comps = colActual.getOriginalColorComponents();
+        float[] comps = colActual.getColorComponents(null);
         assertEquals(4, comps.length);
         assertEquals(0f, comps[0], 0);
         assertEquals(0f, comps[1], 0);
@@ -163,7 +170,7 @@
         assertEquals(199, colActual.getGreen());
         assertEquals(172, colActual.getBlue());
         assertEquals(CMYKColorSpace.getInstance(), colActual.getColorSpace());
-        comps = colActual.getOriginalColorComponents();
+        comps = colActual.getColorComponents(null);
         assertEquals(0.0274f, comps[0], 0.001);
         assertEquals(0.2196f, comps[1], 0.001);
         assertEquals(0.3216f, comps[2], 0.001);
@@ -177,7 +184,7 @@
         assertEquals(255, colActual.getGreen());
         assertEquals(0, colActual.getBlue());
         assertEquals(CMYKColorSpace.getInstance(), colActual.getColorSpace());
-        comps = colActual.getOriginalColorComponents();
+        comps = colActual.getColorComponents(null);
         assertEquals(4, comps.length);
         assertEquals(0f, comps[0], 0);
         assertEquals(0f, comps[1], 0);
@@ -185,6 +192,21 @@
         assertEquals(0f, comps[3], 0);
         assertEquals("fop-rgb-icc(1.0,1.0,0.0,#CMYK,,0.0,0.0,1.0,0.0)",
                 ColorUtil.colorToString(colActual));
+
+        colSpec = "fop-rgb-icc(0.5,0.5,0.5,#CMYK,,0.0,0.0,0.0,0.5)";
+        colActual = (ColorExt)ColorUtil.parseColorString(null, colSpec);
+        assertEquals(127, colActual.getRed());
+        assertEquals(127, colActual.getGreen());
+        assertEquals(127, colActual.getBlue());
+        assertEquals(CMYKColorSpace.getInstance(), colActual.getColorSpace());
+        comps = colActual.getColorComponents(null);
+        assertEquals(4, comps.length);
+        assertEquals(0f, comps[0], 0);
+        assertEquals(0f, comps[1], 0);
+        assertEquals(0f, comps[2], 0);
+        assertEquals(0.5f, comps[3], 0);
+        assertEquals("fop-rgb-icc(0.5,0.5,0.5,#CMYK,,0.0,0.0,0.0,0.5)",
+                ColorUtil.colorToString(colActual));
     }
 
 }



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



</pre>
</div>
</content>
</entry>
<entry>
<title>svn commit: r883709 - in /xmlgraphics/fop/trunk: src/java/org/apache/fop/layoutmgr/AbstractLayoutManager.java test/layoutengine/standard-testcases/flow_changing-ipd_break-before.xml</title>
<author><name>vhennebert@apache.org</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/xmlgraphics-fop-commits/200911.mbox/%3c20091124144853.8CAAB23889B8@eris.apache.org%3e"/>
<id>urn:uuid:%3c20091124144853-8CAAB23889B8@eris-apache-org%3e</id>
<updated>2009-11-24T14:48:53Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Author: vhennebert
Date: Tue Nov 24 14:48:52 2009
New Revision: 883709

URL: http://svn.apache.org/viewvc?rev=883709&amp;view=rev
Log:
Bugfix in Changing IPD: reset only the children LMs that have been created so far. Layout
managers following a forced break have not even been created yet.

Added:
    xmlgraphics/fop/trunk/test/layoutengine/standard-testcases/flow_changing-ipd_break-before.xml
  (with props)
Modified:
    xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/AbstractLayoutManager.java

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/AbstractLayoutManager.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/AbstractLayoutManager.java?rev=883709&amp;r1=883708&amp;r2=883709&amp;view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/AbstractLayoutManager.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/AbstractLayoutManager.java Tue
Nov 24 14:48:52 2009
@@ -20,6 +20,7 @@
 package org.apache.fop.layoutmgr;
 
 import java.util.ArrayList;
+import java.util.Iterator;
 import java.util.List;
 import java.util.ListIterator;
 import java.util.Map;
@@ -463,11 +464,8 @@
         isFinished = false;
         curChildLM = null;
         childLMiter = new LMiter(this);
-        /*
-         * Reset the children LM. Can't rely on childLMiter since it may have
-         * been set to null in checkEndOfLayout.
-         */
-        for (LMiter iter = new LMiter(this); iter.hasNext();) {
+        /* Reset all the children LM that have been created so far. */
+        for (Iterator iter = getChildLMs().iterator(); iter.hasNext();) {
             ((LayoutManager) iter.next()).reset();
         }
         if (fobj != null) {

Added: xmlgraphics/fop/trunk/test/layoutengine/standard-testcases/flow_changing-ipd_break-before.xml
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/test/layoutengine/standard-testcases/flow_changing-ipd_break-before.xml?rev=883709&amp;view=auto
==============================================================================
--- xmlgraphics/fop/trunk/test/layoutengine/standard-testcases/flow_changing-ipd_break-before.xml
(added)
+++ xmlgraphics/fop/trunk/test/layoutengine/standard-testcases/flow_changing-ipd_break-before.xml
Tue Nov 24 14:48:52 2009
@@ -0,0 +1,96 @@
+&lt;?xml version="1.0" encoding="UTF-8"?&gt;
+&lt;!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You 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.
+--&gt;
+&lt;!-- $Id$ --&gt;
+&lt;testcase&gt;
+  &lt;info&gt;
+    &lt;p&gt;
+      This test checks that a forced before break following an IPD change is correctly handled.
+    &lt;/p&gt;
+  &lt;/info&gt;
+  &lt;fo&gt;
+    &lt;fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format"&gt;
+      &lt;fo:layout-master-set&gt;
+        &lt;fo:simple-page-master master-name="narrow"
+          page-height="220pt" page-width="320pt" margin="10pt"&gt;
+          &lt;fo:region-body background-color="#F0F0F0"/&gt;
+        &lt;/fo:simple-page-master&gt;
+        &lt;fo:simple-page-master master-name="wide"
+          page-height="220pt" page-width="520pt" margin="10pt"&gt;
+          &lt;fo:region-body background-color="#F0F0F0"/&gt;
+        &lt;/fo:simple-page-master&gt;
+        &lt;fo:page-sequence-master master-name="pages"&gt;
+          &lt;fo:single-page-master-reference master-reference="narrow"/&gt;
+          &lt;fo:repeatable-page-master-reference master-reference="wide"/&gt;
+        &lt;/fo:page-sequence-master&gt;
+      &lt;/fo:layout-master-set&gt;
+      &lt;fo:page-sequence master-reference="pages"&gt;
+        &lt;fo:flow flow-name="xsl-region-body" language="en" hyphenate="true"&gt;
+          &lt;fo:block id="surrounding1" text-align="justify"
+            space-before.minimum="10pt"
+            space-before.optimum="12pt"
+            space-before.maximum="50pt"&gt;
+            &lt;fo:block space-before="inherit" id="b1"&gt;In olden times when wishing still
helped one, 
+              there lived a king whose daughters were all beautiful, but the youngest was
so 
+              beautiful that the sun itself, which has seen so much, was astonished whenever
it 
+              shone in her face.&lt;/fo:block&gt;
+            &lt;fo:block space-before="inherit" id="b2"&gt;In olden times when wishing still
helped one, 
+              there lived a king whose daughters were all beautiful, but the youngest was
so 
+              beautiful that the sun itself, which has seen so much, was astonished whenever
it 
+              shone in her face.&lt;/fo:block&gt;
+            &lt;fo:block space-before="inherit" id="b3"&gt;In olden times when wishing still
helped one, 
+              there lived a king whose daughters were all beautiful, but the youngest was
so 
+              beautiful that the sun itself, which has seen so much, was astonished whenever
it 
+              shone in her face. In olden times when wishing still helped one, there lived
a king 
+              whose daughters were all beautiful, but the youngest was so beautiful that
the sun 
+              itself, which has seen so much, was astonished whenever it shone in her 
+              face.&lt;/fo:block&gt;
+            &lt;fo:block space-before="inherit" id="b4"&gt;In olden times when wishing still
helped one, 
+              there lived a king whose daughters were all beautiful, but the youngest was
so 
+              beautiful that the sun itself, which has seen so much, was astonished whenever
it 
+              shone in her face.&lt;/fo:block&gt;
+          &lt;/fo:block&gt;
+          &lt;fo:block id="surrounding2" text-align="justify" break-before="page"
+            space-before.minimum="10pt"
+            space-before.optimum="12pt"
+            space-before.maximum="50pt"&gt;
+            &lt;fo:block space-before="inherit" id="b5"&gt;In olden times when wishing still
helped one, 
+              there lived a king whose daughters were all beautiful, but the youngest was
so 
+              beautiful that the sun itself, which has seen so much, was astonished whenever
it 
+              shone in her face.&lt;/fo:block&gt;
+            &lt;fo:block space-before="inherit" id="b6"&gt;In olden times when wishing still
helped one, 
+              there lived a king whose daughters were all beautiful, but the youngest was
so 
+              beautiful that the sun itself, which has seen so much, was astonished whenever
it 
+              shone in her face.&lt;/fo:block&gt;
+          &lt;/fo:block&gt;
+        &lt;/fo:flow&gt;
+      &lt;/fo:page-sequence&gt;
+    &lt;/fo:root&gt;
+  &lt;/fo&gt;
+  &lt;checks&gt;
+    &lt;eval expected="b3"     xpath="//pageViewport[1]//flow/block/block[3]/@prod-id"/&gt;
+    &lt;eval expected="In"     xpath="//pageViewport[1]//flow/block/block[3]/lineArea[4]/text/word[position()=last()]"/&gt;
+    &lt;eval expected="500000" xpath="//pageViewport[2]//flow/block/@ipd"/&gt;
+    &lt;eval expected="500000" xpath="//pageViewport[2]//flow/block/block[1]/@ipd"/&gt;
+    &lt;eval expected="500000" xpath="//pageViewport[2]//flow/block/block[1]/lineArea[1]/@ipd"/&gt;
+    &lt;eval expected="olden"  xpath="//pageViewport[2]//flow/block/block[1]/lineArea[1]/text/word[1]"/&gt;
+    &lt;eval expected="b5"     xpath="//pageViewport[3]//flow/block/block[1]/@prod-id"/&gt;
+    &lt;eval expected="500000" xpath="//pageViewport[3]//flow/block/block[1]/@ipd"/&gt;
+    &lt;eval expected="500000" xpath="//pageViewport[3]//flow/block/block[1]/lineArea[1]/@ipd"/&gt;
+    &lt;eval expected="In"     xpath="//pageViewport[3]//flow/block/block[1]/lineArea[1]/text/word[1]"/&gt;
+  &lt;/checks&gt;
+&lt;/testcase&gt;

Propchange: xmlgraphics/fop/trunk/test/layoutengine/standard-testcases/flow_changing-ipd_break-before.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: xmlgraphics/fop/trunk/test/layoutengine/standard-testcases/flow_changing-ipd_break-before.xml
------------------------------------------------------------------------------
    svn:keywords = Revision Id



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



</pre>
</div>
</content>
</entry>
<entry>
<title>svn commit: r883314 - in /xmlgraphics/fop/trunk: src/java/org/apache/fop/afp/ptoca/PtocaBuilder.java status.xml</title>
<author><name>vhennebert@apache.org</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/xmlgraphics-fop-commits/200911.mbox/%3c20091123115505.4C7B323888FD@eris.apache.org%3e"/>
<id>urn:uuid:%3c20091123115505-4C7B323888FD@eris-apache-org%3e</id>
<updated>2009-11-23T11:55:05Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Author: vhennebert
Date: Mon Nov 23 11:55:04 2009
New Revision: 883314

URL: http://svn.apache.org/viewvc?rev=883314&amp;view=rev
Log:
Bugzilla #48185: rounding error when computing the CMYK components of a color, in the AFP
output.
Patch submitted by Harald G. Henne (initially in Bugzilla #48167)

Modified:
    xmlgraphics/fop/trunk/src/java/org/apache/fop/afp/ptoca/PtocaBuilder.java
    xmlgraphics/fop/trunk/status.xml

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/afp/ptoca/PtocaBuilder.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/afp/ptoca/PtocaBuilder.java?rev=883314&amp;r1=883313&amp;r2=883314&amp;view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/afp/ptoca/PtocaBuilder.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/afp/ptoca/PtocaBuilder.java Mon Nov 23 11:55:04
2009
@@ -329,7 +329,7 @@
             float[] comps = col.getColorComponents(null);
             assert comps.length == 4;
             for (int i = 0; i &lt; 4; i++) {
-                int component = Math.round(comps[i] * 256);
+                int component = Math.round(comps[i] * 255);
                 writeByte(component);
             }
         } else {

Modified: xmlgraphics/fop/trunk/status.xml
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/status.xml?rev=883314&amp;r1=883313&amp;r2=883314&amp;view=diff
==============================================================================
--- xmlgraphics/fop/trunk/status.xml (original)
+++ xmlgraphics/fop/trunk/status.xml Mon Nov 23 11:55:04 2009
@@ -58,6 +58,9 @@
       documents. Example: the fix of marks layering will be such a case when it's done.
     --&gt;
     &lt;release version="FOP Trunk" date="TBD"&gt;
+      &lt;action context="Renderers" dev="VH" type="fix" fixes-bug="48185" due-to="Harald
G. Henne"&gt;
+        Bugfix in AFP output: rounding error when computing the CMYK components of a color.
+      &lt;/action&gt;
       &lt;action context="Code" dev="VH" type="fix" fixes-bug="48167" due-to="Venkat Reddy"&gt;
         Bugfix: when #CMYK pseudo-profile was used in the rgb-icc() function, always the
fallback 
         RGB colors were used instead.



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



</pre>
</div>
</content>
</entry>
<entry>
<title>svn commit: r883310 - in /xmlgraphics/fop/trunk: src/java/org/apache/fop/fo/expr/ICCColorFunction.java status.xml</title>
<author><name>vhennebert@apache.org</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/xmlgraphics-fop-commits/200911.mbox/%3c20091123114656.A103C23888D1@eris.apache.org%3e"/>
<id>urn:uuid:%3c20091123114656-A103C23888D1@eris-apache-org%3e</id>
<updated>2009-11-23T11:46:56Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Author: vhennebert
Date: Mon Nov 23 11:46:55 2009
New Revision: 883310

URL: http://svn.apache.org/viewvc?rev=883310&amp;view=rev
Log:
Bugzilla #48167: when #CMYK pseudo-profile was used in the rgb-icc() function, always the
fallback RGB colors were used instead.
Patch submitted by Venkat Reddy

Modified:
    xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/expr/ICCColorFunction.java
    xmlgraphics/fop/trunk/status.xml

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/expr/ICCColorFunction.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/expr/ICCColorFunction.java?rev=883310&amp;r1=883309&amp;r2=883310&amp;view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/expr/ICCColorFunction.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/expr/ICCColorFunction.java Mon Nov 23
11:46:55 2009
@@ -58,9 +58,11 @@
             //a) before the fo:declarations,
             //b) or in a document without fo:declarations?
             //=&gt; return the sRGB fallback
-            Property[] rgbArgs = new Property[3];
-            System.arraycopy(args, 0, rgbArgs, 0, 3);
-            return new RGBColorFunction().eval(rgbArgs, pInfo);
+            if (!ColorUtil.isPseudoProfile(colorProfileName)) {
+                Property[] rgbArgs = new Property[3];
+                System.arraycopy(args, 0, rgbArgs, 0, 3);
+                return new RGBColorFunction().eval(rgbArgs, pInfo);
+            }
         } else {
             cp = decls.getColorProfile(colorProfileName);
             if (cp == null) {

Modified: xmlgraphics/fop/trunk/status.xml
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/status.xml?rev=883310&amp;r1=883309&amp;r2=883310&amp;view=diff
==============================================================================
--- xmlgraphics/fop/trunk/status.xml (original)
+++ xmlgraphics/fop/trunk/status.xml Mon Nov 23 11:46:55 2009
@@ -58,6 +58,10 @@
       documents. Example: the fix of marks layering will be such a case when it's done.
     --&gt;
     &lt;release version="FOP Trunk" date="TBD"&gt;
+      &lt;action context="Code" dev="VH" type="fix" fixes-bug="48167" due-to="Venkat Reddy"&gt;
+        Bugfix: when #CMYK pseudo-profile was used in the rgb-icc() function, always the
fallback 
+        RGB colors were used instead.
+      &lt;/action&gt;
       &lt;action context="Layout" dev="VH" type="fix" fixes-bug="48082"&gt;
         Bugfix: value of conditional space not always taken into account in the calculation
of a 
         tableâs height.



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



</pre>
</div>
</content>
</entry>
<entry>
<title>svn commit: r834135 - in /xmlgraphics/fop/trunk: src/documentation/intermediate-format-ng/ test/java/org/apache/fop/intermediate/</title>
<author><name>vhennebert@apache.org</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/xmlgraphics-fop-commits/200911.mbox/%3c20091109163510.4CD7A23888CE@eris.apache.org%3e"/>
<id>urn:uuid:%3c20091109163510-4CD7A23888CE@eris-apache-org%3e</id>
<updated>2009-11-09T16:35:00Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Author: vhennebert
Date: Mon Nov  9 16:34:47 2009
New Revision: 834135

URL: http://svn.apache.org/viewvc?rev=834135&amp;view=rev
Log:
Moved declaration of xml:space attribute from &lt;text&gt; to &lt;page-sequence&gt; in the
XML Schema, to reflect changes from rev. 834020.
Moved validation of intermediate XML to testParserToIntermediateFormat method, so that any
validation error is returned by Junit instead of being swallowed.

Modified:
    xmlgraphics/fop/trunk/src/documentation/intermediate-format-ng/fop-intermediate-format-ng-content.xsd
    xmlgraphics/fop/trunk/src/documentation/intermediate-format-ng/fop-intermediate-format-ng.xsd
    xmlgraphics/fop/trunk/test/java/org/apache/fop/intermediate/AbstractIntermediateTestCase.java

Modified: xmlgraphics/fop/trunk/src/documentation/intermediate-format-ng/fop-intermediate-format-ng-content.xsd
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/documentation/intermediate-format-ng/fop-intermediate-format-ng-content.xsd?rev=834135&amp;r1=834134&amp;r2=834135&amp;view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/documentation/intermediate-format-ng/fop-intermediate-format-ng-content.xsd
(original)
+++ xmlgraphics/fop/trunk/src/documentation/intermediate-format-ng/fop-intermediate-format-ng-content.xsd
Mon Nov  9 16:34:47 2009
@@ -20,8 +20,6 @@
   targetNamespace="http://xmlgraphics.apache.org/fop/intermediate"
   xmlns:mf="http://xmlgraphics.apache.org/fop/intermediate"&gt;
   &lt;xs:include schemaLocation="fop-intermediate-format-ng-datatypes.xsd"/&gt;
-  &lt;xs:import namespace="http://www.w3.org/XML/1998/namespace"
-    schemaLocation="http://www.w3.org/2001/xml.xsd"/&gt;
   &lt;xs:complexType name="contentType"&gt;
     &lt;xs:choice maxOccurs="unbounded" minOccurs="0"&gt;
       &lt;xs:element name="viewport"&gt;
@@ -68,7 +66,6 @@
                   &lt;xs:list itemType="mf:lengthType"/&gt;
                 &lt;/xs:simpleType&gt;
               &lt;/xs:attribute&gt;
-              &lt;xs:attribute ref="xml:space"/&gt;
             &lt;/xs:extension&gt;
           &lt;/xs:simpleContent&gt;
         &lt;/xs:complexType&gt;

Modified: xmlgraphics/fop/trunk/src/documentation/intermediate-format-ng/fop-intermediate-format-ng.xsd
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/documentation/intermediate-format-ng/fop-intermediate-format-ng.xsd?rev=834135&amp;r1=834134&amp;r2=834135&amp;view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/documentation/intermediate-format-ng/fop-intermediate-format-ng.xsd
(original)
+++ xmlgraphics/fop/trunk/src/documentation/intermediate-format-ng/fop-intermediate-format-ng.xsd
Mon Nov  9 16:34:47 2009
@@ -20,6 +20,8 @@
   targetNamespace="http://xmlgraphics.apache.org/fop/intermediate"
   xmlns:mf="http://xmlgraphics.apache.org/fop/intermediate"
   xmlns:nav="http://xmlgraphics.apache.org/fop/intermediate/document-navigation"&gt;
+  &lt;xs:import namespace="http://www.w3.org/XML/1998/namespace"
+    schemaLocation="http://www.w3.org/2001/xml.xsd"/&gt;
   &lt;xs:import namespace="http://xmlgraphics.apache.org/fop/intermediate/document-navigation"
     schemaLocation="fop-intermediate-format-ng-nav.xsd"/&gt;
   &lt;xs:import namespace="adobe:ns:meta/" schemaLocation="xmp-metadata.xsd"/&gt;
@@ -61,6 +63,7 @@
         &lt;xs:element ref="mf:page" minOccurs="1" maxOccurs="unbounded"/&gt;
       &lt;/xs:sequence&gt;
       &lt;xs:attribute name="id" type="xs:ID"/&gt;
+      &lt;xs:attribute ref="xml:space"/&gt;
       &lt;xs:attributeGroup ref="mf:foreignAtts"/&gt;
     &lt;/xs:complexType&gt;
   &lt;/xs:element&gt;

Modified: xmlgraphics/fop/trunk/test/java/org/apache/fop/intermediate/AbstractIntermediateTestCase.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/test/java/org/apache/fop/intermediate/AbstractIntermediateTestCase.java?rev=834135&amp;r1=834134&amp;r2=834135&amp;view=diff
==============================================================================
--- xmlgraphics/fop/trunk/test/java/org/apache/fop/intermediate/AbstractIntermediateTestCase.java
(original)
+++ xmlgraphics/fop/trunk/test/java/org/apache/fop/intermediate/AbstractIntermediateTestCase.java
Mon Nov  9 16:34:47 2009
@@ -35,7 +35,6 @@
 
 import org.custommonkey.xmlunit.XMLTestCase;
 import org.w3c.dom.Document;
-
 import org.xml.sax.SAXException;
 
 import org.apache.commons.io.IOUtils;
@@ -95,7 +94,6 @@
             env.saveDOM(intermediate, new File(outputDir,
                     getName() + ".1" + getIntermediateFileExtension()));
         }
-        validate(intermediate);
     }
 
     /** {@inheritDoc} */
@@ -172,6 +170,7 @@
      * @throws Exception if the test fails
      */
     public void testParserToIntermediateFormat() throws Exception {
+        validate(intermediate);
         Source src = new DOMSource(intermediate);
         Document doc = parseAndRenderToIntermediateFormat(src);
         if (outputDir != null) {



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



</pre>
</div>
</content>
</entry>
<entry>
<title>svn commit: r834020 - /xmlgraphics/fop/trunk/src/java/org/apache/fop/render/intermediate/IFSerializer.java</title>
<author><name>vhennebert@apache.org</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/xmlgraphics-fop-commits/200911.mbox/%3c20091109112200.1E21F23888BB@eris.apache.org%3e"/>
<id>urn:uuid:%3c20091109112200-1E21F23888BB@eris-apache-org%3e</id>
<updated>2009-11-09T11:21:56Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Author: vhennebert
Date: Mon Nov  9 11:21:52 2009
New Revision: 834020

URL: http://svn.apache.org/viewvc?rev=834020&amp;view=rev
Log:
Bugzilla 48032: moved xml:space attribute from &lt;text&gt; up to &lt;page-sequence&gt; element
in order to save a bit on disk space

Modified:
    xmlgraphics/fop/trunk/src/java/org/apache/fop/render/intermediate/IFSerializer.java

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/render/intermediate/IFSerializer.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/render/intermediate/IFSerializer.java?rev=834020&amp;r1=834019&amp;r2=834020&amp;view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/render/intermediate/IFSerializer.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/render/intermediate/IFSerializer.java Mon
Nov  9 11:21:52 2009
@@ -219,6 +219,7 @@
                 atts.addAttribute(XML_NAMESPACE, "lang", "xml:lang", XMLUtil.CDATA,
                         XMLUtil.toRFC3066(lang));
             }
+            XMLUtil.addAttribute(atts, XMLConstants.XML_SPACE, "preserve");
             addForeignAttributes(atts);
             handler.startElement(EL_PAGE_SEQUENCE, atts);
             if (this.getUserAgent().isAccessibilityEnabled()) {
@@ -540,7 +541,6 @@
             int[] dx, String text) throws IFException {
         try {
             AttributesImpl atts = new AttributesImpl();
-            XMLUtil.addAttribute(atts, XMLConstants.XML_SPACE, "preserve");
             addAttribute(atts, "x", Integer.toString(x));
             addAttribute(atts, "y", Integer.toString(y));
             if (letterSpacing != 0) {



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



</pre>
</div>
</content>
</entry>
<entry>
<title>svn commit: r833612 - /xmlgraphics/fop/trunk/src/documentation/content/xdocs/faq.xml</title>
<author><name>pietsch@apache.org</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/xmlgraphics-fop-commits/200911.mbox/%3c20091107000853.A3EC323888CE@eris.apache.org%3e"/>
<id>urn:uuid:%3c20091107000853-A3EC323888CE@eris-apache-org%3e</id>
<updated>2009-11-07T00:08:53Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Author: pietsch
Date: Sat Nov  7 00:08:53 2009
New Revision: 833612

URL: http://svn.apache.org/viewvc?rev=833612&amp;view=rev
Log:
Fix typos

Modified:
    xmlgraphics/fop/trunk/src/documentation/content/xdocs/faq.xml

Modified: xmlgraphics/fop/trunk/src/documentation/content/xdocs/faq.xml
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/documentation/content/xdocs/faq.xml?rev=833612&amp;r1=833611&amp;r2=833612&amp;view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/documentation/content/xdocs/faq.xml (original)
+++ xmlgraphics/fop/trunk/src/documentation/content/xdocs/faq.xml Sat Nov  7 00:08:53 2009
@@ -467,7 +467,7 @@
         &lt;p&gt;
           Earlier versions of FOP used to expand a leader to fill the
           rest of the line unconditionally, anything following it,
-          like page numbers in a TOC, was actually shifted beyong the
+          like page numbers in a TOC, was actually shifted beyond the
           right margin.
         &lt;/p&gt;
         &lt;p&gt;
@@ -505,7 +505,7 @@
           odd page number, the processor inserts a blank page to keep odd and
           even page numbers alternating (similar for the case the current page
           sequence ends with an even page number and the next page sequence
-          starts with an even page number.
+          starts with an even page number).
         &lt;/p&gt;
         &lt;p&gt;
           If you don't want to have this blank page, use



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



</pre>
</div>
</content>
</entry>
<entry>
<title>svn commit: r833607 - /xmlgraphics/fop/trunk/src/documentation/content/xdocs/faq.xml</title>
<author><name>pietsch@apache.org</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/xmlgraphics-fop-commits/200911.mbox/%3c20091106234751.4FB9F23888D1@eris.apache.org%3e"/>
<id>urn:uuid:%3c20091106234751-4FB9F23888D1@eris-apache-org%3e</id>
<updated>2009-11-06T23:47:51Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Author: pietsch
Date: Fri Nov  6 23:47:50 2009
New Revision: 833607

URL: http://svn.apache.org/viewvc?rev=833607&amp;view=rev
Log:
Minor changes to the FAQ
Change 0.94 to 0.95 in links
Adapt Opinion about 1.0 release data
Mentioned support for keep-* in recent FOP releases
Fixed FIXME in last Q regarding alternative XML/XSLT stuff
Some minor changes related to 0,94 vs. 0,95 release in some places
Additional minor formatting changes to the XML source

Modified:
    xmlgraphics/fop/trunk/src/documentation/content/xdocs/faq.xml

Modified: xmlgraphics/fop/trunk/src/documentation/content/xdocs/faq.xml
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/documentation/content/xdocs/faq.xml?rev=833607&amp;r1=833606&amp;r2=833607&amp;view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/documentation/content/xdocs/faq.xml (original)
+++ xmlgraphics/fop/trunk/src/documentation/content/xdocs/faq.xml Fri Nov  6 23:47:50 2009
@@ -138,8 +138,10 @@
         &lt;p&gt;
           When it's ready and the committers have enough time to go through 
           the time-consuming process of creating a release. We
-          released version 0.94 on 24th August 2007, and intend to
-          release version 1.0 later in late 2007 or early 2008. If you
+          released version 0.95 on August 6th, 2008, and intend to
+          release version 1.0 once we consider it "feature complete", major
+          work is still in progress regarding page flows with changing page width
+          (changing IPD, to be precise). If you
           want to speed up the process, consider
           &lt;link href="dev/index.html#involved"&gt;contributing&lt;/link&gt; to FOP.&lt;/p&gt;
       &lt;/answer&gt;
@@ -211,7 +213,7 @@
           If you run FOP embedded in your servlet, web application or
           other Java application, check the classpath of the
           application. Check the also the information pertaining to &lt;link
-          href="0.94/servlets.html#servlet-engine"&gt;servlet engines&lt;/link&gt;
+          href="0.95/servlets.html#servlet-engine"&gt;servlet engines&lt;/link&gt;
           for further hints.
         &lt;/p&gt;
         &lt;p&gt;
@@ -241,7 +243,7 @@
       &lt;question&gt;I get an OutOfMemoryException.&lt;/question&gt;
       &lt;answer&gt;
         &lt;p&gt;
-          See &lt;link href="0.94/running.html#memory"&gt;FOP Memory&lt;/link&gt;.
+          See &lt;link href="0.95/running.html#memory"&gt;FOP Memory&lt;/link&gt;.
         &lt;/p&gt;
       &lt;/answer&gt;
     &lt;/faq&gt;
@@ -302,7 +304,7 @@
         &lt;p&gt;
           If you use XSLT, problems in your style sheet and in your
           source XML also can produce a NullPointerException. &lt;link
-          href="0.94/running.html#check-input"&gt;Run the transformation
+          href="0.95/running.html#check-input"&gt;Run the transformation
           separately&lt;/link&gt; to check for this, usually you'll get a
           detailed error message from the XSLT processor.
         &lt;/p&gt;
@@ -380,7 +382,7 @@
         &lt;/p&gt;
         &lt;p&gt;
           Try also setting the &lt;link
-          href="0.94/configuration.html#general-elements"&gt;font-base
+          href="0.95/configuration.html#general-elements"&gt;font-base
           configuration&lt;/link&gt;.
         &lt;/p&gt;
       &lt;/answer&gt;
@@ -439,12 +441,11 @@
           So this failure doesn't break anything.
         &lt;/p&gt;
         &lt;p&gt;
-           To avoid the warning you can simply delete the
-           old Font Cache file, which according to [1] lives in ${base}\conf\font.cache.
-           Or you can disable Font Caching altogether using the option "use-cache"
-        &lt;/p&gt;
-        &lt;p&gt;
-          [1] http://xmlgraphics.apache.org/fop/0.94/configuration.html#general-elements
+          To avoid the warning you can simply delete the
+          old Font Cache file, which lives in ${base}\conf\font.cache (see &lt;link
+          href="0.95/configuration.html#general-elements"&gt;font-base
+          configuration&lt;/link&gt;). Or you can disable Font Caching altogether using
+          the option "use-cache."
         &lt;/p&gt;
       &lt;/answer&gt;
     &lt;/faq&gt;
@@ -452,7 +453,7 @@
   &lt;part id="part-output"&gt;
     &lt;title&gt;Problems with FOP output&lt;/title&gt;
     &lt;faq id="leader-expansion"&gt;
-      &lt;question&gt;Leaders don't work anymore in 0.94. Instead of
+      &lt;question&gt;Leaders don't work anymore in 0.94 or later. Instead of
       filling the line, only three dots or a short ruler is
       output.&lt;/question&gt;
       &lt;answer&gt;
@@ -533,7 +534,7 @@
         &lt;p&gt;Other possibilities:&lt;/p&gt;
         &lt;ul&gt;
           &lt;li&gt;The image format is not supported or not supported completely.
-          See &lt;link href="0.94/graphics.html"&gt;FOP Graphics Formats&lt;/link&gt; for
a
+          See &lt;link href="0.95/graphics.html"&gt;FOP Graphics Formats&lt;/link&gt; for
a
           list of supported formats and related issues.&lt;/li&gt;
           &lt;li&gt;The graphic may be too large to fit into the intended space.&lt;/li&gt;
           &lt;li&gt;There may be something (static content) that is obscuring the
@@ -545,14 +546,14 @@
     &lt;faq id="png-fails"&gt;
       &lt;question&gt;My graphical images do not work properly.&lt;/question&gt;
       &lt;answer&gt;
-        &lt;p&gt;See &lt;link href="0.94/graphics.html"&gt;FOP Graphics Formats&lt;/link&gt;
for a
+        &lt;p&gt;See &lt;link href="0.95/graphics.html"&gt;FOP Graphics Formats&lt;/link&gt;
for a
         list of supported graphics formats and related issues.&lt;/p&gt;
       &lt;/answer&gt;
     &lt;/faq&gt;
     &lt;faq id="graphic-resolution"&gt;
       &lt;question&gt;Why is my graphic rendered at a different resolution than it was created?&lt;/question&gt;
       &lt;answer&gt;
-        &lt;p&gt;See &lt;link href="0.94/graphics.html#resolution"&gt;Graphics Resolution&lt;/link&gt;.&lt;/p&gt;
+        &lt;p&gt;See &lt;link href="0.95/graphics.html#resolution"&gt;Graphics Resolution&lt;/link&gt;.&lt;/p&gt;
       &lt;/answer&gt;
     &lt;/faq&gt;
     &lt;faq id="keep-with"&gt;
@@ -560,8 +561,14 @@
       don't work.&lt;/question&gt;
       &lt;answer&gt;
         &lt;p&gt;
-          These properties are not implemented on version 0.20.5 and earlier, except on table
rows. In
-          order to take advantage of them, you have to nest stuff to be
+          These properties are not implemented on version 0.20.5 and earlier,
+          except on table rows. More recent FOP releases have extensive support for
+          these properties. The current release, FOP 0.95, still supports the
+          values "always" and "never" only, no numerical values. There may be
+          a few places where keep-* still don't work, this should be very rare.
+        &lt;/p&gt;
+        &lt;p&gt;
+          If you still have to use FOP 0.20.5, you have to nest stuff to be
           kept together in a table.
         &lt;/p&gt;
         &lt;p&gt;
@@ -705,7 +712,7 @@
       &lt;answer&gt;
         &lt;p&gt;Make sure you have set the language and optionally the country attributes
for an appropriate XSL-FO element (fo:page-sequence, fo:block or fo:character):&lt;/p&gt;
         &lt;source&gt;&lt;![CDATA[&lt;fo:page-sequence language="fi"&gt;]]&gt;&lt;/source&gt;
-        &lt;p&gt;See &lt;link href="0.94/hyphenation.html#support"&gt;Hyphenation Support&lt;/link&gt;
for details and instructions on using hyphenation with FOP.&lt;/p&gt;
+        &lt;p&gt;See &lt;link href="0.95/hyphenation.html#support"&gt;Hyphenation Support&lt;/link&gt;
for details and instructions on using hyphenation with FOP.&lt;/p&gt;
         &lt;p&gt;Explicitly enable hyphenation for an appropriate XSL-FO element (fo:block,
fo:character):&lt;/p&gt;
         &lt;source&gt;&lt;![CDATA[&lt;fo:block hyphenate="true"&gt;]]&gt;&lt;/source&gt;
       &lt;/answer&gt;
@@ -751,7 +758,7 @@
       &lt;question&gt;How do I use FOP in a servlet?&lt;/question&gt;
       &lt;answer&gt;
         &lt;p&gt;
-          See &lt;link href="0.94/servlets.html"&gt;Using FOP in a Servlet&lt;/link&gt;.
+          See &lt;link href="0.95/servlets.html"&gt;Using FOP in a Servlet&lt;/link&gt;.
         &lt;/p&gt;
       &lt;/answer&gt;
     &lt;/faq&gt;
@@ -760,7 +767,7 @@
       transformation?&lt;/question&gt;
       &lt;answer&gt;
         &lt;p&gt;
-          See &lt;link href="0.94/servlets.html#xslt"&gt;Using FOP in a Servlet with XSLT
Transformation&lt;/link&gt;.
+          See &lt;link href="0.95/servlets.html#xslt"&gt;Using FOP in a Servlet with XSLT
Transformation&lt;/link&gt;.
         &lt;/p&gt;
       &lt;/answer&gt;
     &lt;/faq&gt;
@@ -768,7 +775,7 @@
       &lt;question&gt;How do I pass parameters to the XSLT transformation?&lt;/question&gt;
       &lt;answer&gt;
         &lt;p&gt;
-          See &lt;link href="0.94/servlets.html#xslt"&gt;Using FOP in a Servlet with XSLT
Transformation&lt;/link&gt;.
+          See &lt;link href="0.95/servlets.html#xslt"&gt;Using FOP in a Servlet with XSLT
Transformation&lt;/link&gt;.
         &lt;/p&gt;
       &lt;/answer&gt;
     &lt;/faq&gt;
@@ -786,7 +793,7 @@
       &lt;question&gt;How do I set the baseDir property in a servlet environment?&lt;/question&gt;
       &lt;answer&gt;
         &lt;p&gt;
-          See &lt;link href="0.94/embedding.html#config-internal"&gt;Setting the Configuration
Programmatically&lt;/link&gt;.
+          See &lt;link href="0.95/embedding.html#config-internal"&gt;Setting the Configuration
Programmatically&lt;/link&gt;.
         &lt;/p&gt;
       &lt;/answer&gt;
     &lt;/faq&gt;
@@ -794,7 +801,7 @@
       &lt;question&gt;How do I use a user configuration file from a servlet?&lt;/question&gt;
       &lt;answer&gt;
         &lt;p&gt;
-          See &lt;link href="0.94/embedding.html#config-external"&gt;Using a Configuration
File in an Embedded App&lt;/link&gt;.
+          See &lt;link href="0.95/embedding.html#config-external"&gt;Using a Configuration
File in an Embedded App&lt;/link&gt;.
         &lt;/p&gt;
       &lt;/answer&gt;
     &lt;/faq&gt;
@@ -803,7 +810,7 @@
         get FOP working for various servlet engines?&lt;/question&gt;
       &lt;answer&gt;
         &lt;p&gt;
-          See &lt;link href="0.94/servlets.html#servlet-engine"&gt;Servlet Engines&lt;/link&gt;.
+          See &lt;link href="0.95/servlets.html#servlet-engine"&gt;Servlet Engines&lt;/link&gt;.
         &lt;/p&gt;
       &lt;/answer&gt;
     &lt;/faq&gt;
@@ -811,7 +818,7 @@
       &lt;question&gt;Can FOP be used in multithreaded environments?&lt;/question&gt;
       &lt;answer&gt;
         &lt;p&gt;
-          See &lt;link href="0.94/embedding.html#multithreading"&gt;Multithreading FOP&lt;/link&gt;.
+          See &lt;link href="0.95/embedding.html#multithreading"&gt;Multithreading FOP&lt;/link&gt;.
         &lt;/p&gt;
       &lt;/answer&gt;
     &lt;/faq&gt;
@@ -822,13 +829,13 @@
       &lt;question&gt;The rendering of SVG text in my PDF is of poor quality.
 Can I control this?&lt;/question&gt;
       &lt;answer&gt;
-        &lt;p&gt;See &lt;link href="0.94/graphics.html#svg-pdf-text"&gt;Placing SVG Text
into PDF&lt;/link&gt;.&lt;/p&gt;
+        &lt;p&gt;See &lt;link href="0.95/graphics.html#svg-pdf-text"&gt;Placing SVG Text
into PDF&lt;/link&gt;.&lt;/p&gt;
       &lt;/answer&gt;
     &lt;/faq&gt;
     &lt;faq id="svg-headless"&gt;
       &lt;question&gt;How do I use FOP with SVG on headless servers?&lt;/question&gt;
       &lt;answer&gt;
-        &lt;p&gt;See &lt;link href="0.94/graphics.html#batik"&gt;FOP: Graphics (Batik)&lt;/link&gt;.&lt;/p&gt;
+        &lt;p&gt;See &lt;link href="0.95/graphics.html#batik"&gt;FOP: Graphics (Batik)&lt;/link&gt;.&lt;/p&gt;
       &lt;/answer&gt;
     &lt;/faq&gt;
     &lt;faq id="svghangs"&gt;
@@ -891,7 +898,7 @@
     &lt;faq id="svg-scaling"&gt;
       &lt;question&gt;Why is my SVG rendered at a size different from that specified in my
fo:external-graphic element?&lt;/question&gt;
       &lt;answer&gt;
-        &lt;p&gt;See &lt;link href="0.94/graphics.html#svg-scaling"&gt;SVG Scaling&lt;/link&gt;.&lt;/p&gt;
+        &lt;p&gt;See &lt;link href="0.95/graphics.html#svg-scaling"&gt;SVG Scaling&lt;/link&gt;.&lt;/p&gt;
       &lt;/answer&gt;
     &lt;/faq&gt;
     &lt;faq id="svg-attribute-required"&gt;
@@ -924,7 +931,7 @@
       &lt;question&gt;How do I embed fonts in PDF?&lt;/question&gt;
       &lt;answer&gt;
         &lt;p&gt;
-          See the &lt;link href="0.94/fonts.html"&gt;Fonts&lt;/link&gt; page for information
+          See the &lt;link href="0.95/fonts.html"&gt;Fonts&lt;/link&gt; page for information
           about embedding fonts.
         &lt;/p&gt;
       &lt;/answer&gt;
@@ -943,7 +950,7 @@
           set. For a variety of reasons, even those are not completely
           guaranteed to work, for example you can't use the fi
           ligature from the standard serif font. Check the &lt;link
-          href="0.94/output.html#pdf-fonts"&gt;overview&lt;/link&gt; for the default
+          href="0.95/output.html#pdf-fonts"&gt;overview&lt;/link&gt; for the default
           PDF fonts.
         &lt;/p&gt;
         &lt;p&gt;
@@ -951,7 +958,7 @@
           the desired character. Furthermore the font must be
           available on the machine where the PDF is viewed or it must
           have been embedded in the PDF file. See &lt;link
-          href="0.94/fonts.html"&gt;embedding fonts&lt;/link&gt;.
+          href="0.95/fonts.html"&gt;embedding fonts&lt;/link&gt;.
         &lt;/p&gt;
         &lt;p&gt;
           For most symbols, it is better to select the symbol font
@@ -969,7 +976,7 @@
     &lt;faq id="pdf-postprocess"&gt;
       &lt;question&gt;What tools are available for post-processing my PDF document?&lt;/question&gt;
       &lt;answer&gt;
-        &lt;p&gt;See &lt;link href="0.94/output.html#pdf-postprocess"&gt;PDF Post-processing&lt;/link&gt;.&lt;/p&gt;
+        &lt;p&gt;See &lt;link href="0.95/output.html#pdf-postprocess"&gt;PDF Post-processing&lt;/link&gt;.&lt;/p&gt;
       &lt;/answer&gt;
     &lt;/faq&gt;
     &lt;faq id="pdf-security"&gt;
@@ -977,8 +984,8 @@
       to my PDF document?&lt;/question&gt;
       &lt;answer&gt;
         &lt;p&gt;
-          See &lt;link href="0.94/pdfencryption.html"&gt;PDF Encryption&lt;/link&gt;.
-          See also &lt;link href="0.94/output.html#pdf-postprocess"&gt;PDF Post-processing&lt;/link&gt;.
+          See &lt;link href="0.95/pdfencryption.html"&gt;PDF Encryption&lt;/link&gt;.
+          See also &lt;link href="0.95/output.html#pdf-postprocess"&gt;PDF Post-processing&lt;/link&gt;.
         &lt;/p&gt;
       &lt;/answer&gt;
     &lt;/faq&gt;
@@ -986,13 +993,13 @@
       &lt;question&gt;How do I add document properties (title, author, etc.) to my
       PDF document?&lt;/question&gt;
       &lt;answer&gt;
-        &lt;p&gt;See &lt;link href="0.94/output.html#pdf-postprocess"&gt;PDF Post-processing&lt;/link&gt;.&lt;/p&gt;
+        &lt;p&gt;See &lt;link href="0.95/output.html#pdf-postprocess"&gt;PDF Post-processing&lt;/link&gt;.&lt;/p&gt;
       &lt;/answer&gt;
     &lt;/faq&gt;
     &lt;faq id="pdf-watermark"&gt;
       &lt;question&gt;How do I add watermarks to my PDF document?&lt;/question&gt;
       &lt;answer&gt;
-        &lt;p&gt;See &lt;link href="0.94/output.html#pdf-watermark"&gt;PDF Watermarks&lt;/link&gt;.&lt;/p&gt;
+        &lt;p&gt;See &lt;link href="0.95/output.html#pdf-watermark"&gt;PDF Watermarks&lt;/link&gt;.&lt;/p&gt;
       &lt;/answer&gt;
     &lt;/faq&gt;
     &lt;faq id="pdf-print-contortion"&gt;
@@ -1028,7 +1035,7 @@
       &lt;answer&gt;
         &lt;p&gt;
           This is a problem of Internet Explorer requesting the content several
-          times. Please see the &lt;link href="0.94/servlets.html#ie"&gt;notes on Internet
Explorer&lt;/link&gt;
+          times. Please see the &lt;link href="0.95/servlets.html#ie"&gt;notes on Internet
Explorer&lt;/link&gt;
           for more information.
         &lt;/p&gt;
       &lt;/answer&gt;
@@ -1315,8 +1322,10 @@
             bugs and processor specific APIs. Note that JDK 1.4 comes with an
             XML parser and an XSLT processor which are older versions of
             Xerces and Xalan, respectively, and both have a number of annoying
-            bugs. See $$$FIXME on how to use more recent versions or other
-            packages instead.
+            bugs. See http://java.sun.com/developer/EJTechTips/2003/tt0311.html
+            and http://java.sun.com/j2se/1.4.2/docs/guide/standards/ (or similar
+            pages for later Java releases) for some hints on how to use more
+            recent versions or other packages instead.
           &lt;/li&gt;
           &lt;li&gt;
             Problems with servlet containers should be asked on the vendor
@@ -1325,7 +1334,7 @@
           &lt;li&gt;
             More general questions regarding Java, including deployment, Java
             APIs, classpath issues and property definitions should be redirected
-            to some Java specific list.
+            to an appropriate Java specific list.
           &lt;/li&gt;
         &lt;/ul&gt;
       &lt;/answer&gt;



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



</pre>
</div>
</content>
</entry>
<entry>
<title>svn commit: r833375 - in /xmlgraphics/fop/trunk/src/java/org/apache/fop/pdf: PDFDictionary.java PDFName.java</title>
<author><name>jeremias@apache.org</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/xmlgraphics-fop-commits/200911.mbox/%3c20091106122550.BBEC123888E2@eris.apache.org%3e"/>
<id>urn:uuid:%3c20091106122550-BBEC123888E2@eris-apache-org%3e</id>
<updated>2009-11-06T12:25:50Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Author: jeremias
Date: Fri Nov  6 12:25:50 2009
New Revision: 833375

URL: http://svn.apache.org/viewvc?rev=833375&amp;view=rev
Log:
Bugfix: need to properly escape the PDF names in a dictionary (bug triggered by my PDF plug-in)

Modified:
    xmlgraphics/fop/trunk/src/java/org/apache/fop/pdf/PDFDictionary.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/pdf/PDFName.java

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/pdf/PDFDictionary.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/pdf/PDFDictionary.java?rev=833375&amp;r1=833374&amp;r2=833375&amp;view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/pdf/PDFDictionary.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/pdf/PDFDictionary.java Fri Nov  6 12:25:50
2009
@@ -133,8 +133,7 @@
             } else {
                 writer.write("\n  ");
             }
-            writer.write('/');
-            writer.write(key);
+            writer.write(PDFName.escapeName(key));
             writer.write(' ');
             Object obj = this.entries.get(key);
             formatObject(obj, out, writer);

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/pdf/PDFName.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/pdf/PDFName.java?rev=833375&amp;r1=833374&amp;r2=833375&amp;view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/pdf/PDFName.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/pdf/PDFName.java Fri Nov  6 12:25:50 2009
@@ -42,7 +42,12 @@
     }
 
 
-    private static String escapeName(String name) {
+    /**
+     * Escapes a PDF name. It adds the leading slash and escapes characters as necessary.
+     * @param name the name
+     * @return the escaped name
+     */
+    static String escapeName(String name) {
         StringBuffer sb = new StringBuffer(Math.min(16, name.length() + 4));
         if (!name.startsWith("/")) {
             sb.append('/');



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



</pre>
</div>
</content>
</entry>
<entry>
<title>=?utf-8?q?=5BXmlgraphics-fop_Wiki=5D_Trivial_Update_of_=22AFPResources=22?= =?utf-8?q?_by_JeremiasMaerki?=</title>
<author><name>Apache Wiki &lt;wikidiffs@apache.org&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/xmlgraphics-fop-commits/200911.mbox/%3c20091103153400.9496.89340@eos.apache.org%3e"/>
<id>urn:uuid:%3c20091103153400-9496-89340@eos-apache-org%3e</id>
<updated>2009-11-03T15:34:00Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Xmlgraphics-fop Wiki" for change notification.

The "AFPResources" page has been changed by JeremiasMaerki.
The comment on this change is: An additional free viewer popped up.
http://wiki.apache.org/xmlgraphics-fop/AFPResources?action=diff&amp;rev1=6&amp;rev2=7

--------------------------------------------------

  
  From there its easy to get the rest. Open the PDF and in the section Related Publications
the other relevant specifications are listed. Search for them on the above mentioned web site
by Order Number and download them one by one.
  
- For those who don't have access to an IBM AFP environment it is very difficult to verify
the correctness of any generated MO``:DCA document. Two free tools are available to help.
+ For those who don't have access to an IBM AFP environment it is very difficult to verify
the correctness of any generated MO``:DCA document. Some free tools are available to help.
  
   * The AFP Viewer Internet Explorer plug-in allows viewing of .afp in your browser. It can
be found by going to http://www.ibm.com and then enter "AFP Viewer" into the Search box at
the top. The first returned result should point to a page from where the viewer can be downloaded.
  
@@ -37, +37 @@

  
   * [[http://www.btbnet.de/wps/portal/AFP-Tools|BTB Browser]] is another AFP viewer which
is probably better suited for preview than IBM's tools as it doesn't replace bitmap fonts
with platform fonts. It also has a good AFP decoder useful for debugging.
  
+  * [[http://www.isis-papyrus.com/e/pages/forms/2/afpviewerdlrequest.html|ISIS Papyrus Viewer]]
has recently been made available for free. It is implemented as a browser plug-in.
+ 
  == Tips for developing with AFP ==
  
  MO``:DCA &amp; Co. have grown over time but the specifications usually don't tell if a particular
feature is an old or new feature. There are still a lot of AFP/IPDS environments around which
only support a very old version and only bi-level printing. Relying on just the AFP Workbench
has proven to be insufficient as this viewer supports a lot of features and is quite lenient
about what you do in AFP. Furthermore, fonts are painted using operating system outline fonts
even if you specify bitmap fonts in your print files. Obviously, the best way to test is having
an older IPDS laser printer around but there you have the problem that you get non-helpful
error messages if something's wrong. Additional, unfortunately commercial, viewer applications
can help further during debugging. AFP dumpers like AFPAN (see above) are also a very important
source for information. It is quite sensitive to mistakes. Rule number one: Test in as many
environments as possible. No single tool will be able to tell you that the file you produced
is correct and works in most environments.

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



</pre>
</div>
</content>
</entry>
<entry>
<title>svn commit: r830996 - in /xmlgraphics/fop/trunk: src/java/org/apache/fop/layoutmgr/table/ActiveCell.java status.xml test/layoutengine/standard-testcases/table_conditional-space.xml</title>
<author><name>vhennebert@apache.org</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/xmlgraphics-fop-commits/200910.mbox/%3c20091029151311.D0498238888D@eris.apache.org%3e"/>
<id>urn:uuid:%3c20091029151311-D0498238888D@eris-apache-org%3e</id>
<updated>2009-10-29T15:13:11Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Author: vhennebert
Date: Thu Oct 29 15:13:11 2009
New Revision: 830996

URL: http://svn.apache.org/viewvc?rev=830996&amp;view=rev
Log:
Bugzilla #48082: value of conditional space not always taken into account in the calculation
of a table's height

Added:
    xmlgraphics/fop/trunk/test/layoutengine/standard-testcases/table_conditional-space.xml
  (with props)
Modified:
    xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/table/ActiveCell.java
    xmlgraphics/fop/trunk/status.xml

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/table/ActiveCell.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/table/ActiveCell.java?rev=830996&amp;r1=830995&amp;r2=830996&amp;view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/table/ActiveCell.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/table/ActiveCell.java Thu Oct
29 15:13:11 2009
@@ -398,7 +398,9 @@
     private void increaseCurrentStep(int limit) {
         if (nextStep.end &lt; elementList.size() - 1) {
             while (afterNextStep.totalLength &lt;= limit &amp;&amp; nextStep.breakClass ==
Constants.EN_AUTO) {
+                int condBeforeContentLength = nextStep.condBeforeContentLength;
                 nextStep.set(afterNextStep);
+                nextStep.condBeforeContentLength = condBeforeContentLength;
                 if (afterNextStep.end &gt;= elementList.size() - 1) {
                     break;
                 }

Modified: xmlgraphics/fop/trunk/status.xml
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/status.xml?rev=830996&amp;r1=830995&amp;r2=830996&amp;view=diff
==============================================================================
--- xmlgraphics/fop/trunk/status.xml (original)
+++ xmlgraphics/fop/trunk/status.xml Thu Oct 29 15:13:11 2009
@@ -58,6 +58,10 @@
       documents. Example: the fix of marks layering will be such a case when it's done.
     --&gt;
     &lt;release version="FOP Trunk" date="TBD"&gt;
+      &lt;action context="Layout" dev="VH" type="fix" fixes-bug="48082"&gt;
+        Bugfix: value of conditional space not always taken into account in the calculation
of a 
+        tableâs height.
+      &lt;/action&gt;
       &lt;action context="Renderers" dev="JM,VH" type="add" fixes-bug="46705" due-to="Jost
Klopfstein"&gt;
         Added basic accessibility and Tagged PDF support. 
       &lt;/action&gt;

Added: xmlgraphics/fop/trunk/test/layoutengine/standard-testcases/table_conditional-space.xml
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/test/layoutengine/standard-testcases/table_conditional-space.xml?rev=830996&amp;view=auto
==============================================================================
--- xmlgraphics/fop/trunk/test/layoutengine/standard-testcases/table_conditional-space.xml
(added)
+++ xmlgraphics/fop/trunk/test/layoutengine/standard-testcases/table_conditional-space.xml
Thu Oct 29 15:13:11 2009
@@ -0,0 +1,65 @@
+&lt;?xml version="1.0" encoding="UTF-8"?&gt;
+&lt;!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You 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.
+--&gt;
+&lt;!-- $Id$ --&gt;
+&lt;testcase&gt;
+  &lt;info&gt;
+    &lt;p&gt;
+      Bugzilla #48082: in some cases the value of a conditional space is not taken into account
in 
+      the calculation of the table height.
+    &lt;/p&gt;
+  &lt;/info&gt;
+  &lt;fo&gt;
+    &lt;fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format"&gt;
+      &lt;fo:layout-master-set&gt;
+        &lt;fo:simple-page-master master-name="page" page-height="120pt" page-width="220pt"&gt;
+          &lt;fo:region-body margin="10pt" background-color="#F0F0F0"/&gt;
+        &lt;/fo:simple-page-master&gt;
+      &lt;/fo:layout-master-set&gt;
+      &lt;fo:page-sequence master-reference="page" font-size="8pt" line-height="10pt"&gt;
+        &lt;fo:flow flow-name="xsl-region-body"&gt;
+          &lt;fo:table width="100%" table-layout="fixed" id="surrounding"&gt;
+            &lt;fo:table-body&gt;
+              &lt;fo:table-row&gt;
+                &lt;fo:table-cell background-color="blue"&gt;
+                  &lt;fo:block padding-after="20pt" background-color="yellow"&gt;Cell 1 Line
1&lt;/fo:block&gt;
+                &lt;/fo:table-cell&gt;
+                &lt;fo:table-cell&gt;
+                  &lt;fo:block background-color="pink"&gt;
+                    &lt;fo:block space-after="7pt"&gt;Cell 2 Line 1&lt;/fo:block&gt;
+                  &lt;/fo:block&gt;
+                  &lt;fo:block background-color="orange"&gt;
+                    &lt;fo:block&gt;Cell 2 Line 2&lt;/fo:block&gt;
+                    &lt;fo:block&gt;Cell 2 Line 3&lt;/fo:block&gt;
+                  &lt;/fo:block&gt;
+                &lt;/fo:table-cell&gt;
+              &lt;/fo:table-row&gt;
+            &lt;/fo:table-body&gt;
+          &lt;/fo:table&gt;
+        &lt;/fo:flow&gt;
+      &lt;/fo:page-sequence&gt;
+    &lt;/fo:root&gt;
+  &lt;/fo&gt;
+  &lt;checks&gt;
+    &lt;eval expected="37000" xpath="//flow/block/@bpd"/&gt;
+    &lt;eval expected="37000" xpath="//flow/block/block[1]/@bpd"/&gt;
+    &lt;eval expected="30000" xpath="//flow/block/block[1]/block/@bpda"/&gt;
+    &lt;eval expected="37000" xpath="//flow/block/block[2]/@bpd"/&gt;
+    &lt;eval expected="17000" xpath="//flow/block/block[2]/block[1]/@bpd"/&gt;
+    &lt;eval expected="20000" xpath="//flow/block/block[2]/block[2]/@bpd"/&gt;
+  &lt;/checks&gt;
+&lt;/testcase&gt;

Propchange: xmlgraphics/fop/trunk/test/layoutengine/standard-testcases/table_conditional-space.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: xmlgraphics/fop/trunk/test/layoutengine/standard-testcases/table_conditional-space.xml
------------------------------------------------------------------------------
    svn:keywords = Revision Id



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



</pre>
</div>
</content>
</entry>
<entry>
<title>svn commit: r830929 - in /xmlgraphics/fop/trunk/src: documentation/content/xdocs/trunk/ java/org/apache/fop/afp/modca/triplets/ java/org/apache/fop/render/afp/ java/org/apache/fop/render/afp/extensions/</title>
<author><name>maxberger@apache.org</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/xmlgraphics-fop-commits/200910.mbox/%3c20091029131936.9289823888E5@eris.apache.org%3e"/>
<id>urn:uuid:%3c20091029131936-9289823888E5@eris-apache-org%3e</id>
<updated>2009-10-29T13:19:36Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Author: maxberger
Date: Thu Oct 29 13:19:36 2009
New Revision: 830929

URL: http://svn.apache.org/viewvc?rev=830929&amp;view=rev
Log:
Fixed SVN Props

Modified:
    xmlgraphics/fop/trunk/src/documentation/content/xdocs/trunk/accessibility.xml   (props
changed)
    xmlgraphics/fop/trunk/src/java/org/apache/fop/afp/modca/triplets/AttributeQualifierTriplet.java
  (props changed)
    xmlgraphics/fop/trunk/src/java/org/apache/fop/afp/modca/triplets/AttributeValueTriplet.java
  (props changed)
    xmlgraphics/fop/trunk/src/java/org/apache/fop/afp/modca/triplets/Triplet.java   (props
changed)
    xmlgraphics/fop/trunk/src/java/org/apache/fop/render/afp/AFPEventProducer.xml   (props
changed)
    xmlgraphics/fop/trunk/src/java/org/apache/fop/render/afp/extensions/AFPPageOverlay.java
  (contents, props changed)
    xmlgraphics/fop/trunk/src/java/org/apache/fop/render/afp/extensions/AFPPageOverlayElement.java
  (contents, props changed)

Propchange: xmlgraphics/fop/trunk/src/documentation/content/xdocs/trunk/accessibility.xml
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Thu Oct 29 13:19:36 2009
@@ -1 +1 @@
-Id
+Revision Id

Propchange: xmlgraphics/fop/trunk/src/java/org/apache/fop/afp/modca/triplets/AttributeQualifierTriplet.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: xmlgraphics/fop/trunk/src/java/org/apache/fop/afp/modca/triplets/AttributeQualifierTriplet.java
------------------------------------------------------------------------------
    svn:keywords = Id

Propchange: xmlgraphics/fop/trunk/src/java/org/apache/fop/afp/modca/triplets/AttributeValueTriplet.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: xmlgraphics/fop/trunk/src/java/org/apache/fop/afp/modca/triplets/AttributeValueTriplet.java
------------------------------------------------------------------------------
    svn:keywords = Id

Propchange: xmlgraphics/fop/trunk/src/java/org/apache/fop/afp/modca/triplets/Triplet.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: xmlgraphics/fop/trunk/src/java/org/apache/fop/afp/modca/triplets/Triplet.java
------------------------------------------------------------------------------
    svn:keywords = Id

Propchange: xmlgraphics/fop/trunk/src/java/org/apache/fop/render/afp/AFPEventProducer.xml
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Thu Oct 29 13:19:36 2009
@@ -1 +1 @@
-Id
+Revision Id

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/render/afp/extensions/AFPPageOverlay.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/render/afp/extensions/AFPPageOverlay.java?rev=830929&amp;r1=830928&amp;r2=830929&amp;view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/render/afp/extensions/AFPPageOverlay.java
(original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/render/afp/extensions/AFPPageOverlay.java
Thu Oct 29 13:19:36 2009
@@ -1,107 +1,107 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You 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: AFPIncludeFormMap.java 798207 2009-07-27 16:33:01Z jeremias $ */
-
-package org.apache.fop.render.afp.extensions;
-
-import java.net.URI;
-
-import org.xml.sax.ContentHandler;
-import org.xml.sax.SAXException;
-import org.xml.sax.helpers.AttributesImpl;
-
-import org.apache.fop.fo.extensions.ExtensionAttachment;
-
-/**
- * This extension allows to include an AFP Page Overlay resource. It is implemented as an
extension
- * attachment ({@link ExtensionAttachment}).
- */
-public class AFPPageOverlay extends AFPExtensionAttachment {
-
-    private static final long serialVersionUID = 8548056652642588919L;
-
-    /** X coordinate attribute */
-    protected static final String ATT_X = "X";
-    /** X coordinate attribute */
-    protected static final String ATT_Y = "Y";
-
-    /**
-     * The x coordinate
-     */
-    private int x = 0;
-
-    /**
-     * The y coordinate
-     */
-    private int y = 0;
-
-    /**
-     * Default constructor.
-     */
-    public AFPPageOverlay() {
-        super(AFPElementMapping.INCLUDE_PAGE_OVERLAY);
-    }
-
-    /**
-     * returns X coordinate
-     * @return x integer
-     */
-    public int getX() {
-        return x;
-    }
-
-    /**
-     * Sets the X coordinate
-     * @param x The integer to be set.
-     */
-    public void setX(int x) {
-        this.x = x;
-    }
-
-    /**
-     * returns Y coordinate
-     * @return y integer
-     */
-    public int getY() {
-        return y;
-    }
-
-    /**
-     * Sets the Y coordinate
-     * @param y The integer to be set.
-     */
-    public void setY(int y) {
-        this.y = y;
-    }
-
-    /** {@inheritDoc} */
-    public void toSAX(ContentHandler handler) throws SAXException {
-        AttributesImpl atts = new AttributesImpl();
-        if (name != null &amp;&amp; name.length() &gt; 0) {
-            atts.addAttribute(null, ATT_NAME, ATT_NAME, "CDATA", name);
-        }
-        handler.startElement(CATEGORY, elementName, elementName, atts);
-        handler.endElement(CATEGORY, elementName, elementName);
-    }
-
-    /** {@inheritDoc} */
-    public String toString() {
-        return getClass().getName() + "(element-name=" + getElementName()
-            + " name=" + getName() + " x=" + getX() + " y=" + getY() + ")";
-    }
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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 org.apache.fop.render.afp.extensions;
+
+import java.net.URI;
+
+import org.xml.sax.ContentHandler;
+import org.xml.sax.SAXException;
+import org.xml.sax.helpers.AttributesImpl;
+
+import org.apache.fop.fo.extensions.ExtensionAttachment;
+
+/**
+ * This extension allows to include an AFP Page Overlay resource. It is implemented as an
extension
+ * attachment ({@link ExtensionAttachment}).
+ */
+public class AFPPageOverlay extends AFPExtensionAttachment {
+
+    private static final long serialVersionUID = 8548056652642588919L;
+
+    /** X coordinate attribute */
+    protected static final String ATT_X = "X";
+    /** X coordinate attribute */
+    protected static final String ATT_Y = "Y";
+
+    /**
+     * The x coordinate
+     */
+    private int x = 0;
+
+    /**
+     * The y coordinate
+     */
+    private int y = 0;
+
+    /**
+     * Default constructor.
+     */
+    public AFPPageOverlay() {
+        super(AFPElementMapping.INCLUDE_PAGE_OVERLAY);
+    }
+
+    /**
+     * returns X coordinate
+     * @return x integer
+     */
+    public int getX() {
+        return x;
+    }
+
+    /**
+     * Sets the X coordinate
+     * @param x The integer to be set.
+     */
+    public void setX(int x) {
+        this.x = x;
+    }
+
+    /**
+     * returns Y coordinate
+     * @return y integer
+     */
+    public int getY() {
+        return y;
+    }
+
+    /**
+     * Sets the Y coordinate
+     * @param y The integer to be set.
+     */
+    public void setY(int y) {
+        this.y = y;
+    }
+
+    /** {@inheritDoc} */
+    public void toSAX(ContentHandler handler) throws SAXException {
+        AttributesImpl atts = new AttributesImpl();
+        if (name != null &amp;&amp; name.length() &gt; 0) {
+            atts.addAttribute(null, ATT_NAME, ATT_NAME, "CDATA", name);
+        }
+        handler.startElement(CATEGORY, elementName, elementName, atts);
+        handler.endElement(CATEGORY, elementName, elementName);
+    }
+
+    /** {@inheritDoc} */
+    public String toString() {
+        return getClass().getName() + "(element-name=" + getElementName()
+            + " name=" + getName() + " x=" + getX() + " y=" + getY() + ")";
+    }
+}

Propchange: xmlgraphics/fop/trunk/src/java/org/apache/fop/render/afp/extensions/AFPPageOverlay.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: xmlgraphics/fop/trunk/src/java/org/apache/fop/render/afp/extensions/AFPPageOverlay.java
------------------------------------------------------------------------------
    svn:keywords = Id

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/render/afp/extensions/AFPPageOverlayElement.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/render/afp/extensions/AFPPageOverlayElement.java?rev=830929&amp;r1=830928&amp;r2=830929&amp;view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/render/afp/extensions/AFPPageOverlayElement.java
(original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/render/afp/extensions/AFPPageOverlayElement.java
Thu Oct 29 13:19:36 2009
@@ -1,97 +1,97 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You 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: AFPPageSetupElement.java 798207 2009-07-27 16:33:01Z jeremias $ */
-
-package org.apache.fop.render.afp.extensions;
-
-import org.xml.sax.Attributes;
-import org.xml.sax.Locator;
-
-import org.apache.fop.apps.FOPException;
-import org.apache.fop.fo.Constants;
-import org.apache.fop.fo.FONode;
-import org.apache.fop.fo.PropertyList;
-import org.apache.fop.fo.extensions.ExtensionAttachment;
-import org.apache.fop.afp.AFPPaintingState;
-import org.apache.fop.afp.AFPUnitConverter;
-import org.apache.xmlgraphics.util.UnitConv;
-
-/**
- * This class extends the org.apache.fop.render.afp.extensions.AbstractAFPExtensionObject
class.
- * This object will be used to map the page overlay object in  AFPElementMapping.
- * &lt;p/&gt;
- */
-public class AFPPageOverlayElement extends AbstractAFPExtensionObject {
-
-    private static final String ATT_X = "x";
-    private static final String ATT_Y = "y";
-
-    /**
-     * Constructs an AFP object (called by Maker).
-     *
-     * @param parent the parent formatting object
-     * @param name the name of the afp element
-     */
-    public AFPPageOverlayElement(FONode parent, String name) {
-        super(parent, name);
-    }
-
-    private AFPPageOverlay getPageSetupAttachment() {
-        return (AFPPageOverlay)getExtensionAttachment();
-    }
-
-    /** {@inheritDoc} */
-    protected void startOfNode() throws FOPException {
-        super.startOfNode();
-        if (AFPElementMapping.INCLUDE_PAGE_OVERLAY.equals(getLocalName())) {
-            if (parent.getNameId() != Constants.FO_SIMPLE_PAGE_MASTER
-                    &amp;&amp; parent.getNameId() != Constants.FO_PAGE_SEQUENCE) {
-                invalidChildError(getLocator(), parent.getName(), getNamespaceURI(), getName(),
-                    "rule.childOfPageSequenceOrSPM");
-            }
-        } else {
-            if (parent.getNameId() != Constants.FO_SIMPLE_PAGE_MASTER) {
-                invalidChildError(getLocator(), parent.getName(), getNamespaceURI(), getName(),
-                    "rule.childOfSPM");
-            }
-        }
-    }
-
-
-    /** {@inheritDoc} */
-    public void processNode(String elementName, Locator locator,
-                            Attributes attlist, PropertyList propertyList)
-                                throws FOPException {
-        super.processNode(elementName, locator, attlist, propertyList);
-        AFPPageOverlay pageOverlay = getPageSetupAttachment();
-        if (AFPElementMapping.INCLUDE_PAGE_OVERLAY.equals(elementName)) {
-            // convert user specific units to mpts and set the coordinates for the page overlay
-            AFPPaintingState paintingState = new AFPPaintingState();
-            AFPUnitConverter unitConverter = new AFPUnitConverter(paintingState);
-            int x = (int)unitConverter.mpt2units(UnitConv.convert(attlist.getValue(ATT_X)));
-            int y = (int)unitConverter.mpt2units(UnitConv.convert(attlist.getValue(ATT_Y)));
-            pageOverlay.setX(x);
-            pageOverlay.setY(y);
-        }
-    }
-
-    /** {@inheritDoc} */
-    protected ExtensionAttachment instantiateExtensionAttachment() {
-        return new AFPPageOverlay();
-    }
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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 org.apache.fop.render.afp.extensions;
+
+import org.xml.sax.Attributes;
+import org.xml.sax.Locator;
+
+import org.apache.fop.apps.FOPException;
+import org.apache.fop.fo.Constants;
+import org.apache.fop.fo.FONode;
+import org.apache.fop.fo.PropertyList;
+import org.apache.fop.fo.extensions.ExtensionAttachment;
+import org.apache.fop.afp.AFPPaintingState;
+import org.apache.fop.afp.AFPUnitConverter;
+import org.apache.xmlgraphics.util.UnitConv;
+
+/**
+ * This class extends the org.apache.fop.render.afp.extensions.AbstractAFPExtensionObject
class.
+ * This object will be used to map the page overlay object in  AFPElementMapping.
+ * &lt;p/&gt;
+ */
+public class AFPPageOverlayElement extends AbstractAFPExtensionObject {
+
+    private static final String ATT_X = "x";
+    private static final String ATT_Y = "y";
+
+    /**
+     * Constructs an AFP object (called by Maker).
+     *
+     * @param parent the parent formatting object
+     * @param name the name of the afp element
+     */
+    public AFPPageOverlayElement(FONode parent, String name) {
+        super(parent, name);
+    }
+
+    private AFPPageOverlay getPageSetupAttachment() {
+        return (AFPPageOverlay)getExtensionAttachment();
+    }
+
+    /** {@inheritDoc} */
+    protected void startOfNode() throws FOPException {
+        super.startOfNode();
+        if (AFPElementMapping.INCLUDE_PAGE_OVERLAY.equals(getLocalName())) {
+            if (parent.getNameId() != Constants.FO_SIMPLE_PAGE_MASTER
+                    &amp;&amp; parent.getNameId() != Constants.FO_PAGE_SEQUENCE) {
+                invalidChildError(getLocator(), parent.getName(), getNamespaceURI(), getName(),
+                    "rule.childOfPageSequenceOrSPM");
+            }
+        } else {
+            if (parent.getNameId() != Constants.FO_SIMPLE_PAGE_MASTER) {
+                invalidChildError(getLocator(), parent.getName(), getNamespaceURI(), getName(),
+                    "rule.childOfSPM");
+            }
+        }
+    }
+
+
+    /** {@inheritDoc} */
+    public void processNode(String elementName, Locator locator,
+                            Attributes attlist, PropertyList propertyList)
+                                throws FOPException {
+        super.processNode(elementName, locator, attlist, propertyList);
+        AFPPageOverlay pageOverlay = getPageSetupAttachment();
+        if (AFPElementMapping.INCLUDE_PAGE_OVERLAY.equals(elementName)) {
+            // convert user specific units to mpts and set the coordinates for the page overlay
+            AFPPaintingState paintingState = new AFPPaintingState();
+            AFPUnitConverter unitConverter = new AFPUnitConverter(paintingState);
+            int x = (int)unitConverter.mpt2units(UnitConv.convert(attlist.getValue(ATT_X)));
+            int y = (int)unitConverter.mpt2units(UnitConv.convert(attlist.getValue(ATT_Y)));
+            pageOverlay.setX(x);
+            pageOverlay.setY(y);
+        }
+    }
+
+    /** {@inheritDoc} */
+    protected ExtensionAttachment instantiateExtensionAttachment() {
+        return new AFPPageOverlay();
+    }
+}

Propchange: xmlgraphics/fop/trunk/src/java/org/apache/fop/render/afp/extensions/AFPPageOverlayElement.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: xmlgraphics/fop/trunk/src/java/org/apache/fop/render/afp/extensions/AFPPageOverlayElement.java
------------------------------------------------------------------------------
    svn:keywords = Id



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



</pre>
</div>
</content>
</entry>
<entry>
<title>svn commit: r830892 - /xmlgraphics/fop/trunk/status.xml</title>
<author><name>vhennebert@apache.org</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/xmlgraphics-fop-commits/200910.mbox/%3c20091029110336.DC46323889BA@eris.apache.org%3e"/>
<id>urn:uuid:%3c20091029110336-DC46323889BA@eris-apache-org%3e</id>
<updated>2009-10-29T11:03:36Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Author: vhennebert
Date: Thu Oct 29 11:03:36 2009
New Revision: 830892

URL: http://svn.apache.org/viewvc?rev=830892&amp;view=rev
Log:
Column keeps implementation belongs in Layout, not Renderers

Modified:
    xmlgraphics/fop/trunk/status.xml

Modified: xmlgraphics/fop/trunk/status.xml
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/status.xml?rev=830892&amp;r1=830891&amp;r2=830892&amp;view=diff
==============================================================================
--- xmlgraphics/fop/trunk/status.xml (original)
+++ xmlgraphics/fop/trunk/status.xml Thu Oct 29 11:03:36 2009
@@ -98,7 +98,7 @@
         Added limited support for pages of different inline-progression-dimensions within
a 
         page-sequence.
       &lt;/action&gt;
-      &lt;action context="Renderers" dev="AD" type="add" fixes-bug="46905"&gt;
+      &lt;action context="Layout" dev="AD" type="add" fixes-bug="46905"&gt;
         Added basic implementation for column-keeps.
       &lt;/action&gt;
       &lt;action context="Code" dev="AD" type="fix" fixes-bug="47710"&gt;



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



</pre>
</div>
</content>
</entry>
<entry>
<title>svn commit: r830654 - in /xmlgraphics/fop/trunk/src/java/org/apache/fop: events/EventFormatter.xml layoutmgr/AbstractBreaker.java layoutmgr/BlockLevelEventProducer.java</title>
<author><name>vhennebert@apache.org</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/xmlgraphics-fop-commits/200910.mbox/%3c20091028160131.EB23323888FD@eris.apache.org%3e"/>
<id>urn:uuid:%3c20091028160131-EB23323888FD@eris-apache-org%3e</id>
<updated>2009-10-28T16:01:31Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Author: vhennebert
Date: Wed Oct 28 16:01:31 2009
New Revision: 830654

URL: http://svn.apache.org/viewvc?rev=830654&amp;view=rev
Log:
The warning "Non restartable content flowing to narrower page" needs to be routed through
the event notification system

Modified:
    xmlgraphics/fop/trunk/src/java/org/apache/fop/events/EventFormatter.xml
    xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/AbstractBreaker.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/BlockLevelEventProducer.java

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=830654&amp;r1=830653&amp;r2=830654&amp;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 Wed Oct 28 16:01:31
2009
@@ -93,6 +93,7 @@
   &lt;message key="org.apache.fop.layoutmgr.BlockLevelEventProducer.pageSequenceMasterExhausted"&gt;Subsequences
exhausted in page-sequence-master "{pageSequenceMasterName}", {canRecover,if,using previous
subsequence,cannot recover}.{{locator}}&lt;/message&gt;
   &lt;message key="org.apache.fop.layoutmgr.BlockLevelEventProducer.missingSubsequencesInPageSequenceMaster"&gt;No
subsequences in page-sequence-master "{pageSequenceMasterName}".{{locator}}&lt;/message&gt;
   &lt;message key="org.apache.fop.layoutmgr.BlockLevelEventProducer.noMatchingPageMaster"&gt;No
simple-page-master matching "{pageMasterName}" in page-sequence-master "{pageSequenceMasterName}".{{locator}}&lt;/message&gt;
+  &lt;message key="org.apache.fop.layoutmgr.BlockLevelEventProducer.nonRestartableContentFlowingToNarrowerPage"&gt;Content
that cannot handle IPD changes is flowing to a narrower page. Part of it may be clipped by
the page border.&lt;/message&gt;
   &lt;message key="org.apache.fop.svg.SVGEventProducer.error"&gt;SVG error: {message}&lt;/message&gt;
   &lt;message key="org.apache.fop.svg.SVGEventProducer.alert"&gt;SVG alert: {message}&lt;/message&gt;
   &lt;message key="org.apache.fop.svg.SVGEventProducer.info"&gt;SVG info: {message}&lt;/message&gt;

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/AbstractBreaker.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/AbstractBreaker.java?rev=830654&amp;r1=830653&amp;r2=830654&amp;view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/AbstractBreaker.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/AbstractBreaker.java Wed Oct 28
16:01:31 2009
@@ -28,6 +28,7 @@
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 
+import org.apache.fop.events.EventBroadcaster;
 import org.apache.fop.fo.Constants;
 import org.apache.fop.layoutmgr.BreakingAlgorithm.KnuthNode;
 import org.apache.fop.traits.MinOptMax;
@@ -382,9 +383,11 @@
                     List firstElements = Collections.EMPTY_LIST;
                     if (containsNonRestartableLM(positionAtBreak)) {
                         if (alg.getIPDdifference() &gt; 0) {
-                            log.warn("Content that cannot handle IPD changes is flowing to
a"
-                                    + " narrower page. Part of it may be clipped"
-                                    + " by the page border.");
+                            EventBroadcaster eventBroadcaster = getCurrentChildLM().getFObj()
+                                    .getUserAgent().getEventBroadcaster();
+                            BlockLevelEventProducer eventProducer
+                                    = BlockLevelEventProducer.Provider.get(eventBroadcaster);
+                            eventProducer.nonRestartableContentFlowingToNarrowerPage(this);
                         }
                         firstElements = new LinkedList();
                         boolean boxFound = false;

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/BlockLevelEventProducer.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/BlockLevelEventProducer.java?rev=830654&amp;r1=830653&amp;r2=830654&amp;view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/BlockLevelEventProducer.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/BlockLevelEventProducer.java Wed
Oct 28 16:01:31 2009
@@ -33,7 +33,9 @@
     /**
      * Provider class for the event producer.
      */
-    class Provider {
+    final class Provider {
+
+        private Provider() { }
 
         /**
          * Returns an event producer.
@@ -165,4 +167,12 @@
     void noMatchingPageMaster(Object source, String pageSequenceMasterName,
             String pageMasterName, Locator loc) throws PageProductionException;
 
+    /**
+     * An element that cannot handle changing IPD (list, table) is flowing to a narrower
+     * page. Some content may be lost.
+     *
+     * @param source the event source
+     * @event.severity WARN
+     */
+    void nonRestartableContentFlowingToNarrowerPage(Object source);
 }



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



</pre>
</div>
</content>
</entry>
<entry>
<title>svn commit: r830576 - /xmlgraphics/fop/trunk/test/java/org/apache/fop/util/XMLUtilTestCase.java</title>
<author><name>vhennebert@apache.org</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/xmlgraphics-fop-commits/200910.mbox/%3c20091028152341.4BB612388897@eris.apache.org%3e"/>
<id>urn:uuid:%3c20091028152341-4BB612388897@eris-apache-org%3e</id>
<updated>2009-10-28T15:23:40Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Author: vhennebert
Date: Wed Oct 28 15:23:39 2009
New Revision: 830576

URL: http://svn.apache.org/viewvc?rev=830576&amp;view=rev
Log:
XMLUtilTestCase somehow hasn't been included in the merge of the accessibility branch into
the Trunk

Added:
    xmlgraphics/fop/trunk/test/java/org/apache/fop/util/XMLUtilTestCase.java   (with props)

Added: xmlgraphics/fop/trunk/test/java/org/apache/fop/util/XMLUtilTestCase.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/test/java/org/apache/fop/util/XMLUtilTestCase.java?rev=830576&amp;view=auto
==============================================================================
--- xmlgraphics/fop/trunk/test/java/org/apache/fop/util/XMLUtilTestCase.java (added)
+++ xmlgraphics/fop/trunk/test/java/org/apache/fop/util/XMLUtilTestCase.java Wed Oct 28 15:23:39
2009
@@ -0,0 +1,45 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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 org.apache.fop.util;
+
+import java.util.Locale;
+
+import junit.framework.TestCase;
+
+/**
+ * Tests {@link XMLUtil}.
+ */
+public class XMLUtilTestCase extends TestCase {
+
+    public void testLocaleToRFC3066() throws Exception {
+        assertNull(XMLUtil.toRFC3066(null));
+        assertEquals("en", XMLUtil.toRFC3066(new Locale("en")));
+        assertEquals("en-US", XMLUtil.toRFC3066(new Locale("en", "US")));
+        assertEquals("en-US", XMLUtil.toRFC3066(new Locale("EN", "us")));
+    }
+
+    public void testRFC3066ToLocale() throws Exception {
+        assertNull(XMLUtil.convertRFC3066ToLocale(null));
+        assertNull(XMLUtil.convertRFC3066ToLocale(""));
+        assertEquals(new Locale("en"), XMLUtil.convertRFC3066ToLocale("en"));
+        assertEquals(new Locale("en", "US"), XMLUtil.convertRFC3066ToLocale("en-US"));
+        assertEquals(new Locale("en", "US"), XMLUtil.convertRFC3066ToLocale("EN-us"));
+    }
+}

Propchange: xmlgraphics/fop/trunk/test/java/org/apache/fop/util/XMLUtilTestCase.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: xmlgraphics/fop/trunk/test/java/org/apache/fop/util/XMLUtilTestCase.java
------------------------------------------------------------------------------
    svn:keywords = Revision Id



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



</pre>
</div>
</content>
</entry>
<entry>
<title>svn commit: r830563 - /xmlgraphics/fop/trunk/src/java/org/apache/fop/render/xml/XMLRenderer.java</title>
<author><name>jeremias@apache.org</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/xmlgraphics-fop-commits/200910.mbox/%3c20091028144212.1EC81238890E@eris.apache.org%3e"/>
<id>urn:uuid:%3c20091028144212-1EC81238890E@eris-apache-org%3e</id>
<updated>2009-10-28T14:42:11Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Author: jeremias
Date: Wed Oct 28 14:42:11 2009
New Revision: 830563

URL: http://svn.apache.org/viewvc?rev=830563&amp;view=rev
Log:
Do explicit prefix mappings for foi and fox prefixes to make AT XML slightly smaller.

Modified:
    xmlgraphics/fop/trunk/src/java/org/apache/fop/render/xml/XMLRenderer.java

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/render/xml/XMLRenderer.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/render/xml/XMLRenderer.java?rev=830563&amp;r1=830562&amp;r2=830563&amp;view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/render/xml/XMLRenderer.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/render/xml/XMLRenderer.java Wed Oct 28 14:42:11
2009
@@ -36,6 +36,7 @@
 import org.w3c.dom.Document;
 import org.w3c.dom.Node;
 import org.w3c.dom.NodeList;
+
 import org.xml.sax.SAXException;
 
 import org.apache.xmlgraphics.util.QName;
@@ -81,6 +82,8 @@
 import org.apache.fop.area.inline.WordArea;
 import org.apache.fop.fo.Constants;
 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.fonts.FontInfo;
 import org.apache.fop.fonts.FontTriplet;
 import org.apache.fop.render.Renderer;
@@ -148,6 +151,10 @@
         }
     }
 
+    /**
+     * Controls whether to create a more compact format which omit certain attributes.
+     * @param compact true to activate the compact format
+     */
     public void setCompactFormat(boolean compact) {
         this.compactFormat = compact;
     }
@@ -447,14 +454,23 @@
         if (this.getUserAgent().isAccessibilityEnabled()) {
             String structureTreeElement = "structureTree";
             startElement(structureTreeElement);
-            NodeList nodes = getUserAgent().getStructureTree().getPageSequence(pageSequenceIndex++);
-            for (int i = 0, n = nodes.getLength(); i &lt; n; i++) {
-                Node node = nodes.item(i);
-                try {
-                    new DOM2SAX(handler).writeFragment(node);
-                } catch (SAXException e) {
-                    handleSAXException(e);
+            try {
+                this.handler.startPrefixMapping("foi", InternalElementMapping.URI);
+                this.handler.startPrefixMapping("fox", ExtensionElementMapping.URI);
+                NodeList nodes = getUserAgent().getStructureTree().getPageSequence(
+                        pageSequenceIndex++);
+                for (int i = 0, n = nodes.getLength(); i &lt; n; i++) {
+                    Node node = nodes.item(i);
+                    try {
+                        new DOM2SAX(handler).writeFragment(node);
+                    } catch (SAXException e) {
+                        handleSAXException(e);
+                    }
                 }
+                this.handler.endPrefixMapping("fox");
+                this.handler.endPrefixMapping("foi");
+            } catch (SAXException se) {
+                handleSAXException(se);
             }
             endElement(structureTreeElement);
         }



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



</pre>
</div>
</content>
</entry>
<entry>
<title>svn commit: r830476 - in /xmlgraphics/fop/trunk/src/java: META-INF/services/org.apache.fop.events.model.EventModelFactory org/apache/fop/accessibility/AccessibilityEventProducer.java</title>
<author><name>jeremias@apache.org</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/xmlgraphics-fop-commits/200910.mbox/%3c20091028090956.2E93023888FD@eris.apache.org%3e"/>
<id>urn:uuid:%3c20091028090956-2E93023888FD@eris-apache-org%3e</id>
<updated>2009-10-28T09:09:56Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Author: jeremias
Date: Wed Oct 28 09:09:55 2009
New Revision: 830476

URL: http://svn.apache.org/viewvc?rev=830476&amp;view=rev
Log:
Added missing EventModelFactory to avoid error:
  java.lang.IllegalStateException: Event model doesn't contain the definition for org.apache.fop.accessibility.AccessibilityEventProducer

Modified:
    xmlgraphics/fop/trunk/src/java/META-INF/services/org.apache.fop.events.model.EventModelFactory
    xmlgraphics/fop/trunk/src/java/org/apache/fop/accessibility/AccessibilityEventProducer.java

Modified: xmlgraphics/fop/trunk/src/java/META-INF/services/org.apache.fop.events.model.EventModelFactory
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/META-INF/services/org.apache.fop.events.model.EventModelFactory?rev=830476&amp;r1=830475&amp;r2=830476&amp;view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/META-INF/services/org.apache.fop.events.model.EventModelFactory
(original)
+++ xmlgraphics/fop/trunk/src/java/META-INF/services/org.apache.fop.events.model.EventModelFactory
Wed Oct 28 09:09:55 2009
@@ -5,3 +5,4 @@
 org.apache.fop.render.pdf.PDFEventProducer$EventModelFactory
 org.apache.fop.render.ps.PSEventProducer$EventModelFactory
 org.apache.fop.render.rtf.RTFEventProducer$EventModelFactory
+org.apache.fop.accessibility.AccessibilityEventProducer$EventModelFactory

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/accessibility/AccessibilityEventProducer.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/accessibility/AccessibilityEventProducer.java?rev=830476&amp;r1=830475&amp;r2=830476&amp;view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/accessibility/AccessibilityEventProducer.java
(original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/accessibility/AccessibilityEventProducer.java
Wed Oct 28 09:09:55 2009
@@ -21,6 +21,8 @@
 
 import org.apache.fop.events.EventBroadcaster;
 import org.apache.fop.events.EventProducer;
+import org.apache.fop.events.model.AbstractEventModelFactory;
+import org.apache.fop.events.model.EventModel;
 
 /**
  * Event producer for accessibility-related events.
@@ -44,6 +46,16 @@
         }
     }
 
+    /** Event model factory for Accessibility. */
+    public static class EventModelFactory extends AbstractEventModelFactory {
+
+        /** {@inheritDoc} */
+        public EventModel createEventModel() {
+            return loadModel(getClass(), "event-model.xml");
+        }
+
+    }
+
     /**
      * The structure tree is missing in the XML file.
      *



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



</pre>
</div>
</content>
</entry>
<entry>
<title>svn commit: r830299 - /xmlgraphics/fop/branches/Temp_Accessibility/</title>
<author><name>vhennebert@apache.org</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/xmlgraphics-fop-commits/200910.mbox/%3c20091027191838.A68EC23888AD@eris.apache.org%3e"/>
<id>urn:uuid:%3c20091027191838-A68EC23888AD@eris-apache-org%3e</id>
<updated>2009-10-27T19:18:38Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Author: vhennebert
Date: Tue Oct 27 19:18:38 2009
New Revision: 830299

URL: http://svn.apache.org/viewvc?rev=830299&amp;view=rev
Log:
Removed now obsolete Temp_Accessibility branch

Removed:
    xmlgraphics/fop/branches/Temp_Accessibility/


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



</pre>
</div>
</content>
</entry>
<entry>
<title>svn commit: r830298 - /xmlgraphics/fop/trunk/src/java/META-INF/services/</title>
<author><name>vhennebert@apache.org</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/xmlgraphics-fop-commits/200910.mbox/%3c20091027191800.474052388909@eris.apache.org%3e"/>
<id>urn:uuid:%3c20091027191800-474052388909@eris-apache-org%3e</id>
<updated>2009-10-27T19:18:00Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Author: vhennebert
Date: Tue Oct 27 19:17:58 2009
New Revision: 830298

URL: http://svn.apache.org/viewvc?rev=830298&amp;view=rev
Log:
Set svn:eol-style property

Modified:
    xmlgraphics/fop/trunk/src/java/META-INF/services/org.apache.fop.events.EventExceptionManager$ExceptionFactory
  (contents, props changed)
    xmlgraphics/fop/trunk/src/java/META-INF/services/org.apache.fop.events.model.EventModelFactory
  (contents, props changed)
    xmlgraphics/fop/trunk/src/java/META-INF/services/org.apache.fop.render.ImageHandler  
(contents, props changed)
    xmlgraphics/fop/trunk/src/java/META-INF/services/org.apache.fop.render.XMLHandler   (contents,
props changed)
    xmlgraphics/fop/trunk/src/java/META-INF/services/org.apache.fop.render.afp.AFPImageHandler
  (contents, props changed)
    xmlgraphics/fop/trunk/src/java/META-INF/services/org.apache.fop.render.intermediate.IFDocumentHandler
  (contents, props changed)
    xmlgraphics/fop/trunk/src/java/META-INF/services/org.apache.fop.render.pdf.PDFImageHandler
  (contents, props changed)
    xmlgraphics/fop/trunk/src/java/META-INF/services/org.apache.fop.util.ContentHandlerFactory
  (contents, props changed)
    xmlgraphics/fop/trunk/src/java/META-INF/services/org.apache.xmlgraphics.image.loader.spi.ImageConverter
  (contents, props changed)
    xmlgraphics/fop/trunk/src/java/META-INF/services/org.apache.xmlgraphics.image.loader.spi.ImageLoaderFactory
  (contents, props changed)
    xmlgraphics/fop/trunk/src/java/META-INF/services/org.apache.xmlgraphics.image.loader.spi.ImagePreloader
  (contents, props changed)

Modified: xmlgraphics/fop/trunk/src/java/META-INF/services/org.apache.fop.events.EventExceptionManager$ExceptionFactory
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/META-INF/services/org.apache.fop.events.EventExceptionManager%24ExceptionFactory?rev=830298&amp;r1=830297&amp;r2=830298&amp;view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/META-INF/services/org.apache.fop.events.EventExceptionManager$ExceptionFactory
(original)
+++ xmlgraphics/fop/trunk/src/java/META-INF/services/org.apache.fop.events.EventExceptionManager$ExceptionFactory
Tue Oct 27 19:17:58 2009
@@ -1,5 +1,5 @@
-org.apache.fop.events.ValidationExceptionFactory
-org.apache.fop.events.PropertyExceptionFactory
-org.apache.fop.events.UnsupportedOperationExceptionFactory
-org.apache.fop.layoutmgr.LayoutException$LayoutExceptionFactory
-org.apache.fop.fo.pagination.PageProductionException$PageProductionExceptionFactory
+org.apache.fop.events.ValidationExceptionFactory
+org.apache.fop.events.PropertyExceptionFactory
+org.apache.fop.events.UnsupportedOperationExceptionFactory
+org.apache.fop.layoutmgr.LayoutException$LayoutExceptionFactory
+org.apache.fop.fo.pagination.PageProductionException$PageProductionExceptionFactory

Propchange: xmlgraphics/fop/trunk/src/java/META-INF/services/org.apache.fop.events.EventExceptionManager$ExceptionFactory
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: xmlgraphics/fop/trunk/src/java/META-INF/services/org.apache.fop.events.model.EventModelFactory
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/META-INF/services/org.apache.fop.events.model.EventModelFactory?rev=830298&amp;r1=830297&amp;r2=830298&amp;view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/META-INF/services/org.apache.fop.events.model.EventModelFactory
(original)
+++ xmlgraphics/fop/trunk/src/java/META-INF/services/org.apache.fop.events.model.EventModelFactory
Tue Oct 27 19:17:58 2009
@@ -1,7 +1,7 @@
-org.apache.fop.events.FOPEventModelFactory
-org.apache.fop.afp.AFPEventProducer$EventModelFactory
-org.apache.fop.render.bitmap.BitmapRendererEventProducer$EventModelFactory
-org.apache.fop.render.pcl.PCLEventProducer$EventModelFactory
-org.apache.fop.render.pdf.PDFEventProducer$EventModelFactory
-org.apache.fop.render.ps.PSEventProducer$EventModelFactory
-org.apache.fop.render.rtf.RTFEventProducer$EventModelFactory
+org.apache.fop.events.FOPEventModelFactory
+org.apache.fop.afp.AFPEventProducer$EventModelFactory
+org.apache.fop.render.bitmap.BitmapRendererEventProducer$EventModelFactory
+org.apache.fop.render.pcl.PCLEventProducer$EventModelFactory
+org.apache.fop.render.pdf.PDFEventProducer$EventModelFactory
+org.apache.fop.render.ps.PSEventProducer$EventModelFactory
+org.apache.fop.render.rtf.RTFEventProducer$EventModelFactory

Propchange: xmlgraphics/fop/trunk/src/java/META-INF/services/org.apache.fop.events.model.EventModelFactory
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: xmlgraphics/fop/trunk/src/java/META-INF/services/org.apache.fop.render.ImageHandler
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/META-INF/services/org.apache.fop.render.ImageHandler?rev=830298&amp;r1=830297&amp;r2=830298&amp;view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/META-INF/services/org.apache.fop.render.ImageHandler (original)
+++ xmlgraphics/fop/trunk/src/java/META-INF/services/org.apache.fop.render.ImageHandler Tue
Oct 27 19:17:58 2009
@@ -1,20 +1,20 @@
-org.apache.fop.render.pdf.PDFImageHandlerGraphics2D
-org.apache.fop.render.pdf.PDFImageHandlerRenderedImage
-org.apache.fop.render.pdf.PDFImageHandlerRawJPEG
-org.apache.fop.render.pdf.PDFImageHandlerRawCCITTFax
-org.apache.fop.render.pdf.PDFImageHandlerSVG
-org.apache.fop.render.java2d.Java2DImageHandlerRenderedImage
-org.apache.fop.render.java2d.Java2DImageHandlerGraphics2D
-org.apache.fop.render.pcl.PCLImageHandlerRenderedImage
-org.apache.fop.render.pcl.PCLImageHandlerGraphics2D
-org.apache.fop.render.ps.PSImageHandlerRenderedImage
-org.apache.fop.render.ps.PSImageHandlerEPS
-org.apache.fop.render.ps.PSImageHandlerRawCCITTFax
-org.apache.fop.render.ps.PSImageHandlerRawJPEG
-org.apache.fop.render.ps.PSImageHandlerGraphics2D
-org.apache.fop.render.ps.PSImageHandlerSVG
-org.apache.fop.render.afp.AFPImageHandlerRenderedImage
-org.apache.fop.render.afp.AFPImageHandlerGraphics2D
-org.apache.fop.render.afp.AFPImageHandlerRawStream
-org.apache.fop.render.afp.AFPImageHandlerRawCCITTFax
-org.apache.fop.render.afp.AFPImageHandlerSVG
\ No newline at end of file
+org.apache.fop.render.pdf.PDFImageHandlerGraphics2D
+org.apache.fop.render.pdf.PDFImageHandlerRenderedImage
+org.apache.fop.render.pdf.PDFImageHandlerRawJPEG
+org.apache.fop.render.pdf.PDFImageHandlerRawCCITTFax
+org.apache.fop.render.pdf.PDFImageHandlerSVG
+org.apache.fop.render.java2d.Java2DImageHandlerRenderedImage
+org.apache.fop.render.java2d.Java2DImageHandlerGraphics2D
+org.apache.fop.render.pcl.PCLImageHandlerRenderedImage
+org.apache.fop.render.pcl.PCLImageHandlerGraphics2D
+org.apache.fop.render.ps.PSImageHandlerRenderedImage
+org.apache.fop.render.ps.PSImageHandlerEPS
+org.apache.fop.render.ps.PSImageHandlerRawCCITTFax
+org.apache.fop.render.ps.PSImageHandlerRawJPEG
+org.apache.fop.render.ps.PSImageHandlerGraphics2D
+org.apache.fop.render.ps.PSImageHandlerSVG
+org.apache.fop.render.afp.AFPImageHandlerRenderedImage
+org.apache.fop.render.afp.AFPImageHandlerGraphics2D
+org.apache.fop.render.afp.AFPImageHandlerRawStream
+org.apache.fop.render.afp.AFPImageHandlerRawCCITTFax
+org.apache.fop.render.afp.AFPImageHandlerSVG

Propchange: xmlgraphics/fop/trunk/src/java/META-INF/services/org.apache.fop.render.ImageHandler
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: xmlgraphics/fop/trunk/src/java/META-INF/services/org.apache.fop.render.XMLHandler
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/META-INF/services/org.apache.fop.render.XMLHandler?rev=830298&amp;r1=830297&amp;r2=830298&amp;view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/META-INF/services/org.apache.fop.render.XMLHandler (original)
+++ xmlgraphics/fop/trunk/src/java/META-INF/services/org.apache.fop.render.XMLHandler Tue
Oct 27 19:17:58 2009
@@ -1,5 +1,5 @@
-org.apache.fop.render.pdf.PDFSVGHandler
-org.apache.fop.render.ps.PSSVGHandler
-org.apache.fop.render.java2d.Java2DSVGHandler
-org.apache.fop.render.pcl.PCLSVGHandler
-org.apache.fop.render.afp.AFPSVGHandler
\ No newline at end of file
+org.apache.fop.render.pdf.PDFSVGHandler
+org.apache.fop.render.ps.PSSVGHandler
+org.apache.fop.render.java2d.Java2DSVGHandler
+org.apache.fop.render.pcl.PCLSVGHandler
+org.apache.fop.render.afp.AFPSVGHandler

Propchange: xmlgraphics/fop/trunk/src/java/META-INF/services/org.apache.fop.render.XMLHandler
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: xmlgraphics/fop/trunk/src/java/META-INF/services/org.apache.fop.render.afp.AFPImageHandler
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/META-INF/services/org.apache.fop.render.afp.AFPImageHandler?rev=830298&amp;r1=830297&amp;r2=830298&amp;view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/META-INF/services/org.apache.fop.render.afp.AFPImageHandler
(original)
+++ xmlgraphics/fop/trunk/src/java/META-INF/services/org.apache.fop.render.afp.AFPImageHandler
Tue Oct 27 19:17:58 2009
@@ -1,5 +1,5 @@
-org.apache.fop.render.afp.AFPImageHandlerRenderedImage
-org.apache.fop.render.afp.AFPImageHandlerRawCCITTFax
-org.apache.fop.render.afp.AFPImageHandlerRawStream
-org.apache.fop.render.afp.AFPImageHandlerGraphics2D
-org.apache.fop.render.afp.AFPImageHandlerXML
+org.apache.fop.render.afp.AFPImageHandlerRenderedImage
+org.apache.fop.render.afp.AFPImageHandlerRawCCITTFax
+org.apache.fop.render.afp.AFPImageHandlerRawStream
+org.apache.fop.render.afp.AFPImageHandlerGraphics2D
+org.apache.fop.render.afp.AFPImageHandlerXML

Propchange: xmlgraphics/fop/trunk/src/java/META-INF/services/org.apache.fop.render.afp.AFPImageHandler
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: xmlgraphics/fop/trunk/src/java/META-INF/services/org.apache.fop.render.intermediate.IFDocumentHandler
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/META-INF/services/org.apache.fop.render.intermediate.IFDocumentHandler?rev=830298&amp;r1=830297&amp;r2=830298&amp;view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/META-INF/services/org.apache.fop.render.intermediate.IFDocumentHandler
(original)
+++ xmlgraphics/fop/trunk/src/java/META-INF/services/org.apache.fop.render.intermediate.IFDocumentHandler
Tue Oct 27 19:17:58 2009
@@ -1,7 +1,7 @@
-org.apache.fop.render.pdf.PDFDocumentHandlerMaker
-org.apache.fop.render.pcl.PCLDocumentHandlerMaker
-org.apache.fop.render.bitmap.TIFFDocumentHandlerMaker
-org.apache.fop.render.bitmap.PNGDocumentHandlerMaker
-org.apache.fop.render.ps.PSDocumentHandlerMaker
-org.apache.fop.render.afp.AFPDocumentHandlerMaker
-org.apache.fop.render.intermediate.IFSerializerMaker
\ No newline at end of file
+org.apache.fop.render.pdf.PDFDocumentHandlerMaker
+org.apache.fop.render.pcl.PCLDocumentHandlerMaker
+org.apache.fop.render.bitmap.TIFFDocumentHandlerMaker
+org.apache.fop.render.bitmap.PNGDocumentHandlerMaker
+org.apache.fop.render.ps.PSDocumentHandlerMaker
+org.apache.fop.render.afp.AFPDocumentHandlerMaker
+org.apache.fop.render.intermediate.IFSerializerMaker

Propchange: xmlgraphics/fop/trunk/src/java/META-INF/services/org.apache.fop.render.intermediate.IFDocumentHandler
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: xmlgraphics/fop/trunk/src/java/META-INF/services/org.apache.fop.render.pdf.PDFImageHandler
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/META-INF/services/org.apache.fop.render.pdf.PDFImageHandler?rev=830298&amp;r1=830297&amp;r2=830298&amp;view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/META-INF/services/org.apache.fop.render.pdf.PDFImageHandler
(original)
+++ xmlgraphics/fop/trunk/src/java/META-INF/services/org.apache.fop.render.pdf.PDFImageHandler
Tue Oct 27 19:17:58 2009
@@ -1,5 +1,5 @@
-org.apache.fop.render.pdf.PDFImageHandlerRawJPEG
-org.apache.fop.render.pdf.PDFImageHandlerRawCCITTFax
-org.apache.fop.render.pdf.PDFImageHandlerGraphics2D
-org.apache.fop.render.pdf.PDFImageHandlerRenderedImage
-org.apache.fop.render.pdf.PDFImageHandlerXML
\ No newline at end of file
+org.apache.fop.render.pdf.PDFImageHandlerRawJPEG
+org.apache.fop.render.pdf.PDFImageHandlerRawCCITTFax
+org.apache.fop.render.pdf.PDFImageHandlerGraphics2D
+org.apache.fop.render.pdf.PDFImageHandlerRenderedImage
+org.apache.fop.render.pdf.PDFImageHandlerXML

Propchange: xmlgraphics/fop/trunk/src/java/META-INF/services/org.apache.fop.render.pdf.PDFImageHandler
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: xmlgraphics/fop/trunk/src/java/META-INF/services/org.apache.fop.util.ContentHandlerFactory
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/META-INF/services/org.apache.fop.util.ContentHandlerFactory?rev=830298&amp;r1=830297&amp;r2=830298&amp;view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/META-INF/services/org.apache.fop.util.ContentHandlerFactory
(original)
+++ xmlgraphics/fop/trunk/src/java/META-INF/services/org.apache.fop.util.ContentHandlerFactory
Tue Oct 27 19:17:58 2009
@@ -1,3 +1,3 @@
-org.apache.fop.render.afp.extensions.AFPExtensionHandlerFactory
-org.apache.fop.render.ps.extensions.PSExtensionHandlerFactory
-org.apache.fop.fo.extensions.xmp.XMPContentHandlerFactory
+org.apache.fop.render.afp.extensions.AFPExtensionHandlerFactory
+org.apache.fop.render.ps.extensions.PSExtensionHandlerFactory
+org.apache.fop.fo.extensions.xmp.XMPContentHandlerFactory

Propchange: xmlgraphics/fop/trunk/src/java/META-INF/services/org.apache.fop.util.ContentHandlerFactory
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: xmlgraphics/fop/trunk/src/java/META-INF/services/org.apache.xmlgraphics.image.loader.spi.ImageConverter
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/META-INF/services/org.apache.xmlgraphics.image.loader.spi.ImageConverter?rev=830298&amp;r1=830297&amp;r2=830298&amp;view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/META-INF/services/org.apache.xmlgraphics.image.loader.spi.ImageConverter
(original)
+++ xmlgraphics/fop/trunk/src/java/META-INF/services/org.apache.xmlgraphics.image.loader.spi.ImageConverter
Tue Oct 27 19:17:58 2009
@@ -1,3 +1,3 @@
-org.apache.fop.image.loader.batik.ImageConverterSVG2G2D
-org.apache.fop.image.loader.batik.ImageConverterG2D2SVG
-org.apache.fop.image.loader.batik.ImageConverterWMF2G2D
+org.apache.fop.image.loader.batik.ImageConverterSVG2G2D
+org.apache.fop.image.loader.batik.ImageConverterG2D2SVG
+org.apache.fop.image.loader.batik.ImageConverterWMF2G2D

Propchange: xmlgraphics/fop/trunk/src/java/META-INF/services/org.apache.xmlgraphics.image.loader.spi.ImageConverter
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: xmlgraphics/fop/trunk/src/java/META-INF/services/org.apache.xmlgraphics.image.loader.spi.ImageLoaderFactory
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/META-INF/services/org.apache.xmlgraphics.image.loader.spi.ImageLoaderFactory?rev=830298&amp;r1=830297&amp;r2=830298&amp;view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/META-INF/services/org.apache.xmlgraphics.image.loader.spi.ImageLoaderFactory
(original)
+++ xmlgraphics/fop/trunk/src/java/META-INF/services/org.apache.xmlgraphics.image.loader.spi.ImageLoaderFactory
Tue Oct 27 19:17:58 2009
@@ -1,2 +1,2 @@
-org.apache.fop.image.loader.batik.ImageLoaderFactorySVG
-org.apache.fop.image.loader.batik.ImageLoaderFactoryWMF
+org.apache.fop.image.loader.batik.ImageLoaderFactorySVG
+org.apache.fop.image.loader.batik.ImageLoaderFactoryWMF

Propchange: xmlgraphics/fop/trunk/src/java/META-INF/services/org.apache.xmlgraphics.image.loader.spi.ImageLoaderFactory
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: xmlgraphics/fop/trunk/src/java/META-INF/services/org.apache.xmlgraphics.image.loader.spi.ImagePreloader
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/META-INF/services/org.apache.xmlgraphics.image.loader.spi.ImagePreloader?rev=830298&amp;r1=830297&amp;r2=830298&amp;view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/META-INF/services/org.apache.xmlgraphics.image.loader.spi.ImagePreloader
(original)
+++ xmlgraphics/fop/trunk/src/java/META-INF/services/org.apache.xmlgraphics.image.loader.spi.ImagePreloader
Tue Oct 27 19:17:58 2009
@@ -1,2 +1,2 @@
-org.apache.fop.image.loader.batik.PreloaderWMF
-org.apache.fop.image.loader.batik.PreloaderSVG
+org.apache.fop.image.loader.batik.PreloaderWMF
+org.apache.fop.image.loader.batik.PreloaderSVG

Propchange: xmlgraphics/fop/trunk/src/java/META-INF/services/org.apache.xmlgraphics.image.loader.spi.ImagePreloader
------------------------------------------------------------------------------
    svn:eol-style = native



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



</pre>
</div>
</content>
</entry>
<entry>
<title>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...</title>
<author><name>vhennebert@apache.org</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/xmlgraphics-fop-commits/200910.mbox/%3c20091027190801.38C6E23888AD@eris.apache.org%3e"/>
<id>urn:uuid:%3c20091027190801-38C6E23888AD@eris-apache-org%3e</id>
<updated>2009-10-27T19:07:58Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Author: vhennebert
Date: Tue Oct 27 19:07:52 2009
New Revision: 830293

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

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&amp;r1=830292&amp;r2=830293&amp;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 @@
       &lt;extensions label="Extensions" href="extensions.html"/&gt;
       &lt;events label="Events" href="events.html"/&gt;
       &lt;metadata label="Metadata" href="metadata.html"/&gt;
+      &lt;accessibility label="Accessibility" href="accessibility.html"/&gt;
     &lt;/features&gt;
     
   &lt;/trunk&gt;

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&amp;r1=830292&amp;r2=830293&amp;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.
       &lt;/p&gt;
       &lt;p&gt;
-        &lt;strong&gt;PDF/A-1a&lt;/strong&gt; is not implemented, yet. This is mostly because of the requirement
-        for tagged PDF which is not available in FOP, yet.
+        &lt;strong&gt;PDF/A-1a&lt;/strong&gt; is based on PDF-A-1b and adds accessibility features
+        (such as Tagged PDF). This format is available within the limitation described on
+        the &lt;a href="accessibility.html"&gt;Accessibility page&lt;/a&gt;.
       &lt;/p&gt;
     &lt;/section&gt;
     &lt;section id="command-line"&gt;
@@ -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.
       &lt;/p&gt;
+      &lt;p&gt;
+        PDF/A-1a is enabled by specifying "-pdfprofile PDF/A-1a".
+      &lt;/p&gt;
     &lt;/section&gt;
     &lt;section id="embedded"&gt;
       &lt;title&gt;Usage (embedded)&lt;/title&gt;
@@ -80,6 +84,9 @@
         If one of the validation rules of PDF/A is violated, an PDFConformanceException
         (descendant of RuntimeException) is thrown.
       &lt;/p&gt;
+      &lt;p&gt;
+        For PDF/A-1a, just use the string "PDF/A-1a" instead of "PDF/A-1b".
+      &lt;/p&gt;
     &lt;/section&gt;
     &lt;section id="rules"&gt;
       &lt;title&gt;PDF/A in Action&lt;/title&gt;
@@ -118,12 +125,17 @@
           embedded in clear text so non-PDF-aware applications can extract the XMP metadata.
         &lt;/li&gt;
       &lt;/ul&gt;
+      &lt;note&gt;
+        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 &lt;a href="accessibility.html"&gt;Accessibility page&lt;/a&gt; for details.
+      &lt;/note&gt; 
     &lt;/section&gt;
     &lt;section id="profile-compatibility"&gt;
       &lt;title&gt;PDF profile compatibility&lt;/title&gt;
       &lt;p&gt;
-        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.
       &lt;/p&gt;
     &lt;/section&gt;
     &lt;section id="interoperability"&gt;

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&amp;r1=830292&amp;r2=830293&amp;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&amp;r1=830292&amp;r2=830293&amp;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 &lt;code&gt;true&lt;/code&gt; 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&amp;r1=830292&amp;r2=830293&amp;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&amp;r1=830292&amp;r2=830293&amp;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 &lt;code&gt;true&lt;/code&gt; to enable accessibility, &lt;code&gt;false&lt;/code&gt; 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.
      * &lt;p&gt;

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&amp;r1=830292&amp;r2=830293&amp;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&amp;r1=830292&amp;r2=830293&amp;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") &amp;&amp; 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 &lt; c; i++) {
                 String ns = atts.getURI(i);
                 if (ns.length() &gt; 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&amp;r1=830292&amp;r2=830293&amp;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&amp;r1=830292&amp;r2=830293&amp;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&amp;r1=830292&amp;r2=830293&amp;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 @@
   &lt;message key="org.apache.fop.fonts.FontEventAdapter.fontSubstituted"&gt;Font "{requested}" not found. Substituting with "{effective}".&lt;/message&gt;
   &lt;message key="org.apache.fop.fonts.FontEventAdapter.fontLoadingErrorAtAutoDetection"&gt;Unable to load font file: {fontURL}.[ Reason: {e}]&lt;/message&gt;
   &lt;message key="org.apache.fop.fonts.FontEventAdapter.glyphNotAvailable"&gt;Glyph "{ch}" (0x{ch,hex}[, {ch,glyph-name}]) not available in font "{fontName}".&lt;/message&gt;
+  &lt;message key="org.apache.fop.fo.FOValidationEventProducer.altTextMissing"&gt;Alternate text is missing on {foElement}.{{locator}}&lt;/message&gt;
 &lt;/catalogue&gt;

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&amp;r1=830292&amp;r2=830293&amp;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&amp;r1=830292&amp;r2=830293&amp;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&amp;r1=830292&amp;r2=830293&amp;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&amp;r1=830292&amp;r2=830293&amp;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&amp;r1=830292&amp;r2=830293&amp;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&amp;r1=830292&amp;r2=830293&amp;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&amp;r1=830292&amp;r2=830293&amp;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 &lt;a href="http://www.w3.org/TR/xsl/#fo_instream-foreign-object"&gt;
@@ -36,7 +37,8 @@
  * and &lt;a href="http://www.w3.org/TR/xsl/#fo_external-graphic"&gt;
  * &lt;code&gt;fo:external-graphic&lt;/code&gt;&lt;/a&gt; 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&amp;r1=830292&amp;r2=830293&amp;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 &lt;a href="http://www.w3.org/TR/xsl/#fo_page-number-citation"&gt;
@@ -42,7 +43,8 @@
  * &lt;a href="http://www.w3.org/TR/xsl/#fo_page-number-citation-last"&gt;
  * &lt;code&gt;fo:page-number-citation-last&lt;/code&gt;&lt;/a&gt; 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&amp;r1=830292&amp;r2=830293&amp;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 &lt;a href="http://www.w3.org/TR/xsl/#fo_block"&gt;
   * &lt;code&gt;fo:block object&lt;/code&gt;&lt;/a&gt;.
   */
-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&amp;r1=830292&amp;r2=830293&amp;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 &lt;a href="http://www.w3.org/TR/xsl/#fo_character"&gt;
  * &lt;code&gt;fo:character&lt;/code&gt;&lt;/a&gt; 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&amp;r1=830292&amp;r2=830293&amp;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 &lt;a href="http://www.w3.org/TR/xsl/#fo_inline"&gt;
  * &lt;code&gt;fo:inline&lt;/code&gt;&lt;/a&gt; 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&amp;r1=830292&amp;r2=830293&amp;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 &lt;a href="http://www.w3.org/TR/xsl/#fo_page-number"&gt;
  * &lt;code&gt;fo:page-number&lt;/code&gt;&lt;/a&gt; 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&amp;r1=830292&amp;r2=830293&amp;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
                 &amp;&amp; getNameId() != FO_TABLE_CELL
                 &amp;&amp; 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&amp;r1=830292&amp;r2=830293&amp;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&amp;r1=830292&amp;r2=830293&amp;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 &amp;&amp; ptr.length() &gt; 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&amp;r1=830292&amp;r2=830293&amp;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&amp;r1=830292&amp;r2=830293&amp;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&amp;r1=830292&amp;r2=830293&amp;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&amp;r1=830292&amp;r2=830293&amp;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&amp;r1=830292&amp;r2=830293&amp;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&amp;r1=830292&amp;r2=830293&amp;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&amp;r1=830292&amp;r2=830293&amp;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&amp;r1=830292&amp;r2=830293&amp;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&amp;r1=830292&amp;r2=830293&amp;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&amp;r1=830292&amp;r2=830293&amp;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&amp;r1=830292&amp;r2=830293&amp;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&gt;&gt;\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&amp;r1=830292&amp;r2=830293&amp;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



</pre>
</div>
</content>
</entry>
<entry>
<title>svn commit: r830293 [2/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...</title>
<author><name>vhennebert@apache.org</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/xmlgraphics-fop-commits/200910.mbox/%3c20091027190801.3E46B2388909@eris.apache.org%3e"/>
<id>urn:uuid:%3c20091027190801-3E46B2388909@eris-apache-org%3e</id>
<updated>2009-10-27T19:07:58Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/pdf/PDFPage.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/pdf/PDFPage.java?rev=830293&amp;r1=830292&amp;r2=830293&amp;view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/pdf/PDFPage.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/pdf/PDFPage.java Tue Oct 27 19:07:52 2009
@@ -154,4 +154,33 @@
         return this.pageIndex;
     }
 
+    /**
+     * Sets the "StructParents" value.
+     * @param structParents the integer key of this object's entry in the structural parent tree.
+     */
+    public void setStructParents(int structParents) {
+        put("StructParents", structParents);
+        //This is a PDF 1.5 feature. It is set as a work-around for a bug in Adobe Acrobat
+        //which reports this missing even if the PDF file is PDF 1.4.
+        setTabs(new PDFName("S"));
+    }
+
+    /**
+     * Returns the value of the StructParents entry.
+     *
+     * @return the StructParents value, &lt;code&gt;null&lt;/code&gt; if the entry has not been set
+     */
+    public Integer getStructParents() {
+        return (Integer) get("StructParents");
+    }
+
+    /**
+     * Specifies the tab order for annotations on a page.
+     * @param value one of the allowed values (see PDF 1.5)
+     * @since PDF 1.5
+     */
+    public void setTabs(PDFName value) {
+        put("Tabs", value);
+    }
+
 }

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/pdf/PDFProfile.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/pdf/PDFProfile.java?rev=830293&amp;r1=830292&amp;r2=830293&amp;view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/pdf/PDFProfile.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/pdf/PDFProfile.java Tue Oct 27 19:07:52 2009
@@ -58,9 +58,6 @@
      */
     protected void validateProfileCombination() {
         if (pdfAMode != PDFAMode.DISABLED) {
-            if (pdfAMode == PDFAMode.PDFA_1A) {
-                throw new UnsupportedOperationException("PDF/A-1a is not implemented, yet");
-            }
             if (pdfAMode == PDFAMode.PDFA_1B) {
                 if (pdfXMode != PDFXMode.DISABLED &amp;&amp; pdfXMode != PDFXMode.PDFX_3_2003) {
                     throw new PDFConformanceException(
@@ -192,6 +189,32 @@
         }
     }
 
+    /**
+     * Checks a few things required for tagged PDF.
+     */
+    public void verifyTaggedPDF() {
+        if (getPDFAMode().isPDFA1LevelA()) {
+            final String err = "{0} requires the {1} dictionary entry to be set";
+            PDFDictionary markInfo = getDocument().getRoot().getMarkInfo();
+            if (markInfo == null) {
+                throw new PDFConformanceException(format(
+                        "{0} requires the MarkInfo dictionary to be present", getPDFAMode()));
+            }
+            if (!Boolean.TRUE.equals(markInfo.get("Marked"))) {
+                throw new PDFConformanceException(format(err,
+                        new Object[] {getPDFAMode(), "Marked"}));
+            }
+            if (getDocument().getRoot().getStructTreeRoot() == null) {
+                throw new PDFConformanceException(format(err,
+                        new Object[] {getPDFAMode(), "StructTreeRoot"}));
+            }
+            if (getDocument().getRoot().getLanguage() == null) {
+                throw new PDFConformanceException(format(err,
+                        new Object[] {getPDFAMode(), "Lang"}));
+            }
+        }
+    }
+
     /** @return true if the ID entry must be present in the trailer. */
     public boolean isIDEntryRequired() {
         return isPDFAActive() || isPDFXActive();

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/pdf/PDFRoot.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/pdf/PDFRoot.java?rev=830293&amp;r1=830292&amp;r2=830293&amp;view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/pdf/PDFRoot.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/pdf/PDFRoot.java Tue Oct 27 19:07:52 2009
@@ -19,6 +19,9 @@
 
 package org.apache.fop.pdf;
 
+import java.io.IOException;
+import java.io.OutputStream;
+
 /**
  * Class representing a Root (/Catalog) object.
  */
@@ -56,7 +59,7 @@
      * object must be created before the PDF document is
      * generated, but it is not assigned an object ID until
      * it is about to be written (immediately before the xref
-     * table as part of the trsailer). (mark-fop@inomial.com)
+     * table as part of the trailer). (mark-fop@inomial.com)
      *
      * @param objnum the object's number
      * @param pages the PDFPages object
@@ -68,6 +71,12 @@
         setRootPages(pages);
     }
 
+    /** {@inheritDoc} */
+    protected int output(OutputStream stream) throws IOException {
+        getDocument().getProfile().verifyTaggedPDF();
+        return super.output(stream);
+    }
+
     /**
      * Set the page mode for the PDF document.
      *
@@ -252,4 +261,39 @@
         put("Lang", lang);
     }
 
+    /**
+     * Sets the StructTreeRoot object. Used for accessibility.
+     * @param structTreeRoot of this document
+     */
+    public void setStructTreeRoot(PDFStructTreeRoot structTreeRoot) {
+        if (structTreeRoot == null) {
+            throw new NullPointerException("structTreeRoot must not be null");
+        }
+        put("StructTreeRoot", structTreeRoot);
+    }
+
+    /**
+     * Returns the StructTreeRoot object.
+     * @return the structure tree root (or null if accessibility is not enabled)
+     */
+    public PDFStructTreeRoot getStructTreeRoot() {
+        return (PDFStructTreeRoot)get("StructTreeRoot");
+    }
+
+    /**
+     * Marks this document as conforming to the Tagged PDF conventions.
+     */
+    public void makeTagged() {
+        PDFDictionary dict = new PDFDictionary();
+        dict.put("Marked", Boolean.TRUE);
+        put("MarkInfo", dict);  //new PDFMarkInfo()
+    }
+
+    /**
+     * Returns the MarkInfo dictionary.
+     * @return the MarkInfo dictionary (or null if it's not present)
+     */
+    public PDFDictionary getMarkInfo() {
+        return (PDFDictionary)get("MarkInfo");
+    }
 }

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/render/AbstractRendererConfigurator.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/render/AbstractRendererConfigurator.java?rev=830293&amp;r1=830292&amp;r2=830293&amp;view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/render/AbstractRendererConfigurator.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/render/AbstractRendererConfigurator.java Tue Oct 27 19:07:52 2009
@@ -20,6 +20,7 @@
 package org.apache.fop.render;
 
 import org.apache.avalon.framework.configuration.Configuration;
+
 import org.apache.fop.apps.FOUserAgent;
 
 /**
@@ -29,7 +30,7 @@
 public abstract class AbstractRendererConfigurator extends AbstractConfigurator {
 
     private static final String TYPE = "renderer";
-    
+
     /**
      * Default constructor
      * @param userAgent user agent
@@ -55,7 +56,7 @@
     protected Configuration getRendererConfig(String mimeType) {
         return super.getConfig(mimeType);
     }
-    
+
     /**
      * {@inheritDoc}
      */

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/render/intermediate/IFConstants.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/render/intermediate/IFConstants.java?rev=830293&amp;r1=830292&amp;r2=830293&amp;view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/render/intermediate/IFConstants.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/render/intermediate/IFConstants.java Tue Oct 27 19:07:52 2009
@@ -50,4 +50,6 @@
     String EL_BORDER_RECT = "border-rect";
     String EL_FONT = "font";
     String EL_TEXT = "text";
+    /** Parent element of the logical structure tree. */
+    String EL_STRUCTURE_TREE = "structure-tree";
 }

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/render/intermediate/IFContext.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/render/intermediate/IFContext.java?rev=830293&amp;r1=830292&amp;r2=830293&amp;view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/render/intermediate/IFContext.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/render/intermediate/IFContext.java Tue Oct 27 19:07:52 2009
@@ -20,6 +20,7 @@
 package org.apache.fop.render.intermediate;
 
 import java.util.Collections;
+import java.util.Locale;
 import java.util.Map;
 
 import org.apache.xmlgraphics.util.QName;
@@ -43,6 +44,10 @@
     /** foreign attributes: Map&lt;QName, Object&gt; */
     private Map foreignAttributes = Collections.EMPTY_MAP;
 
+    private Locale language;
+
+    private String structurePointer;
+
     /**
      * Main constructor.
      * @param ua the user agent
@@ -108,4 +113,46 @@
         setForeignAttributes(null);
     }
 
+    /**
+     * Sets the currently applicable language.
+     * @param lang the language
+     */
+    public void setLanguage(Locale lang) {
+        this.language = lang;
+    }
+
+    /**
+     * Returns the currently applicable language.
+     * @return the language (or null if the language is undefined)
+     */
+    public Locale getLanguage() {
+        return this.language;
+    }
+
+    /**
+     * Sets the structure pointer for the following painted marks. This method is used when
+     * accessibility features are enabled.
+     * @param ptr the structure pointer
+     */
+    public void setStructurePointer(String ptr) {
+        this.structurePointer = ptr;
+    }
+
+    /**
+     * Resets the current structure pointer.
+     * @see #setStructurePointer(String)
+     */
+    public void resetStructurePointer() {
+        setStructurePointer(null);
+    }
+
+    /**
+     * Returns the current structure pointer.
+     * @return the structure pointer (or null if no pointer is active)
+     * @see #setStructurePointer(String)
+     */
+    public String getStructurePointer() {
+        return this.structurePointer;
+    }
+
 }

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/render/intermediate/IFParser.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/render/intermediate/IFParser.java?rev=830293&amp;r1=830292&amp;r2=830293&amp;view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/render/intermediate/IFParser.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/render/intermediate/IFParser.java Tue Oct 27 19:07:52 2009
@@ -25,6 +25,7 @@
 import java.awt.Rectangle;
 import java.awt.geom.AffineTransform;
 import java.util.Map;
+import java.util.Set;
 
 import javax.xml.transform.Source;
 import javax.xml.transform.Transformer;
@@ -34,7 +35,6 @@
 
 import org.w3c.dom.DOMImplementation;
 import org.w3c.dom.Document;
-
 import org.xml.sax.Attributes;
 import org.xml.sax.ContentHandler;
 import org.xml.sax.SAXException;
@@ -46,6 +46,8 @@
 
 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.fo.ElementMapping;
 import org.apache.fop.fo.ElementMappingRegistry;
@@ -59,6 +61,7 @@
 import org.apache.fop.util.ContentHandlerFactoryRegistry;
 import org.apache.fop.util.DOMBuilderContentHandlerFactory;
 import org.apache.fop.util.DefaultErrorListener;
+import org.apache.fop.util.DelegatingContentHandler;
 import org.apache.fop.util.XMLUtil;
 
 /**
@@ -73,6 +76,15 @@
     private static SAXTransformerFactory tFactory
         = (SAXTransformerFactory)SAXTransformerFactory.newInstance();
 
+    private static Set handledNamespaces = new java.util.HashSet();
+
+    static {
+        handledNamespaces.add(XMLNS_NAMESPACE_URI);
+        handledNamespaces.add(XML_NAMESPACE);
+        handledNamespaces.add(NAMESPACE);
+        handledNamespaces.add(XLINK_NAMESPACE);
+    }
+
     /**
      * Parses an intermediate file and paints it.
      * @param src the Source instance pointing to the intermediate file
@@ -140,6 +152,26 @@
 
         private ContentHandler navParser;
 
+        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();
+                startIFElement(EL_PAGE_SEQUENCE, pageSequenceAttributes);
+                pageSequenceAttributes = null;
+            }
+        }
+
         public Handler(IFDocumentHandler documentHandler, FOUserAgent userAgent,
                 ElementMappingRegistry elementMappingRegistry) {
             this.documentHandler = documentHandler;
@@ -163,6 +195,11 @@
             elementHandlers.put(EL_LINE, new LineHandler());
             elementHandlers.put(EL_BORDER_RECT, new BorderRectHandler());
             elementHandlers.put(EL_IMAGE, new ImageHandler());
+
+            if (userAgent.isAccessibilityEnabled()) {
+                structureTreeBuilder = new StructureTreeBuilder(tFactory);
+                userAgent.setStructureTree(structureTreeBuilder.getStructureTree());
+            }
         }
 
         private void establishForeignAttributes(Map foreignAttributes) {
@@ -173,31 +210,50 @@
             documentHandler.getContext().resetForeignAttributes();
         }
 
+        private void establishStructurePointer(String ptr) {
+            documentHandler.getContext().setStructurePointer(ptr);
+        }
+
+        private void resetStructurePointer() {
+            documentHandler.getContext().resetStructurePointer();
+        }
+
         /** {@inheritDoc} */
         public void startElement(String uri, String localName, String qName, Attributes attributes)
                     throws SAXException {
             if (delegate != null) {
-                //delegateStack.push(qName);
                 delegateDepth++;
                 delegate.startElement(uri, localName, qName, attributes);
             } else {
                 boolean handled = true;
                 if (NAMESPACE.equals(uri)) {
-                    lastAttributes = new AttributesImpl(attributes);
-                    ElementHandler elementHandler = (ElementHandler)elementHandlers.get(localName);
-                    content.setLength(0);
-                    ignoreCharacters = true;
-                    if (elementHandler != null) {
-                        ignoreCharacters = elementHandler.ignoreCharacters();
-                        try {
-                            elementHandler.startElement(attributes);
-                        } catch (IFException ife) {
-                            handleIFException(ife);
+                    if (localName.equals(EL_PAGE_SEQUENCE) &amp;&amp; userAgent.isAccessibilityEnabled()) {
+                        pageSequenceAttributes = new AttributesImpl(attributes);
+                        structureTreeBuilderWrapper = new StructureTreeBuilderWrapper();
+                    } else if (localName.equals(EL_STRUCTURE_TREE)) {
+                        if (userAgent.isAccessibilityEnabled()) {
+                            delegate = structureTreeBuilderWrapper;
+                        } else {
+                            /* Delegate to a handler that does nothing */
+                            delegate = new DefaultHandler();
                         }
-                    } else if ("extension-attachments".equals(localName)) {
-                        //TODO implement me
+                        delegateDepth++;
+                        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 = startIFElement(localName, attributes);
                     }
                 } else if (DocumentNavigationExtensionConstants.NAMESPACE.equals(uri)) {
                     if (this.navParser == null) {
@@ -241,6 +297,25 @@
             }
         }
 
+        private boolean startIFElement(String localName, Attributes attributes)
+                throws SAXException {
+            lastAttributes = new AttributesImpl(attributes);
+            ElementHandler elementHandler = (ElementHandler)elementHandlers.get(localName);
+            content.setLength(0);
+            ignoreCharacters = true;
+            if (elementHandler != null) {
+                ignoreCharacters = elementHandler.ignoreCharacters();
+                try {
+                    elementHandler.startElement(attributes);
+                } catch (IFException ife) {
+                    handleIFException(ife);
+                }
+                return true;
+            } else {
+                return false;
+            }
+        }
+
         private void handleIFException(IFException ife) throws SAXException {
             if (ife.getCause() instanceof SAXException) {
                 //unwrap
@@ -352,6 +427,11 @@
 
             public void startElement(Attributes attributes) throws IFException {
                 String id = attributes.getValue("id");
+                String xmllang = attributes.getValue(XML_NAMESPACE, "lang");
+                if (xmllang != null) {
+                    documentHandler.getContext().setLanguage(
+                            XMLUtil.convertRFC3066ToLocale(xmllang));
+                }
                 Map foreignAttributes = getForeignAttributes(lastAttributes);
                 establishForeignAttributes(foreignAttributes);
                 documentHandler.startPageSequence(id);
@@ -360,6 +440,7 @@
 
             public void endElement() throws IFException {
                 documentHandler.endPageSequence();
+                documentHandler.getContext().setLanguage(null);
             }
 
         }
@@ -484,7 +565,9 @@
                 s = lastAttributes.getValue("word-spacing");
                 int wordSpacing = (s != null ? Integer.parseInt(s) : 0);
                 int[] dx = XMLUtil.getAttributeAsIntArray(lastAttributes, "dx");
+                setStructurePointer(lastAttributes);
                 painter.drawText(x, y, letterSpacing, wordSpacing, dx, content.toString());
+                resetStructurePointer();
             }
 
             public boolean ignoreCharacters() {
@@ -579,6 +662,7 @@
                 int height = Integer.parseInt(lastAttributes.getValue("height"));
                 Map foreignAttributes = getForeignAttributes(lastAttributes);
                 establishForeignAttributes(foreignAttributes);
+                setStructurePointer(lastAttributes);
                 if (foreignObject != null) {
                     painter.drawImage(foreignObject,
                             new Rectangle(x, y, width, height));
@@ -592,6 +676,7 @@
                     painter.drawImage(uri, new Rectangle(x, y, width, height));
                 }
                 resetForeignAttributes();
+                resetStructurePointer();
                 inForeignObject = false;
             }
 
@@ -632,11 +717,7 @@
             for (int i = 0, c = atts.getLength(); i &lt; c; i++) {
                 String ns = atts.getURI(i);
                 if (ns.length() &gt; 0) {
-                    if ("http://www.w3.org/2000/xmlns/".equals(ns)) {
-                        continue;
-                    } else if (NAMESPACE.equals(ns)) {
-                        continue;
-                    } else if (XLINK_NAMESPACE.equals(ns)) {
+                    if (handledNamespaces.contains(ns)) {
                         continue;
                     }
                     if (foreignAttributes == null) {
@@ -649,6 +730,13 @@
             return foreignAttributes;
         }
 
+        private void setStructurePointer(Attributes attributes) {
+            String ptr = attributes.getValue("ptr");
+            if (ptr != null &amp;&amp; ptr.length() &gt; 0) {
+                establishStructurePointer(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/render/intermediate/IFRenderer.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/render/intermediate/IFRenderer.java?rev=830293&amp;r1=830292&amp;r2=830293&amp;view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/render/intermediate/IFRenderer.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/render/intermediate/IFRenderer.java Tue Oct 27 19:07:52 2009
@@ -30,6 +30,7 @@
 import java.util.Arrays;
 import java.util.Iterator;
 import java.util.List;
+import java.util.Locale;
 import java.util.Map;
 import java.util.Stack;
 
@@ -493,6 +494,7 @@
         try {
             if (this.inPageSequence) {
                 documentHandler.endPageSequence();
+                documentHandler.getContext().setLanguage(null);
             } else {
                 if (this.documentMetadata == null) {
                     this.documentMetadata = createDefaultDocumentMetadata();
@@ -502,6 +504,7 @@
                 this.inPageSequence = true;
             }
             establishForeignAttributes(pageSequence.getForeignAttributes());
+            documentHandler.getContext().setLanguage(toLocale(pageSequence));
             documentHandler.startPageSequence(null);
             resetForeignAttributes();
             processExtensionAttachments(pageSequence);
@@ -510,6 +513,17 @@
         }
     }
 
+    private Locale toLocale(PageSequence pageSequence) {
+        if (pageSequence.getLanguage() != null) {
+            if (pageSequence.getCountry() != null) {
+                return new Locale(pageSequence.getLanguage(), pageSequence.getCountry());
+            } else {
+                return new Locale(pageSequence.getLanguage());
+            }
+        }
+        return null;
+    }
+
     private Metadata createDefaultDocumentMetadata() {
         Metadata xmp = new Metadata();
         DublinCoreAdapter dc = DublinCoreSchema.getAdapter(xmp);
@@ -604,6 +618,14 @@
         documentHandler.getContext().resetForeignAttributes();
     }
 
+    private void establishStructurePointer(String ptr) {
+        documentHandler.getContext().setStructurePointer(ptr);
+    }
+
+    private void resetStructurePointer() {
+        documentHandler.getContext().resetStructurePointer();
+    }
+
     /** {@inheritDoc} */
     protected void saveGraphicsState() {
         graphicContextStack.push(graphicContext);
@@ -824,17 +846,20 @@
             currentIPPosition = saveIP;
             currentBPPosition = saveBP;
 
-            currentBPPosition += (int)(bv.getAllocBPD());
+            currentBPPosition += bv.getAllocBPD();
         }
         viewportDimensionStack.pop();
     }
 
     /** {@inheritDoc} */
     public void renderViewport(Viewport viewport) {
+        String ptr = (String) viewport.getTrait(Trait.PTR);
+        establishStructurePointer(ptr);
         Dimension dim = new Dimension(viewport.getIPD(), viewport.getBPD());
         viewportDimensionStack.push(dim);
         super.renderViewport(viewport);
         viewportDimensionStack.pop();
+        resetStructurePointer();
     }
 
     /** {@inheritDoc} */
@@ -892,6 +917,7 @@
         // stuff we only need if a link must be created:
         Rectangle ipRect = null;
         AbstractAction action = null;
+        String ptr = (String) ip.getTrait(Trait.PTR); // used for accessibility
         // make sure the rect is determined *before* calling super!
         int ipp = currentIPPosition;
         int bpp = currentBPPosition + ip.getOffset();
@@ -935,6 +961,7 @@
 
         // warn if link trait found but not allowed, else create link
         if (linkTraitFound) {
+            action.setStructurePointer(ptr);  // used for accessibility
             Link link = new Link(action, ipRect);
             this.deferredLinks.add(link);
         }
@@ -969,6 +996,8 @@
 
         String fontName = getInternalFontNameForArea(text);
         int size = ((Integer) text.getTrait(Trait.FONT_SIZE)).intValue();
+        String ptr = (String)text.getTrait(Trait.PTR); // used for accessibility
+        establishStructurePointer(ptr);
 
         // This assumes that *all* CIDFonts use a /ToUnicode mapping
         Typeface tf = getTypeface(fontName);
@@ -990,6 +1019,7 @@
 
         textUtil.flush();
         renderTextDecoration(tf, size, text, bl, rx);
+        resetStructurePointer();
     }
 
     /** {@inheritDoc} */
@@ -1060,10 +1090,10 @@
         private static final int INITIAL_BUFFER_SIZE = 16;
         private int[] dx = new int[INITIAL_BUFFER_SIZE];
         private int lastDXPos = 0;
-        private StringBuffer text = new StringBuffer();
+        private final StringBuffer text = new StringBuffer();
         private int startx, starty;
         private int tls, tws;
-        private boolean combined = false;
+        private final boolean combined = false;
 
         void addChar(char ch) {
             text.append(ch);

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/render/intermediate/IFSerializer.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/render/intermediate/IFSerializer.java?rev=830293&amp;r1=830292&amp;r2=830293&amp;view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/render/intermediate/IFSerializer.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/render/intermediate/IFSerializer.java Tue Oct 27 19:07:52 2009
@@ -27,16 +27,19 @@
 import java.awt.geom.AffineTransform;
 import java.util.Iterator;
 import java.util.List;
+import java.util.Locale;
 import java.util.Map;
 
 import org.w3c.dom.Document;
-
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
 import org.xml.sax.SAXException;
 import org.xml.sax.helpers.AttributesImpl;
 
 import org.apache.xmlgraphics.util.QName;
 import org.apache.xmlgraphics.util.XMLizable;
 
+import org.apache.fop.accessibility.StructureTree;
 import org.apache.fop.fonts.FontInfo;
 import org.apache.fop.render.PrintRendererConfigurator;
 import org.apache.fop.render.RenderingContext;
@@ -60,6 +63,7 @@
         implements IFConstants, IFPainter, IFDocumentNavigationHandler {
 
     private IFDocumentHandler mimicHandler;
+    private int pageSequenceIndex; // used for accessibility
 
     /** Holds the intermediate format state */
     private IFState state;
@@ -210,8 +214,23 @@
             if (id != null) {
                 atts.addAttribute(XML_NAMESPACE, "id", "xml:id", XMLUtil.CDATA, id);
             }
+            Locale lang = getContext().getLanguage();
+            if (lang != null) {
+                atts.addAttribute(XML_NAMESPACE, "lang", "xml:lang", XMLUtil.CDATA,
+                        XMLUtil.toRFC3066(lang));
+            }
             addForeignAttributes(atts);
             handler.startElement(EL_PAGE_SEQUENCE, atts);
+            if (this.getUserAgent().isAccessibilityEnabled()) {
+                StructureTree structureTree = getUserAgent().getStructureTree();
+                handler.startElement(EL_STRUCTURE_TREE); // add structure tree
+                NodeList nodes = structureTree.getPageSequence(pageSequenceIndex++);
+                for (int i = 0, n = nodes.getLength(); i &lt; n; i++) {
+                    Node node = nodes.item(i);
+                    new DOM2SAX(handler).writeFragment(node);
+                }
+                handler.endElement(EL_STRUCTURE_TREE);
+            }
         } catch (SAXException e) {
             throw new IFException("SAX error in startPageSequence()", e);
         }
@@ -392,13 +411,14 @@
             addAttribute(atts, "width", Integer.toString(rect.width));
             addAttribute(atts, "height", Integer.toString(rect.height));
             addForeignAttributes(atts);
+            addStructurePointerAttribute(atts);
             handler.element(EL_IMAGE, atts);
         } catch (SAXException e) {
             throw new IFException("SAX error in startGroup()", e);
         }
     }
 
-    private void addForeignAttributes(AttributesImpl atts) {
+    private void addForeignAttributes(AttributesImpl atts) throws SAXException {
         Map foreignAttributes = getContext().getForeignAttributes();
         if (!foreignAttributes.isEmpty()) {
             Iterator iter = foreignAttributes.entrySet().iterator();
@@ -418,6 +438,7 @@
             addAttribute(atts, "width", Integer.toString(rect.width));
             addAttribute(atts, "height", Integer.toString(rect.height));
             addForeignAttributes(atts);
+            addStructurePointerAttribute(atts);
             handler.startElement(EL_IMAGE, atts);
             new DOM2SAX(handler).writeDocument(doc, true);
             handler.endElement(EL_IMAGE);
@@ -531,6 +552,7 @@
             if (dx != null) {
                 addAttribute(atts, "dx", IFUtil.toString(dx));
             }
+            addStructurePointerAttribute(atts);
             handler.startElement(EL_TEXT, atts);
             char[] chars = text.toCharArray();
             handler.characters(chars, 0, chars.length);
@@ -617,7 +639,8 @@
     }
 
     private void addAttribute(AttributesImpl atts,
-            org.apache.xmlgraphics.util.QName attribute, String value) {
+            org.apache.xmlgraphics.util.QName attribute, String value) throws SAXException {
+        handler.startPrefixMapping(attribute.getPrefix(), attribute.getNamespaceURI());
         XMLUtil.addAttribute(atts, attribute, value);
     }
 
@@ -625,6 +648,13 @@
         XMLUtil.addAttribute(atts, localName, value);
     }
 
+    private void addStructurePointerAttribute(AttributesImpl atts) {
+        String ptr = getContext().getStructurePointer();
+        if (ptr != null) {
+            addAttribute(atts, "ptr", ptr);
+        }
+    }
+
     // ---=== IFDocumentNavigationHandler ===---
 
     private Map incompleteActions = new java.util.HashMap();
@@ -696,6 +726,9 @@
         AttributesImpl atts = new AttributesImpl();
         atts.addAttribute(null, "rect", "rect",
                 XMLConstants.CDATA, IFUtil.toString(link.getTargetRect()));
+        if (getUserAgent().isAccessibilityEnabled()) {
+            addAttribute(atts, "ptr", link.getAction().getStructurePointer());
+        }
         try {
             handler.startElement(DocumentNavigationExtensionConstants.LINK, atts);
             serializeXMLizable(link.getAction());

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/render/intermediate/extensions/AbstractAction.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/render/intermediate/extensions/AbstractAction.java?rev=830293&amp;r1=830292&amp;r2=830293&amp;view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/render/intermediate/extensions/AbstractAction.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/render/intermediate/extensions/AbstractAction.java Tue Oct 27 19:07:52 2009
@@ -27,6 +27,7 @@
 public abstract class AbstractAction implements XMLizable {
 
     private String id;
+    private String structurePointer;
 
     /**
      * Sets an ID to make the action referencable.
@@ -45,6 +46,22 @@
     }
 
     /**
+     * Sets the structure element corresponding to this action.
+     * @param structurePointer a reference to the structure element
+     */
+    public void setStructurePointer(String structurePointer) {
+        this.structurePointer = structurePointer;
+    }
+
+    /**
+     * Returns the structure element corresponding to this action.
+     * @return the reference to the structure element
+     */
+    public String getStructurePointer() {
+        return structurePointer;
+    }
+
+    /**
      * Indicates whether the action has an ID and is therefore referencable.
      * @return true if the action has an ID
      */

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/render/intermediate/extensions/DocumentNavigationHandler.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/render/intermediate/extensions/DocumentNavigationHandler.java?rev=830293&amp;r1=830292&amp;r2=830293&amp;view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/render/intermediate/extensions/DocumentNavigationHandler.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/render/intermediate/extensions/DocumentNavigationHandler.java Tue Oct 27 19:07:52 2009
@@ -48,6 +48,8 @@
 
     private IFDocumentNavigationHandler navHandler;
 
+    private String structurePointer;
+
     /**
      * Main constructor.
      * @param navHandler the navigation handler that will receive the events
@@ -96,6 +98,7 @@
                     throw new SAXException(localName + " must be the root element!");
                 }
                 Rectangle targetRect = XMLUtil.getAttributeAsRectangle(attributes, "rect");
+                structurePointer = attributes.getValue("ptr");
                 Link link = new Link(null, targetRect);
                 objectStack.push(link);
             } else if (GOTO_XY.getLocalName().equals(localName)) {
@@ -118,6 +121,9 @@
                     }
                     action = new GoToXYAction(id, pageIndex, location);
                 }
+                if (structurePointer != null) {
+                    action.setStructurePointer(structurePointer);
+                }
                 objectStack.push(action);
             } else if (GOTO_URI.getLocalName().equals(localName)) {
                 String id = attributes.getValue("id");
@@ -128,6 +134,9 @@
                 if (id != null) {
                     action.setID(id);
                 }
+                if (structurePointer != null) {
+                    action.setStructurePointer(structurePointer);
+                }
                 objectStack.push(action);
             } else {
                 throw new SAXException(

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/render/pdf/PDFContentGenerator.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/render/pdf/PDFContentGenerator.java?rev=830293&amp;r1=830292&amp;r2=830293&amp;view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/render/pdf/PDFContentGenerator.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/render/pdf/PDFContentGenerator.java Tue Oct 27 19:07:52 2009
@@ -56,6 +56,8 @@
     /** Text generation utility holding the current font status */
     protected PDFTextUtil textutil;
 
+    private boolean inMarkedContentSequence;
+    private boolean inArtifactMode;
 
     /**
      * Main constructor. Creates a new PDF stream and additional helper classes for text painting
@@ -153,6 +155,40 @@
         currentStream.add("q\n");
     }
 
+    /** {@inheritDoc} */
+    protected void saveGraphicsState(String structElemType, int sequenceNum) {
+        endTextObject();
+        currentState.save();
+        beginMarkedContentSequence(structElemType, sequenceNum);
+        currentStream.add("q\n");
+    }
+
+    /**
+     * Begins a new marked content sequence (BDC or BMC). If the parameter structElemType is null,
+     * the sequenceNum is ignored and instead of a BDC with the MCID as parameter, an "Artifact"
+     * and a BMC command is generated.
+     * @param structElemType Structure Element Type
+     * @param mcid    Sequence number
+     */
+    protected void beginMarkedContentSequence(String structElemType, int mcid) {
+        assert !this.inMarkedContentSequence;
+        assert !this.inArtifactMode;
+        if (structElemType != null) {
+            currentStream.add(structElemType + " &lt;&lt;/MCID " + String.valueOf(mcid) + "&gt;&gt;\n"
+                    + "BDC\n");
+        } else {
+            currentStream.add("/Artifact\nBMC\n");
+            this.inArtifactMode = true;
+        }
+        this.inMarkedContentSequence = true;
+    }
+
+    void endMarkedContentSequence() {
+        currentStream.add("EMC\n");
+        this.inMarkedContentSequence = false;
+        this.inArtifactMode = false;
+    }
+
     /**
      * Restored the graphics state valid before the previous {@link #saveGraphicsState()}.
      * @param popState true if the state should also be popped, false if only the PDF command
@@ -166,11 +202,42 @@
         }
     }
 
-    /** {@inheritDoc} */
+    /**
+     * Same as {@link #restoreGraphicsState(boolean)}, with &lt;code&gt;true&lt;/code&gt; as
+     * a parameter.
+     */
     protected void restoreGraphicsState() {
         restoreGraphicsState(true);
     }
 
+    /**
+     * Same as {@link #restoreGraphicsState()}, additionally ending the current
+     * marked content sequence if any.
+     */
+    protected void restoreGraphicsStateAccess() {
+        endTextObject();
+        currentStream.add("Q\n");
+        if (this.inMarkedContentSequence) {
+            endMarkedContentSequence();
+        }
+        currentState.restore();
+    }
+
+    /**
+     * Separates 2 text elements, ending the current marked content sequence and
+     * starting a new one.
+     *
+     * @param structElemType structure element type
+     * @param mcid sequence number
+     * @see #beginMarkedContentSequence(String, int)
+     */
+    protected void separateTextElements(String structElemType, int mcid) {
+        textutil.endTextObject();
+        endMarkedContentSequence();
+        beginMarkedContentSequence(structElemType, mcid);
+        textutil.beginTextObject();
+    }
+
     /** Indicates the beginning of a text object. */
     protected void beginTextObject() {
         if (!textutil.isInTextObject()) {
@@ -178,9 +245,27 @@
         }
     }
 
+    /**
+     * Indicates the beginning of a marked-content text object.
+     *
+     * @param structElemType structure element type
+     * @param mcid sequence number
+     * @see #beginTextObject()
+     * @see #beginMarkedContentSequence(String, int)
+     */
+    protected void beginTextObject(String structElemType, int mcid) {
+        if (!textutil.isInTextObject()) {
+            beginMarkedContentSequence(structElemType, mcid);
+            textutil.beginTextObject();
+        }
+    }
+
     /** Indicates the end of a text object. */
     protected void endTextObject() {
         if (textutil.isInTextObject()) {
+            if (this.inMarkedContentSequence) {
+                endMarkedContentSequence();
+            }
             textutil.endTextObject();
         }
     }
@@ -326,5 +411,28 @@
         restoreGraphicsState();
     }
 
+    /**
+     * Places a previously registered image at a certain place on the page,
+     * bracketing it as a marked-content sequence.
+     *
+     * @param x X coordinate
+     * @param y Y coordinate
+     * @param w width for image
+     * @param h height for image
+     * @param xobj the image XObject
+     * @param structElemType structure element type
+     * @param mcid sequence number
+     * @see #beginMarkedContentSequence(String, int)
+     */
+    public void placeImage(float x, float y, float w, float h, PDFXObject xobj,
+            String structElemType, int mcid) {
+        saveGraphicsState(structElemType, mcid);
+        add(format(w) + " 0 0 "
+                          + format(-h) + " "
+                          + format(x) + " "
+                          + format(y + h)
+                          + " cm\n" + xobj.getName() + " Do\n");
+        restoreGraphicsStateAccess();
+    }
 
 }

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/render/pdf/PDFDocumentHandler.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/render/pdf/PDFDocumentHandler.java?rev=830293&amp;r1=830292&amp;r2=830293&amp;view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/render/pdf/PDFDocumentHandler.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/render/pdf/PDFDocumentHandler.java Tue Oct 27 19:07:52 2009
@@ -28,6 +28,8 @@
 import java.io.IOException;
 import java.util.Map;
 
+import org.w3c.dom.NodeList;
+
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 
@@ -50,6 +52,7 @@
 import org.apache.fop.render.intermediate.IFDocumentNavigationHandler;
 import org.apache.fop.render.intermediate.IFException;
 import org.apache.fop.render.intermediate.IFPainter;
+import org.apache.fop.util.XMLUtil;
 
 /**
  * {@link IFDocumentHandler} implementation that produces PDF.
@@ -59,6 +62,12 @@
     /** logging instance */
     private static Log log = LogFactory.getLog(PDFDocumentHandler.class);
 
+    private int pageSequenceIndex;
+
+    private boolean accessEnabled;
+
+    private PDFLogicalStructureHandler logicalStructureHandler;
+
     /** the PDF Document being created */
     protected PDFDocument pdfDoc;
 
@@ -86,7 +95,7 @@
     /** Used for bookmarks/outlines. */
     protected Map pageReferences = new java.util.HashMap();
 
-    private PDFDocumentNavigationHandler documentNavigationHandler
+    private final PDFDocumentNavigationHandler documentNavigationHandler
             = new PDFDocumentNavigationHandler(this);
 
     /**
@@ -97,7 +106,7 @@
 
     /** {@inheritDoc} */
     public boolean supportsPagesOutOfOrder() {
-        return true;
+        return !accessEnabled;
     }
 
     /** {@inheritDoc} */
@@ -125,11 +134,20 @@
         return this.pdfUtil;
     }
 
+    PDFLogicalStructureHandler getLogicalStructureHandler() {
+        return logicalStructureHandler;
+    }
+
     /** {@inheritDoc} */
     public void startDocument() throws IFException {
         super.startDocument();
         try {
             this.pdfDoc = pdfUtil.setupPDFDocument(this.outputStream);
+            this.accessEnabled = getUserAgent().isAccessibilityEnabled();
+            if (accessEnabled) {
+                pdfDoc.getRoot().makeTagged();
+                logicalStructureHandler = new PDFLogicalStructureHandler(pdfDoc);
+            }
         } catch (IOException e) {
             throw new IFException("I/O error in startDocument()", e);
         }
@@ -145,7 +163,6 @@
         try {
             pdfDoc.getResources().addFonts(pdfDoc, fontInfo);
             pdfDoc.outputTrailer(this.outputStream);
-
             this.pdfDoc = null;
 
             pdfResources = null;
@@ -160,7 +177,18 @@
 
     /** {@inheritDoc} */
     public void startPageSequence(String id) throws IFException {
-        //TODO page sequence title, country and language
+        //TODO page sequence title
+
+        if (this.pdfDoc.getRoot().getLanguage() == null
+                &amp;&amp; getContext().getLanguage() != null) {
+            //No document-level language set, so we use the first page-sequence's language
+            this.pdfDoc.getRoot().setLanguage(XMLUtil.toRFC3066(getContext().getLanguage()));
+        }
+
+        if (accessEnabled) {
+            NodeList nodes = getUserAgent().getStructureTree().getPageSequence(pageSequenceIndex++);
+            logicalStructureHandler.processStructureTree(nodes, getContext().getLanguage());
+        }
     }
 
     /** {@inheritDoc} */
@@ -198,13 +226,17 @@
                 toPointAndScale(cropBox, scaleX, scaleY),
                 toPointAndScale(bleedBox, scaleX, scaleY),
                 toPointAndScale(trimBox, scaleX, scaleY));
+        if (accessEnabled) {
+            logicalStructureHandler.startPage(currentPage);
+        }
 
         pdfUtil.generatePageLabel(index, name);
 
         currentPageRef = new PageReference(currentPage, size);
         this.pageReferences.put(new Integer(index), currentPageRef);
 
-        this.generator = new PDFContentGenerator(this.pdfDoc, this.outputStream, this.currentPage);
+        this.generator = new PDFContentGenerator(this.pdfDoc, this.outputStream,
+                this.currentPage);
         // Transform the PDF's default coordinate system (0,0 at lower left) to the PDFPainter's
         AffineTransform basicPageTransform = new AffineTransform(1, 0, 0, -1, 0,
                 (scaleY * size.height) / 1000f);
@@ -221,7 +253,7 @@
 
     /** {@inheritDoc} */
     public IFPainter startPageContent() throws IFException {
-        return new PDFPainter(this);
+        return new PDFPainter(this, logicalStructureHandler);
     }
 
     /** {@inheritDoc} */
@@ -231,6 +263,9 @@
 
     /** {@inheritDoc} */
     public void endPage() throws IFException {
+        if (accessEnabled) {
+            logicalStructureHandler.endPage();
+        }
         try {
             this.documentNavigationHandler.commit();
             this.pdfDoc.registerObject(generator.getStream());
@@ -267,8 +302,8 @@
 
     static final class PageReference {
 
-        private PDFReference pageRef;
-        private Dimension pageDimension;
+        private final PDFReference pageRef;
+        private final Dimension pageDimension;
 
         private PageReference(PDFPage page, Dimension dim) {
             this.pageRef = page.makeReference();

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/render/pdf/PDFDocumentNavigationHandler.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/render/pdf/PDFDocumentNavigationHandler.java?rev=830293&amp;r1=830292&amp;r2=830293&amp;view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/render/pdf/PDFDocumentNavigationHandler.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/render/pdf/PDFDocumentNavigationHandler.java Tue Oct 27 19:07:52 2009
@@ -47,10 +47,10 @@
  */
 public class PDFDocumentNavigationHandler implements IFDocumentNavigationHandler {
 
-    private PDFDocumentHandler documentHandler;
+    private final PDFDocumentHandler documentHandler;
 
-    private Map incompleteActions = new java.util.HashMap();
-    private Map completeActions = new java.util.HashMap();
+    private final Map incompleteActions = new java.util.HashMap();
+    private final Map completeActions = new java.util.HashMap();
 
     /**
      * Default constructor.
@@ -111,6 +111,11 @@
         PDFLink pdfLink = getPDFDoc().getFactory().makeLink(
                 targetRect2D, pdfAction);
         if (pdfLink != null) {
+            String ptr = link.getAction().getStructurePointer();
+            if (documentHandler.getUserAgent().isAccessibilityEnabled()
+                    &amp;&amp; ptr != null &amp;&amp; ptr.length() &gt; 0) {
+                documentHandler.getLogicalStructureHandler().addLinkContentItem(pdfLink, ptr);
+            }
             documentHandler.currentPage.addAnnotation(pdfLink);
         }
     }

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/render/pdf/PDFImageHandlerGraphics2D.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/render/pdf/PDFImageHandlerGraphics2D.java?rev=830293&amp;r1=830292&amp;r2=830293&amp;view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/render/pdf/PDFImageHandlerGraphics2D.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/render/pdf/PDFImageHandlerGraphics2D.java Tue Oct 27 19:07:52 2009
@@ -35,6 +35,7 @@
 import org.apache.fop.render.AbstractImageHandlerGraphics2D;
 import org.apache.fop.render.RendererContext;
 import org.apache.fop.render.RenderingContext;
+import org.apache.fop.render.pdf.PDFLogicalStructureHandler.MarkedContentInfo;
 import org.apache.fop.svg.PDFGraphics2D;
 
 /**
@@ -63,6 +64,9 @@
                 renderer.currentPage,
                 renderer.getFontInfo());
         Rectangle effPos = new Rectangle(origin.x + pos.x, origin.y + pos.y, pos.width, pos.height);
+        if (context.getUserAgent().isAccessibilityEnabled()) {
+            pdfContext.setMarkedContentInfo(renderer.addCurrentImageToStructureTree());
+        }
         handleImage(pdfContext, image, effPos);
         return null;
     }
@@ -87,7 +91,13 @@
         float sy = fheight / (float)imh;
 
         generator.comment("G2D start");
-        generator.saveGraphicsState();
+        boolean accessibilityEnabled = context.getUserAgent().isAccessibilityEnabled();
+        if (accessibilityEnabled) {
+            MarkedContentInfo mci = pdfContext.getMarkedContentInfo();
+            generator.saveGraphicsState(mci.tag, mci.mcid);
+        } else {
+            generator.saveGraphicsState();
+        }
         generator.updateColor(Color.black, false, null);
         generator.updateColor(Color.black, true, null);
 
@@ -115,7 +125,11 @@
         imageG2D.getGraphics2DImagePainter().paint(graphics, area);
 
         generator.add(graphics.getString());
-        generator.restoreGraphicsState();
+        if (accessibilityEnabled) {
+            generator.restoreGraphicsStateAccess();
+        } else {
+            generator.restoreGraphicsState();
+        }
         generator.comment("G2D end");
     }
 

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/render/pdf/PDFImageHandlerRawJPEG.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/render/pdf/PDFImageHandlerRawJPEG.java?rev=830293&amp;r1=830292&amp;r2=830293&amp;view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/render/pdf/PDFImageHandlerRawJPEG.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/render/pdf/PDFImageHandlerRawJPEG.java Tue Oct 27 19:07:52 2009
@@ -34,6 +34,7 @@
 import org.apache.fop.render.ImageHandler;
 import org.apache.fop.render.RendererContext;
 import org.apache.fop.render.RenderingContext;
+import org.apache.fop.render.pdf.PDFLogicalStructureHandler.MarkedContentInfo;
 
 /**
  * Image handler implementation which handles raw JPEG images for PDF output.
@@ -82,7 +83,12 @@
         float y = (float)pos.getY() / 1000f;
         float w = (float)pos.getWidth() / 1000f;
         float h = (float)pos.getHeight() / 1000f;
-        generator.placeImage(x, y, w, h, xobj);
+        if (context.getUserAgent().isAccessibilityEnabled()) {
+            MarkedContentInfo mci = pdfContext.getMarkedContentInfo();
+            generator.placeImage(x, y, w, h, xobj, mci.tag, mci.mcid);
+        } else {
+            generator.placeImage(x, y, w, h, xobj);
+        }
     }
 
     /** {@inheritDoc} */

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/render/pdf/PDFImageHandlerRenderedImage.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/render/pdf/PDFImageHandlerRenderedImage.java?rev=830293&amp;r1=830292&amp;r2=830293&amp;view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/render/pdf/PDFImageHandlerRenderedImage.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/render/pdf/PDFImageHandlerRenderedImage.java Tue Oct 27 19:07:52 2009
@@ -34,6 +34,7 @@
 import org.apache.fop.render.ImageHandler;
 import org.apache.fop.render.RendererContext;
 import org.apache.fop.render.RenderingContext;
+import org.apache.fop.render.pdf.PDFLogicalStructureHandler.MarkedContentInfo;
 
 /**
  * Image handler implementation which handles RenderedImage instances for PDF output.
@@ -83,7 +84,12 @@
         float y = (float)pos.getY() / 1000f;
         float w = (float)pos.getWidth() / 1000f;
         float h = (float)pos.getHeight() / 1000f;
-        generator.placeImage(x, y, w, h, xobj);
+        if (context.getUserAgent().isAccessibilityEnabled()) {
+            MarkedContentInfo mci = pdfContext.getMarkedContentInfo();
+            generator.placeImage(x, y, w, h, xobj, mci.tag, mci.mcid);
+        } else {
+            generator.placeImage(x, y, w, h, xobj);
+        }
     }
 
     /** {@inheritDoc} */

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/render/pdf/PDFImageHandlerSVG.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/render/pdf/PDFImageHandlerSVG.java?rev=830293&amp;r1=830292&amp;r2=830293&amp;view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/render/pdf/PDFImageHandlerSVG.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/render/pdf/PDFImageHandlerSVG.java Tue Oct 27 19:07:52 2009
@@ -40,6 +40,7 @@
 import org.apache.fop.image.loader.batik.BatikImageFlavors;
 import org.apache.fop.render.ImageHandler;
 import org.apache.fop.render.RenderingContext;
+import org.apache.fop.render.pdf.PDFLogicalStructureHandler.MarkedContentInfo;
 import org.apache.fop.svg.PDFAElementBridge;
 import org.apache.fop.svg.PDFBridgeContext;
 import org.apache.fop.svg.PDFGraphics2D;
@@ -101,8 +102,8 @@
         float w = (float)ctx.getDocumentSize().getWidth() * 1000f;
         float h = (float)ctx.getDocumentSize().getHeight() * 1000f;
 
-        float sx = pos.width / (float)w;
-        float sy = pos.height / (float)h;
+        float sx = pos.width / w;
+        float sy = pos.height / h;
 
         //Scaling and translation for the bounding box of the image
         AffineTransform scaling = new AffineTransform(
@@ -121,6 +122,10 @@
          */
         generator.comment("SVG setup");
         generator.saveGraphicsState();
+        if (context.getUserAgent().isAccessibilityEnabled()) {
+            MarkedContentInfo mci = pdfContext.getMarkedContentInfo();
+            generator.beginMarkedContentSequence(mci.tag, mci.mcid);
+        }
         generator.setColor(Color.black, false);
         generator.setColor(Color.black, true);
 
@@ -168,7 +173,11 @@
             eventProducer.svgRenderingError(this, e, image.getInfo().getOriginalURI());
         }
         generator.getState().restore();
-        generator.restoreGraphicsState();
+        if (context.getUserAgent().isAccessibilityEnabled()) {
+            generator.restoreGraphicsStateAccess();
+        } else {
+            generator.restoreGraphicsState();
+        }
         generator.comment("SVG end");
     }
 

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/render/pdf/PDFPainter.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/render/pdf/PDFPainter.java?rev=830293&amp;r1=830292&amp;r2=830293&amp;view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/render/pdf/PDFPainter.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/render/pdf/PDFPainter.java Tue Oct 27 19:07:52 2009
@@ -29,9 +29,6 @@
 
 import org.w3c.dom.Document;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
 import org.apache.fop.fonts.Font;
 import org.apache.fop.fonts.FontInfo;
 import org.apache.fop.fonts.FontTriplet;
@@ -47,6 +44,7 @@
 import org.apache.fop.render.intermediate.IFContext;
 import org.apache.fop.render.intermediate.IFException;
 import org.apache.fop.render.intermediate.IFState;
+import org.apache.fop.render.pdf.PDFLogicalStructureHandler.MarkedContentInfo;
 import org.apache.fop.traits.BorderProps;
 import org.apache.fop.traits.RuleStyle;
 import org.apache.fop.util.CharUtilities;
@@ -56,26 +54,33 @@
  */
 public class PDFPainter extends AbstractIFPainter {
 
-    /** logging instance */
-    private static Log log = LogFactory.getLog(PDFPainter.class);
-
-    private PDFDocumentHandler documentHandler;
+    private final PDFDocumentHandler documentHandler;
 
     /** The current content generator */
     protected PDFContentGenerator generator;
 
-    private PDFBorderPainter borderPainter;
+    private final PDFBorderPainter borderPainter;
+
+    private boolean accessEnabled;
+
+    private MarkedContentInfo imageMCI;
+
+    private PDFLogicalStructureHandler logicalStructureHandler;
 
     /**
      * Default constructor.
      * @param documentHandler the parent document handler
+     * @param logicalStructureHandler the logical structure handler
      */
-    public PDFPainter(PDFDocumentHandler documentHandler) {
+    public PDFPainter(PDFDocumentHandler documentHandler,
+            PDFLogicalStructureHandler logicalStructureHandler) {
         super();
         this.documentHandler = documentHandler;
+        this.logicalStructureHandler = logicalStructureHandler;
         this.generator = documentHandler.generator;
         this.borderPainter = new PDFBorderPainter(this.generator);
         this.state = IFState.create();
+        accessEnabled = this.getUserAgent().isAccessibilityEnabled();
     }
 
     /** {@inheritDoc} */
@@ -122,22 +127,36 @@
     }
 
     /** {@inheritDoc} */
-    public void drawImage(String uri, Rectangle rect) throws IFException {
+    public void drawImage(String uri, Rectangle rect)
+            throws IFException {
         PDFXObject xobject = getPDFDoc().getXObject(uri);
         if (xobject != null) {
-            placeImage(rect, xobject);
-            return;
+            if (accessEnabled) {
+                String ptr = getContext().getStructurePointer();
+                prepareImageMCID(ptr);
+                placeImageAccess(rect, xobject);
+            } else {
+                placeImage(rect, xobject);
+            }
+        } else {
+            if (accessEnabled) {
+                String ptr = getContext().getStructurePointer();
+                prepareImageMCID(ptr);
+            }
+            drawImageUsingURI(uri, rect);
+            flushPDFDoc();
         }
+    }
 
-        drawImageUsingURI(uri, rect);
-
-        flushPDFDoc();
+    private void prepareImageMCID(String ptr) {
+        imageMCI = logicalStructureHandler.addImageContentItem(ptr);
     }
 
     /** {@inheritDoc} */
     protected RenderingContext createRenderingContext() {
         PDFRenderingContext pdfContext = new PDFRenderingContext(
                 getUserAgent(), generator, this.documentHandler.currentPage, getFontInfo());
+        pdfContext.setMarkedContentInfo(imageMCI);
         return pdfContext;
     }
 
@@ -158,11 +177,31 @@
                           + " cm " + xobj.getName() + " Do\n");
         generator.restoreGraphicsState();
     }
+    /**
+     * Places a previously registered image at a certain place on the page - Accessibility version
+     * @param x X coordinate
+     * @param y Y coordinate
+     * @param w width for image
+     * @param h height for image
+     * @param xobj the image XObject
+     */
+    private void placeImageAccess(Rectangle rect, PDFXObject xobj) {
+        generator.saveGraphicsState(imageMCI.tag, imageMCI.mcid);
+        generator.add(format(rect.width) + " 0 0 "
+                          + format(-rect.height) + " "
+                          + format(rect.x) + " "
+                          + format(rect.y + rect.height )
+                          + " cm " + xobj.getName() + " Do\n");
+        generator.restoreGraphicsStateAccess();
+    }
 
     /** {@inheritDoc} */
     public void drawImage(Document doc, Rectangle rect) throws IFException {
+        if (accessEnabled) {
+            String ptr = getContext().getStructurePointer();
+            prepareImageMCID(ptr);
+        }
         drawImageUsingDocument(doc, rect);
-
         flushPDFDoc();
     }
 
@@ -253,10 +292,22 @@
     }
 
     /** {@inheritDoc} */
-    public void drawText(int x, int y, int letterSpacing, int wordSpacing, int[] dx, String text)
+    public void drawText(int x, int y, int letterSpacing, int wordSpacing, int[] dx,
+            String text)
             throws IFException {
-        generator.updateColor(state.getTextColor(), true, null);
-        generator.beginTextObject();
+        if (accessEnabled) {
+            String ptr = getContext().getStructurePointer();
+            MarkedContentInfo mci = logicalStructureHandler.addTextContentItem(ptr);
+            if (generator.getTextUtil().isInTextObject()) {
+                generator.separateTextElements(mci.tag, mci.mcid);
+            }
+            generator.updateColor(state.getTextColor(), true, null);
+            generator.beginTextObject(mci.tag, mci.mcid);
+        } else {
+            generator.updateColor(state.getTextColor(), true, null);
+            generator.beginTextObject();
+        }
+
         FontTriplet triplet = new FontTriplet(
                 state.getFontFamily(), state.getFontStyle(), state.getFontWeight());
         //TODO Ignored: state.getFontVariant()
@@ -277,7 +328,7 @@
         PDFTextUtil textutil = generator.getTextUtil();
         textutil.updateTf(fontKey, fontSize, tf.isMultiByte());
 
-        generator.updateCharacterSpacing((float)letterSpacing / 1000f);
+        generator.updateCharacterSpacing(letterSpacing / 1000f);
 
         textutil.writeTextMatrix(new AffineTransform(1, 0, 0, -1, x / 1000f, y / 1000f));
         int l = text.length();

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/render/pdf/PDFRenderer.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/render/pdf/PDFRenderer.java?rev=830293&amp;r1=830292&amp;r2=830293&amp;view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/render/pdf/PDFRenderer.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/render/pdf/PDFRenderer.java Tue Oct 27 19:07:52 2009
@@ -31,8 +31,12 @@
 import java.io.OutputStream;
 import java.util.Iterator;
 import java.util.List;
+import java.util.Locale;
 import java.util.Map;
 
+import org.w3c.dom.Document;
+import org.w3c.dom.NodeList;
+
 import org.apache.xmlgraphics.image.loader.ImageException;
 import org.apache.xmlgraphics.image.loader.ImageFlavor;
 import org.apache.xmlgraphics.image.loader.ImageInfo;
@@ -61,6 +65,7 @@
 import org.apache.fop.area.inline.Leader;
 import org.apache.fop.area.inline.SpaceArea;
 import org.apache.fop.area.inline.TextArea;
+import org.apache.fop.area.inline.Viewport;
 import org.apache.fop.area.inline.WordArea;
 import org.apache.fop.datatypes.URISpecification;
 import org.apache.fop.events.ResourceEventProducer;
@@ -91,9 +96,11 @@
 import org.apache.fop.render.AbstractPathOrientedRenderer;
 import org.apache.fop.render.Graphics2DAdapter;
 import org.apache.fop.render.RendererContext;
+import org.apache.fop.render.pdf.PDFLogicalStructureHandler.MarkedContentInfo;
 import org.apache.fop.traits.RuleStyle;
 import org.apache.fop.util.AbstractPaintingState;
 import org.apache.fop.util.CharUtilities;
+import org.apache.fop.util.XMLUtil;
 import org.apache.fop.util.AbstractPaintingState.AbstractData;
 
 /**
@@ -127,7 +134,7 @@
      * this is used for prepared pages that cannot be immediately
      * rendered
      */
-    protected Map pages = null;
+    private Map pages;
 
     /**
      * Maps unique PageViewport key to PDF page reference
@@ -193,6 +200,14 @@
     /** Image handler registry */
     private final PDFImageHandlerRegistry imageHandlerRegistry = new PDFImageHandlerRegistry();
 
+    private boolean accessEnabled;
+
+    private PDFLogicalStructureHandler logicalStructureHandler;
+
+    private int pageSequenceIndex;
+
+    /** Reference in the structure tree to the image being rendered. */
+    private String imageReference;
 
     /**
      * create the PDF renderer
@@ -204,6 +219,7 @@
     public void setUserAgent(FOUserAgent agent) {
         super.setUserAgent(agent);
         this.pdfUtil = new PDFRenderingUtil(getUserAgent());
+        accessEnabled = agent.isAccessibilityEnabled();
     }
 
     PDFRenderingUtil getPDFUtil() {
@@ -225,6 +241,10 @@
         }
         ostream = stream;
         this.pdfDoc = pdfUtil.setupPDFDocument(stream);
+        if (accessEnabled) {
+            pdfDoc.getRoot().makeTagged();
+            logicalStructureHandler = new PDFLogicalStructureHandler(pdfDoc);
+        }
     }
 
     /**
@@ -274,8 +294,7 @@
      * {@inheritDoc}
      */
     public boolean supportsOutOfOrder() {
-        //return false;
-        return true;
+        return !accessEnabled;
     }
 
     /**
@@ -394,17 +413,24 @@
                 info.setTitle(str);
             }
         }
+        Locale language = null;
         if (pageSequence.getLanguage() != null) {
             String lang = pageSequence.getLanguage();
             String country = pageSequence.getCountry();
-            String langCode = lang + (country != null ? "-" + country : "");
+            if (lang != null) {
+                language = (country == null) ? new Locale(lang) : new Locale(lang, country);
+            }
             if (pdfDoc.getRoot().getLanguage() == null) {
                 //Only set if not set already (first non-null is used)
                 //Note: No checking is performed whether the values are valid!
-                pdfDoc.getRoot().setLanguage(langCode);
+                pdfDoc.getRoot().setLanguage(XMLUtil.toRFC3066(language));
             }
         }
         pdfUtil.generateDefaultXMPMetadata();
+        if (accessEnabled) {
+            NodeList nodes = getUserAgent().getStructureTree().getPageSequence(pageSequenceIndex++);
+            logicalStructureHandler.processStructureTree(nodes, language);
+        }
     }
 
     /**
@@ -457,6 +483,10 @@
         }
         currentPageRef = currentPage.referencePDF();
 
+        if (accessEnabled) {
+            logicalStructureHandler.startPage(currentPage);
+        }
+
         Rectangle bounds = page.getViewArea();
         pageHeight = bounds.height;
 
@@ -474,6 +504,10 @@
 
         super.renderPage(page);
 
+        if (accessEnabled) {
+            logicalStructureHandler.endPage();
+        }
+
         this.pdfDoc.registerObject(generator.getStream());
         currentPage.setContents(generator.getStream());
         PDFAnnotList annots = currentPage.getAnnotations();
@@ -903,11 +937,22 @@
                          + pdfDoc.getProfile());
             } else if (action != null) {
                 PDFLink pdfLink = factory.makeLink(ipRect, action);
+                if (accessEnabled) {
+                    String ptr = (String) ip.getTrait(Trait.PTR);
+                    logicalStructureHandler.addLinkContentItem(pdfLink, ptr);
+                }
                 currentPage.addAnnotation(pdfLink);
             }
         }
     }
 
+    /** {@inheritDoc} */
+    public void renderViewport(Viewport viewport) {
+        imageReference = (String) viewport.getTrait(Trait.PTR);
+        super.renderViewport(viewport);
+        imageReference = null;
+    }
+
     private Typeface getTypeface(String fontName) {
         Typeface tf = (Typeface) fontInfo.getFonts().get(fontName);
         if (tf instanceof LazyFont) {
@@ -922,7 +967,16 @@
         Color ct = (Color) text.getTrait(Trait.COLOR);
         updateColor(ct, true);
 
-        beginTextObject();
+        if (accessEnabled) {
+            String ptr = (String) text.getTrait(Trait.PTR);
+            MarkedContentInfo mci = logicalStructureHandler.addTextContentItem(ptr);
+            if (generator.getTextUtil().isInTextObject()) {
+                generator.separateTextElements(mci.tag, mci.mcid);
+            }
+            generator.beginTextObject(mci.tag, mci.mcid);
+        } else {
+            beginTextObject();
+        }
 
         String fontName = getInternalFontNameForArea(text);
         int size = ((Integer) text.getTrait(Trait.FONT_SIZE)).intValue();
@@ -1178,13 +1232,22 @@
      * @param xobj the image XObject
      */
     public void placeImage(float x, float y, float w, float h, PDFXObject xobj) {
-        saveGraphicsState();
+        if (accessEnabled) {
+            MarkedContentInfo mci = logicalStructureHandler.addImageContentItem(imageReference);
+            generator.saveGraphicsState(mci.tag, mci.mcid);
+        } else {
+            saveGraphicsState();
+        }
         generator.add(format(w) + " 0 0 "
                           + format(-h) + " "
                           + format(currentIPPosition / 1000f + x) + " "
                           + format(currentBPPosition / 1000f + h + y)
                           + " cm\n" + xobj.getName() + " Do\n");
-        restoreGraphicsState();
+        if (accessEnabled) {
+            generator.restoreGraphicsStateAccess();
+        } else {
+            restoreGraphicsState();
+        }
     }
 
     /** {@inheritDoc} */
@@ -1205,6 +1268,18 @@
         return context;
     }
 
+    /** {@inheritDoc} */
+    public void renderDocument(Document doc, String ns, Rectangle2D pos, Map foreignAttributes) {
+        if (accessEnabled) {
+            MarkedContentInfo mci = logicalStructureHandler.addImageContentItem(imageReference);
+            generator.beginMarkedContentSequence(mci.tag, mci.mcid);
+        }
+        super.renderDocument(doc, ns, pos, foreignAttributes);
+        if (accessEnabled) {
+            generator.endMarkedContentSequence();
+        }
+    }
+
     /**
      * Render leader area.
      * This renders a leader area which is an area with a rule.
@@ -1272,5 +1347,9 @@
     public void setEncryptionParams(PDFEncryptionParams encryptionParams) {
         this.pdfUtil.setEncryptionParams(encryptionParams);
     }
+
+    MarkedContentInfo addCurrentImageToStructureTree() {
+        return logicalStructureHandler.addImageContentItem(imageReference);
+    }
 }
 

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/render/pdf/PDFRenderingContext.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/render/pdf/PDFRenderingContext.java?rev=830293&amp;r1=830292&amp;r2=830293&amp;view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/render/pdf/PDFRenderingContext.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/render/pdf/PDFRenderingContext.java Tue Oct 27 19:07:52 2009
@@ -25,6 +25,7 @@
 import org.apache.fop.fonts.FontInfo;
 import org.apache.fop.pdf.PDFPage;
 import org.apache.fop.render.AbstractRenderingContext;
+import org.apache.fop.render.pdf.PDFLogicalStructureHandler.MarkedContentInfo;
 
 /**
  * Rendering context for PDF production.
@@ -34,6 +35,7 @@
     private PDFContentGenerator generator;
     private FontInfo fontInfo;
     private PDFPage page;
+    private MarkedContentInfo mci;
 
     /**
      * Main constructor.
@@ -79,4 +81,11 @@
         return this.fontInfo;
     }
 
+    void setMarkedContentInfo(MarkedContentInfo mci) {
+        this.mci = mci;
+    }
+
+    MarkedContentInfo getMarkedContentInfo() {
+        return mci;
+    }
 }

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/render/pdf/PDFRenderingUtil.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/render/pdf/PDFRenderingUtil.java?rev=830293&amp;r1=830292&amp;r2=830293&amp;view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/render/pdf/PDFRenderingUtil.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/render/pdf/PDFRenderingUtil.java Tue Oct 27 19:07:52 2009
@@ -37,6 +37,7 @@
 import org.apache.xmlgraphics.xmp.schemas.XMPBasicAdapter;
 import org.apache.xmlgraphics.xmp.schemas.XMPBasicSchema;
 
+import org.apache.fop.accessibility.Accessibility;
 import org.apache.fop.apps.FOUserAgent;
 import org.apache.fop.fo.extensions.xmp.XMPMetadata;
 import org.apache.fop.pdf.PDFAMode;
@@ -109,7 +110,7 @@
 
     private void initialize() {
         PDFEncryptionParams params
-        = (PDFEncryptionParams)userAgent.getRendererOptions().get(ENCRYPTION_PARAMS);
+                = (PDFEncryptionParams)userAgent.getRendererOptions().get(ENCRYPTION_PARAMS);
         if (params != null) {
             this.encryptionParams = params; //overwrite if available
         }
@@ -161,6 +162,10 @@
         if (s != null) {
             this.pdfAMode = PDFAMode.valueOf(s);
         }
+        if (this.pdfAMode.isPDFA1LevelA()) {
+            //Enable accessibility if PDF/A-1a is enabled because it requires tagged PDF.
+            userAgent.getRendererOptions().put(Accessibility.ACCESSIBILITY, Boolean.TRUE);
+        }
         s = (String)userAgent.getRendererOptions().get(PDF_X_MODE);
         if (s != null) {
             this.pdfXMode = PDFXMode.valueOf(s);

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/render/txt/TXTRenderer.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/render/txt/TXTRenderer.java?rev=830293&amp;r1=830292&amp;r2=830293&amp;view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/render/txt/TXTRenderer.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/render/txt/TXTRenderer.java Tue Oct 27 19:07:52 2009
@@ -28,6 +28,8 @@
 import java.util.List;
 import java.util.Map;
 
+import org.apache.xmlgraphics.util.UnitConv;
+
 import org.apache.fop.apps.FOPException;
 import org.apache.fop.area.Area;
 import org.apache.fop.area.CTM;
@@ -37,7 +39,6 @@
 import org.apache.fop.render.AbstractPathOrientedRenderer;
 import org.apache.fop.render.txt.border.AbstractBorderElement;
 import org.apache.fop.render.txt.border.BorderManager;
-import org.apache.xmlgraphics.util.UnitConv;
 
 /**
  * Renderer that renders areas to plain text.

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/render/xml/XMLRenderer.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/render/xml/XMLRenderer.java?rev=830293&amp;r1=830292&amp;r2=830293&amp;view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/render/xml/XMLRenderer.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/render/xml/XMLRenderer.java Tue Oct 27 19:07:52 2009
@@ -34,7 +34,8 @@
 import javax.xml.transform.stream.StreamResult;
 
 import org.w3c.dom.Document;
-
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
 import org.xml.sax.SAXException;
 
 import org.apache.xmlgraphics.util.QName;
@@ -86,6 +87,7 @@
 import org.apache.fop.render.RendererContext;
 import org.apache.fop.render.XMLHandler;
 import org.apache.fop.util.ColorUtil;
+import org.apache.fop.util.DOM2SAX;
 
 /**
  * Renderer that renders areas to XML for debugging purposes.
@@ -105,6 +107,8 @@
     /** If not null, the XMLRenderer will mimic another renderer by using its font setup. */
     protected Renderer mimic;
 
+    private int pageSequenceIndex;
+
     /**
      * Creates a new XML renderer.
      */
@@ -440,6 +444,20 @@
         }
         transferForeignObjects(pageSequence);
         startElement("pageSequence", atts);
+        if (this.getUserAgent().isAccessibilityEnabled()) {
+            String structureTreeElement = "structureTree";
+            startElement(structureTreeElement);
+            NodeList nodes = getUserAgent().getStructureTree().getPageSequence(pageSequenceIndex++);
+            for (int i = 0, n = nodes.getLength(); i &lt; n; i++) {
+                Node node = nodes.item(i);
+                try {
+                    new DOM2SAX(handler).writeFragment(node);
+                } catch (SAXException e) {
+                    handleSAXException(e);
+                }
+            }
+            endElement(structureTreeElement);
+        }
         handleExtensionAttachments(pageSequence.getExtensionAttachments());
         LineArea seqTitle = pageSequence.getTitle();
         if (seqTitle != null) {

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/util/DOM2SAX.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/util/DOM2SAX.java?rev=830293&amp;r1=830292&amp;r2=830293&amp;view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/util/DOM2SAX.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/util/DOM2SAX.java Tue Oct 27 19:07:52 2009
@@ -26,7 +26,6 @@
 import org.w3c.dom.Document;
 import org.w3c.dom.NamedNodeMap;
 import org.w3c.dom.Node;
-
 import org.xml.sax.ContentHandler;
 import org.xml.sax.SAXException;
 import org.xml.sax.ext.LexicalHandler;
@@ -79,6 +78,15 @@
     }
 
     /**
+     * Writes the given fragment using the given ContentHandler.
+     * @param node DOM node
+     * @throws SAXException In case of a problem while writing XML
+     */
+    public void writeFragment(Node node) throws SAXException {
+        writeNode(node);
+    }
+
+    /**
      * Begin the scope of namespace prefix. Forward the event to the SAX handler
      * only if the prefix is unknown or it is mapped to a different URI.
      */

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/util/XMLUtil.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/util/XMLUtil.java?rev=830293&amp;r1=830292&amp;r2=830293&amp;view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/util/XMLUtil.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/util/XMLUtil.java Tue Oct 27 19:07:52 2009
@@ -21,6 +21,7 @@
 
 import java.awt.Rectangle;
 import java.awt.geom.Rectangle2D;
+import java.util.Locale;
 
 import org.xml.sax.Attributes;
 import org.xml.sax.SAXException;
@@ -170,4 +171,39 @@
         atts.addAttribute("", localName, localName, XMLUtil.CDATA, value);
     }
 
+    /**
+     * Converts a {@link Locale} instance to an RFC 3066 compliant language identifier.
+     * @param language the language
+     * @return the formatted language identifier
+     */
+    public static String toRFC3066(Locale language) {
+        if (language == null || language.getLanguage().length() == 0) {
+            return null;
+        }
+        StringBuffer sb = new StringBuffer();
+        sb.append(language.getLanguage());
+        if (language.getCountry().length() &gt; 0) {
+            sb.append('-');
+            sb.append(language.getCountry());
+        }
+        return sb.toString();
+    }
+
+    /**
+     * Converts an RFC 3066 compliant language identifier to a {@link Locale} instance.
+     * @param lang the language string
+     * @return the converted locale instance
+     */
+    public static Locale convertRFC3066ToLocale(String lang) {
+        if (lang == null || lang.length() == 0) {
+            return null;
+        }
+        String[] parts = lang.split("-");
+        if (parts.length == 1) {
+            return new Locale(parts[0]);
+        } else {
+            return new Locale(parts[0], parts[1]);
+        }
+    }
+
 }

Modified: xmlgraphics/fop/trunk/src/sandbox/org/apache/fop/render/svg/SVGPainter.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/sandbox/org/apache/fop/render/svg/SVGPainter.java?rev=830293&amp;r1=830292&amp;r2=830293&amp;view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/sandbox/org/apache/fop/render/svg/SVGPainter.java (original)
+++ xmlgraphics/fop/trunk/src/sandbox/org/apache/fop/render/svg/SVGPainter.java Tue Oct 27 19:07:52 2009
@@ -324,8 +324,9 @@
     }
 
     /** {@inheritDoc} */
-    public void drawText(int x, int y, int letterSpacing, int wordSpacing, int[] dx, String text)
-                throws IFException {
+
+    public void drawText(int x, int y, int letterSpacing, int wordSpacing, int[] dx,
+            String text) throws IFException {
         try {
             establish(MODE_TEXT);
             AttributesImpl atts = new AttributesImpl();

Modified: xmlgraphics/fop/trunk/status.xml
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/status.xml?rev=830293&amp;r1=830292&amp;r2=830293&amp;view=diff
==============================================================================
--- xmlgraphics/fop/trunk/status.xml (original)
+++ xmlgraphics/fop/trunk/status.xml Tue Oct 27 19:07:52 2009
@@ -58,6 +58,9 @@
       documents. Example: the fix of marks layering will be such a case when it's done.
     --&gt;
     &lt;release version="FOP Trunk" date="TBD"&gt;
+      &lt;action context="Renderers" dev="JM,VH" type="add" fixes-bug="46705" due-to="Jost Klopfstein"&gt;
+        Added basic accessibility and Tagged PDF support. 
+      &lt;/action&gt;
       &lt;action context="Code" dev="JM" type="add"&gt;
         Added support for encoding CMYK bitmap images (IOCA FS45) and TIFF images as embedded objects.
       &lt;/action&gt;

Modified: xmlgraphics/fop/trunk/test/java/org/apache/fop/render/pdf/PDFAConformanceTestCase.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/test/java/org/apache/fop/render/pdf/PDFAConformanceTestCase.java?rev=830293&amp;r1=830292&amp;r2=830293&amp;view=diff
==============================================================================
--- xmlgraphics/fop/trunk/test/java/org/apache/fop/render/pdf/PDFAConformanceTestCase.java (original)
+++ xmlgraphics/fop/trunk/test/java/org/apache/fop/render/pdf/PDFAConformanceTestCase.java Tue Oct 27 19:07:52 2009
@@ -99,7 +99,8 @@
         foFile = new File(foBaseDir, "with-cmyk-images.fo");
         try {
             convertFO(foFile, getUserAgent(), dumpPDF);
-            fail("Expected PDFConformanceException. PDF/A-1 does not allow PostScript XObjects.");
+            fail("Expected PDFConformanceException."
+                    + " PDF/A-1 does not allow mixing DeviceRGB and DeviceCMYK.");
         } catch (PDFConformanceException e) {
             //Good!
         }

Modified: xmlgraphics/fop/trunk/test/layoutengine/standard-testcases/foreign-attributes.xml
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/test/layoutengine/standard-testcases/foreign-attributes.xml?rev=830293&amp;r1=830292&amp;r2=830293&amp;view=diff
==============================================================================
--- xmlgraphics/fop/trunk/test/layoutengine/standard-testcases/foreign-attributes.xml (original)
+++ xmlgraphics/fop/trunk/test/layoutengine/standard-testcases/foreign-attributes.xml Tue Oct 27 19:07:52 2009
@@ -31,9 +31,6 @@
       &lt;/fo:layout-master-set&gt;
       &lt;fo:page-sequence master-reference="normal"&gt;
         &lt;fo:flow flow-name="xsl-region-body"&gt;
-          &lt;fo:block id="eg"&gt;
-            &lt;fo:external-graphic src="../../resources/images/bgimg300dpi.jpg" fox:alt="description"/&gt;
-          &lt;/fo:block&gt;
           &lt;fo:block id="bl"&gt;
             &lt;fo:basic-link external-destination="url(http://xmlgraphics.apache.org/fop/)" fox:blah="fop"&gt;FOP&lt;/fo:basic-link&gt;
           &lt;/fo:block&gt;
@@ -43,7 +40,6 @@
   &lt;/fo&gt;
   &lt;checks xmlns:fox="http://xmlgraphics.apache.org/fop/extensions"&gt;
     &lt;eval expected="bar" xpath="//pageViewport[1]/@fox:foo"/&gt;
-    &lt;eval expected="description" xpath="//block[@prod-id='eg']//image/@fox:alt"/&gt;
     &lt;!--eval expected="fop" xpath="//block[@prod-id='bl']/inlineparent/@fox:blah"/&gt; NYI --&gt;
   &lt;/checks&gt;
 &lt;/testcase&gt;

Modified: xmlgraphics/fop/trunk/test/layoutengine/standard-testcases/page-sequence_language.xml
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/test/layoutengine/standard-testcases/page-sequence_language.xml?rev=830293&amp;r1=830292&amp;r2=830293&amp;view=diff
==============================================================================
--- xmlgraphics/fop/trunk/test/layoutengine/standard-testcases/page-sequence_language.xml (original)
+++ xmlgraphics/fop/trunk/test/layoutengine/standard-testcases/page-sequence_language.xml Tue Oct 27 19:07:52 2009
@@ -65,4 +65,10 @@
     &lt;eval expected="de" xpath="/areaTree/pageSequence[4]/@language"/&gt;
     &lt;true xpath="not(boolean(/areaTree/pageSequence[4]/@country))"/&gt;
   &lt;/checks&gt;
+  &lt;if-checks xmlns:if="http://xmlgraphics.apache.org/fop/intermediate"&gt;
+    &lt;eval expected="en" xpath="//if:page-sequence[1]/@xml:lang"/&gt;
+    &lt;eval expected="en-US" xpath="//if:page-sequence[2]/@xml:lang"/&gt;
+    &lt;eval expected="de-CH" xpath="//if:page-sequence[3]/@xml:lang"/&gt;
+    &lt;eval expected="de" xpath="//if:page-sequence[4]/@xml:lang"/&gt;
+  &lt;/if-checks&gt;
 &lt;/testcase&gt;



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



</pre>
</div>
</content>
</entry>
<entry>
<title>svn commit: r830280 - in /xmlgraphics/fop/branches/Temp_Accessibility: ./ conf/ examples/embedding/java/embedding/atxml/ examples/embedding/xml/xslt/ src/documentation/content/xdocs/trunk/ src/java/META-INF/services/ src/java/org/apache/fop/cli/ src/ja...</title>
<author><name>vhennebert@apache.org</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/xmlgraphics-fop-commits/200910.mbox/%3c20091027181633.B0BEF238889D@eris.apache.org%3e"/>
<id>urn:uuid:%3c20091027181633-B0BEF238889D@eris-apache-org%3e</id>
<updated>2009-10-27T18:16:33Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Author: vhennebert
Date: Tue Oct 27 18:16:31 2009
New Revision: 830280

URL: http://svn.apache.org/viewvc?rev=830280&amp;view=rev
Log:
Merged changes from Trunk up to revision 830265

Modified:
    xmlgraphics/fop/branches/Temp_Accessibility/   (props changed)
    xmlgraphics/fop/branches/Temp_Accessibility/conf/fop.xconf
    xmlgraphics/fop/branches/Temp_Accessibility/examples/embedding/java/embedding/atxml/ExampleConcat.java
  (props changed)
    xmlgraphics/fop/branches/Temp_Accessibility/examples/embedding/java/embedding/atxml/ExampleStamp.java
  (props changed)
    xmlgraphics/fop/branches/Temp_Accessibility/examples/embedding/xml/xslt/ifstamp.xsl  
(props changed)
    xmlgraphics/fop/branches/Temp_Accessibility/src/documentation/content/xdocs/trunk/output.xml
    xmlgraphics/fop/branches/Temp_Accessibility/src/java/META-INF/services/org.apache.fop.render.intermediate.IFDocumentHandler
  (props changed)
    xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/cli/CommandLineOptions.java
    xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/cli/InputHandler.java
    xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/events/EventFormatter.xml
    xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/events/ResourceEventProducer.java
    xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/layoutmgr/PageBreakingAlgorithm.java
    xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/render/AbstractImageHandlerGraphics2D.java
  (props changed)
    xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/render/AbstractRenderingContext.java
  (props changed)
    xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/render/ImageHandlerBase.java
  (props changed)
    xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/render/ImageHandlerRegistry.java
  (props changed)
    xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/render/intermediate/AbstractBinaryWritingIFDocumentHandler.java
  (props changed)
    xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/render/intermediate/AbstractIFDocumentHandler.java
  (props changed)
    xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/render/intermediate/AbstractIFDocumentHandlerMaker.java
  (props changed)
    xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/render/intermediate/AbstractXMLWritingIFDocumentHandler.java
  (props changed)
    xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/render/intermediate/IFContentHandler.java
  (props changed)
    xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/render/intermediate/IFDocumentHandlerConfigurator.java
  (props changed)
    xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/render/intermediate/IFPainter.java
  (props changed)
    xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/render/intermediate/IFRenderer.java
  (props changed)
    xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/render/intermediate/extensions/DocumentNavigationExtensionConstants.java
  (props changed)
    xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/render/intermediate/extensions/DocumentNavigationHandler.java
  (props changed)
    xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/render/pcl/PCLDocumentHandler.java
  (props changed)
    xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/render/pcl/PCLDocumentHandlerMaker.java
  (props changed)
    xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/render/pdf/PDFDocumentHandler.java
  (props changed)
    xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/render/pdf/PDFDocumentHandlerMaker.java
  (props changed)
    xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/render/pdf/PDFImageHandlerSVG.java
  (props changed)
    xmlgraphics/fop/branches/Temp_Accessibility/src/sandbox/META-INF/services/org.apache.fop.render.intermediate.IFDocumentHandler
  (props changed)
    xmlgraphics/fop/branches/Temp_Accessibility/src/sandbox/org/apache/fop/render/svg/AbstractSVGDocumentHandler.java
  (props changed)
    xmlgraphics/fop/branches/Temp_Accessibility/src/sandbox/org/apache/fop/render/svg/SVGDocumentHandler.java
  (props changed)
    xmlgraphics/fop/branches/Temp_Accessibility/src/sandbox/org/apache/fop/render/svg/SVGDocumentHandlerMaker.java
  (props changed)
    xmlgraphics/fop/branches/Temp_Accessibility/src/sandbox/org/apache/fop/render/svg/SVGPrintDocumentHandler.java
  (props changed)
    xmlgraphics/fop/branches/Temp_Accessibility/src/sandbox/org/apache/fop/render/svg/SVGPrintDocumentHandlerMaker.java
  (props changed)
    xmlgraphics/fop/branches/Temp_Accessibility/test/java/org/apache/fop/intermediate/AbstractIntermediateTestCase.java
  (props changed)
    xmlgraphics/fop/branches/Temp_Accessibility/test/java/org/apache/fop/intermediate/AreaTreeXMLFormatTestSuite.java
  (props changed)
    xmlgraphics/fop/branches/Temp_Accessibility/test/java/org/apache/fop/intermediate/IFParserTestCase.java
  (props changed)

Propchange: xmlgraphics/fop/branches/Temp_Accessibility/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Oct 27 18:16:31 2009
@@ -1,4 +1,4 @@
 /xmlgraphics/fop/branches/Temp_AFPGOCAResources:630874-721418
 /xmlgraphics/fop/branches/Temp_AreaTreeNewDesign:745924-746655
 /xmlgraphics/fop/branches/fop-0_95:684572,688085,688696
-/xmlgraphics/fop/trunk:603620-829121
+/xmlgraphics/fop/trunk:603620-830265

Modified: xmlgraphics/fop/branches/Temp_Accessibility/conf/fop.xconf
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_Accessibility/conf/fop.xconf?rev=830280&amp;r1=830279&amp;r2=830280&amp;view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_Accessibility/conf/fop.xconf (original)
+++ xmlgraphics/fop/branches/Temp_Accessibility/conf/fop.xconf Tue Oct 27 18:16:31 2009
@@ -443,10 +443,6 @@
     &lt;/renderer&gt;
     --&gt;
 
-    &lt;renderer mime="text/plain"&gt;
-      &lt;pageSize columns="80"/&gt;
-    &lt;/renderer&gt;
-
   &lt;/renderers&gt;
 
 &lt;/fop&gt;

Propchange: xmlgraphics/fop/branches/Temp_Accessibility/examples/embedding/java/embedding/atxml/ExampleConcat.java
            ('svn:mergeinfo' removed)

Propchange: xmlgraphics/fop/branches/Temp_Accessibility/examples/embedding/java/embedding/atxml/ExampleStamp.java
            ('svn:mergeinfo' removed)

Propchange: xmlgraphics/fop/branches/Temp_Accessibility/examples/embedding/xml/xslt/ifstamp.xsl
            ('svn:mergeinfo' removed)

Modified: xmlgraphics/fop/branches/Temp_Accessibility/src/documentation/content/xdocs/trunk/output.xml
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_Accessibility/src/documentation/content/xdocs/trunk/output.xml?rev=830280&amp;r1=830279&amp;r2=830280&amp;view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_Accessibility/src/documentation/content/xdocs/trunk/output.xml
(original)
+++ xmlgraphics/fop/branches/Temp_Accessibility/src/documentation/content/xdocs/trunk/output.xml
Tue Oct 27 18:16:31 2009
@@ -704,8 +704,15 @@
 ]]&gt;&lt;/source&gt;
       &lt;p&gt;When the native attribute is specified and set to "true", all image resources
will be natively injected
       into the datastream using an object container rather than being converted into an IOCA
FS45 image.
-      Support for native image formats (e.g. JPEG, GIF) is not always available on printer
implementations
+      Support for native image formats (e.g. JPEG, TIFF, GIF) is not always available on
printer implementations
       so by default this configuration option is set to "false".&lt;/p&gt;
+      &lt;p&gt;
+        Setting &lt;code&gt;cmyk="true"&lt;/code&gt; on the &lt;code&gt;images&lt;/code&gt;
element will enable CMYK
+        colors. This will only have an effect if the color mode is set to "color". Example:
+      &lt;/p&gt;
+      &lt;source&gt;&lt;![CDATA[
+      &lt;images mode="color" cmyk="true"/&gt;
+]]&gt;&lt;/source&gt;
       &lt;/section&gt;
       &lt;section id="afp-shading-config"&gt;
         &lt;title&gt;Shading&lt;/title&gt;

Propchange: xmlgraphics/fop/branches/Temp_Accessibility/src/java/META-INF/services/org.apache.fop.render.intermediate.IFDocumentHandler
            ('svn:mergeinfo' removed)

Modified: xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/cli/CommandLineOptions.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/cli/CommandLineOptions.java?rev=830280&amp;r1=830279&amp;r2=830280&amp;view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/cli/CommandLineOptions.java
(original)
+++ xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/cli/CommandLineOptions.java
Tue Oct 27 18:16:31 2009
@@ -1028,7 +1028,11 @@
             case IF_INPUT:
                 return new IFInputHandler(iffile);
             case XSLT_INPUT:
-                return new InputHandler(xmlfile, xsltfile, xsltParams, useCatalogResolver);
+                InputHandler handler = new InputHandler(xmlfile, xsltfile, xsltParams);
+                if (useCatalogResolver) {
+                    handler.createCatalogResolver(foUserAgent);
+                }
+                return handler;
             case IMAGE_INPUT:
                 return new ImageInputHandler(imagefile, xsltfile, xsltParams);
             default:

Modified: xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/cli/InputHandler.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/cli/InputHandler.java?rev=830280&amp;r1=830279&amp;r2=830280&amp;view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/cli/InputHandler.java
(original)
+++ xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/cli/InputHandler.java
Tue Oct 27 18:16:31 2009
@@ -51,6 +51,7 @@
 import org.apache.fop.apps.FOUserAgent;
 import org.apache.fop.apps.Fop;
 import org.apache.fop.apps.FopFactory;
+import org.apache.fop.events.ResourceEventProducer;
 import org.apache.fop.render.awt.viewer.Renderable;
 
 /**
@@ -64,8 +65,8 @@
     protected File sourcefile;
     private File stylesheet;  // for XML/XSLT usage
     private Vector xsltParams; // for XML/XSLT usage
-    private EntityResolver entityResolver;
-    private URIResolver uriResolver;
+    private EntityResolver entityResolver = null;
+    private URIResolver uriResolver = null;
 
     /** the logger */
     protected Log log = LogFactory.getLog(InputHandler.class);
@@ -85,23 +86,6 @@
     }
 
     /**
-     * Constructor for XML-&gt;XSLT-&gt;FO input
-     *
-     * @param xmlfile XML file
-     * @param xsltfile XSLT file
-     * @param params Vector of command-line parameters (name, value,
-     *      name, value, ...) for XSL stylesheet, null if none
-     * @param useCatalogResolver if true, use a catalog resolver
-     *      for XML parsing and XSLT URI resolution
-     */
-    public InputHandler(File xmlfile, File xsltfile, Vector params, boolean useCatalogResolver)
{
-        this(xmlfile, xsltfile, params);
-        if (useCatalogResolver) {
-            createCatalogResolver();
-        }
-    }
-
-    /**
      * Constructor for FO input
      * @param fofile the file to read the FO document.
      */
@@ -213,10 +197,12 @@
      * Tries the Apache Commons Resolver, and if unsuccessful,
      * tries the same built into Java 6.
      */
-    private void createCatalogResolver() {
+    public void createCatalogResolver(FOUserAgent userAgent) {
         String[] classNames = new String[] {
                 "org.apache.xml.resolver.tools.CatalogResolver",
                 "com.sun.org.apache.xml.internal.resolver.tools.CatalogResolver"};
+        ResourceEventProducer eventProducer =
+            ResourceEventProducer.Provider.get(userAgent.getEventBroadcaster());
         Class resolverClass = null;
         for (int i = 0; i &lt; classNames.length &amp;&amp; resolverClass == null; ++i) {
             try {
@@ -226,7 +212,7 @@
             }
         }
         if (resolverClass == null) {
-            log.error("Could not find catalog resolver in class path");
+            eventProducer.catalogResolverNotFound(this);
             return;
         }
         try {
@@ -234,8 +220,10 @@
             uriResolver = (URIResolver) resolverClass.newInstance();
         } catch (InstantiationException e) {
             log.error("Error creating the catalog resolver: " + e.getMessage());
+            eventProducer.catalogResolverNotCreated(this, e.getMessage());
         } catch (IllegalAccessException e) {
             log.error("Error creating the catalog resolver: " + e.getMessage());
+            eventProducer.catalogResolverNotCreated(this, e.getMessage());
         }
     }
 

Modified: xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/events/EventFormatter.xml
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/events/EventFormatter.xml?rev=830280&amp;r1=830279&amp;r2=830280&amp;view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/events/EventFormatter.xml
(original)
+++ xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/events/EventFormatter.xml
Tue Oct 27 18:16:31 2009
@@ -79,6 +79,8 @@
   &lt;message key="org.apache.fop.events.ResourceEventProducer.foreignXMLNoHandler"&gt;Some
XML content will be ignored. No handler defined for XML with namespace "{namespaceURI}".&lt;/message&gt;
   &lt;message key="org.apache.fop.events.ResourceEventProducer.imageWritingError"&gt;Error
while writing an image to the target file.[ Reason: {e}]&lt;/message&gt;
   &lt;message key="org.apache.fop.events.ResourceEventProducer.cannotDeleteTempFile"&gt;Temporary
file could not be deleted: {tempFile}&lt;/message&gt;
+  &lt;message key="org.apache.fop.events.ResourceEventProducer.catalogResolverNotFound"&gt;Catalog
resolver not found along the classpath&lt;/message&gt;
+  &lt;message key="org.apache.fop.events.ResourceEventProducer.catalogResolverNotCreated"&gt;Error
creating the catalog resolver: {message}&lt;/message&gt;
   &lt;message key="org.apache.fop.layoutmgr.inline.InlineLevelEventProducer.leaderWithoutContent"&gt;fo:leader
is set to "use-content" but has no content.{{locator}}&lt;/message&gt;
   &lt;message key="org.apache.fop.layoutmgr.inline.InlineLevelEventProducer.lineOverflows"&gt;Line
{line} of a paragraph overflows the available area by {overflowLength,choice,50000#{overflowLength}
millipoints|50000&amp;lt;more than 50 points}.{{locator}}&lt;/message&gt;
   &lt;message key="org.apache.fop.layoutmgr.BlockLevelEventProducer.rowTooTall"&gt;The contents
of table-row {row} are taller than they should be (there is a block-progression-dimension
or height constraint on the indicated row). Due to its contents the row grows to {effCellBPD}
millipoints, but the row shouldn't get any taller than {maxCellBPD} millipoints.{{locator}}&lt;/message&gt;

Modified: xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/events/ResourceEventProducer.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/events/ResourceEventProducer.java?rev=830280&amp;r1=830279&amp;r2=830280&amp;view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/events/ResourceEventProducer.java
(original)
+++ xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/events/ResourceEventProducer.java
Tue Oct 27 18:16:31 2009
@@ -133,4 +133,18 @@
      */
     void cannotDeleteTempFile(Object source, File tempFile);
 
+    /**
+     * Catalog Resolver not found along the class path
+     * @param source the event source
+     * @event.severity ERROR
+     */
+    void catalogResolverNotFound(Object source);
+
+    /**
+     * Catalog Resolver not created, due to InstantiationException or IllegalAccessException
+     * @param source the event source
+     * @param message the exception message
+     * @event.severity ERROR
+     */
+    void catalogResolverNotCreated(Object source, String message);
 }

Modified: xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/layoutmgr/PageBreakingAlgorithm.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/layoutmgr/PageBreakingAlgorithm.java?rev=830280&amp;r1=830279&amp;r2=830280&amp;view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/layoutmgr/PageBreakingAlgorithm.java
(original)
+++ xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/layoutmgr/PageBreakingAlgorithm.java
Tue Oct 27 18:16:31 2009
@@ -117,10 +117,6 @@
         this.layoutListener = layoutListener;
         best = new BestPageRecords();
         this.footnoteSeparatorLength = (MinOptMax) footnoteSeparatorLength.clone();
-        // add some stretch, to avoid a restart for every page containing footnotes
-        if (footnoteSeparatorLength.min == footnoteSeparatorLength.max) {
-            footnoteSeparatorLength.max += 10000;
-        }
         this.autoHeight = autoHeight;
         this.favorSinglePart = favorSinglePart;
     }

Propchange: xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/render/AbstractImageHandlerGraphics2D.java
            ('svn:mergeinfo' removed)

Propchange: xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/render/AbstractRenderingContext.java
            ('svn:mergeinfo' removed)

Propchange: xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/render/ImageHandlerBase.java
            ('svn:mergeinfo' removed)

Propchange: xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/render/ImageHandlerRegistry.java
            ('svn:mergeinfo' removed)

Propchange: xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/render/intermediate/AbstractBinaryWritingIFDocumentHandler.java
            ('svn:mergeinfo' removed)

Propchange: xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/render/intermediate/AbstractIFDocumentHandler.java
            ('svn:mergeinfo' removed)

Propchange: xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/render/intermediate/AbstractIFDocumentHandlerMaker.java
            ('svn:mergeinfo' removed)

Propchange: xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/render/intermediate/AbstractXMLWritingIFDocumentHandler.java
            ('svn:mergeinfo' removed)

Propchange: xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/render/intermediate/IFContentHandler.java
            ('svn:mergeinfo' removed)

Propchange: xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/render/intermediate/IFDocumentHandlerConfigurator.java
            ('svn:mergeinfo' removed)

Propchange: xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/render/intermediate/IFPainter.java
            ('svn:mergeinfo' removed)

Propchange: xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/render/intermediate/IFRenderer.java
            ('svn:mergeinfo' removed)

Propchange: xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/render/intermediate/extensions/DocumentNavigationExtensionConstants.java
            ('svn:mergeinfo' removed)

Propchange: xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/render/intermediate/extensions/DocumentNavigationHandler.java
            ('svn:mergeinfo' removed)

Propchange: xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/render/pcl/PCLDocumentHandler.java
            ('svn:mergeinfo' removed)

Propchange: xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/render/pcl/PCLDocumentHandlerMaker.java
            ('svn:mergeinfo' removed)

Propchange: xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/render/pdf/PDFDocumentHandler.java
            ('svn:mergeinfo' removed)

Propchange: xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/render/pdf/PDFDocumentHandlerMaker.java
            ('svn:mergeinfo' removed)

Propchange: xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/render/pdf/PDFImageHandlerSVG.java
            ('svn:mergeinfo' removed)

Propchange: xmlgraphics/fop/branches/Temp_Accessibility/src/sandbox/META-INF/services/org.apache.fop.render.intermediate.IFDocumentHandler
            ('svn:mergeinfo' removed)

Propchange: xmlgraphics/fop/branches/Temp_Accessibility/src/sandbox/org/apache/fop/render/svg/AbstractSVGDocumentHandler.java
            ('svn:mergeinfo' removed)

Propchange: xmlgraphics/fop/branches/Temp_Accessibility/src/sandbox/org/apache/fop/render/svg/SVGDocumentHandler.java
            ('svn:mergeinfo' removed)

Propchange: xmlgraphics/fop/branches/Temp_Accessibility/src/sandbox/org/apache/fop/render/svg/SVGDocumentHandlerMaker.java
            ('svn:mergeinfo' removed)

Propchange: xmlgraphics/fop/branches/Temp_Accessibility/src/sandbox/org/apache/fop/render/svg/SVGPrintDocumentHandler.java
            ('svn:mergeinfo' removed)

Propchange: xmlgraphics/fop/branches/Temp_Accessibility/src/sandbox/org/apache/fop/render/svg/SVGPrintDocumentHandlerMaker.java
            ('svn:mergeinfo' removed)

Propchange: xmlgraphics/fop/branches/Temp_Accessibility/test/java/org/apache/fop/intermediate/AbstractIntermediateTestCase.java
            ('svn:mergeinfo' removed)

Propchange: xmlgraphics/fop/branches/Temp_Accessibility/test/java/org/apache/fop/intermediate/AreaTreeXMLFormatTestSuite.java
            ('svn:mergeinfo' removed)

Propchange: xmlgraphics/fop/branches/Temp_Accessibility/test/java/org/apache/fop/intermediate/IFParserTestCase.java
            ('svn:mergeinfo' removed)



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



</pre>
</div>
</content>
</entry>
<entry>
<title>svn commit: r830257 - in /xmlgraphics/fop/trunk: examples/embedding/java/embedding/atxml/ examples/embedding/xml/xslt/ src/java/META-INF/services/ src/sandbox/META-INF/services/ src/sandbox/org/apache/fop/render/svg/ test/java/org/apache/fop/intermediate/</title>
<author><name>vhennebert@apache.org</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/xmlgraphics-fop-commits/200910.mbox/%3c20091027173715.445CC238889D@eris.apache.org%3e"/>
<id>urn:uuid:%3c20091027173715-445CC238889D@eris-apache-org%3e</id>
<updated>2009-10-27T17:37:15Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Author: vhennebert
Date: Tue Oct 27 17:37:14 2009
New Revision: 830257

URL: http://svn.apache.org/viewvc?rev=830257&amp;view=rev
Log:
Deleted unnecessary svn:mergeinfo property (same values as on the root)

Modified:
    xmlgraphics/fop/trunk/examples/embedding/java/embedding/atxml/ExampleConcat.java   (props
changed)
    xmlgraphics/fop/trunk/examples/embedding/java/embedding/atxml/ExampleStamp.java   (props
changed)
    xmlgraphics/fop/trunk/examples/embedding/xml/xslt/ifstamp.xsl   (props changed)
    xmlgraphics/fop/trunk/src/java/META-INF/services/org.apache.fop.render.intermediate.IFDocumentHandler
  (props changed)
    xmlgraphics/fop/trunk/src/sandbox/META-INF/services/org.apache.fop.render.intermediate.IFDocumentHandler
  (props changed)
    xmlgraphics/fop/trunk/src/sandbox/org/apache/fop/render/svg/AbstractSVGDocumentHandler.java
  (props changed)
    xmlgraphics/fop/trunk/src/sandbox/org/apache/fop/render/svg/SVGDocumentHandler.java  
(props changed)
    xmlgraphics/fop/trunk/src/sandbox/org/apache/fop/render/svg/SVGDocumentHandlerMaker.java
  (props changed)
    xmlgraphics/fop/trunk/src/sandbox/org/apache/fop/render/svg/SVGPrintDocumentHandler.java
  (props changed)
    xmlgraphics/fop/trunk/src/sandbox/org/apache/fop/render/svg/SVGPrintDocumentHandlerMaker.java
  (props changed)
    xmlgraphics/fop/trunk/test/java/org/apache/fop/intermediate/AbstractIntermediateTestCase.java
  (props changed)
    xmlgraphics/fop/trunk/test/java/org/apache/fop/intermediate/AreaTreeXMLFormatTestSuite.java
  (props changed)
    xmlgraphics/fop/trunk/test/java/org/apache/fop/intermediate/IFParserTestCase.java   (props
changed)

Propchange: xmlgraphics/fop/trunk/examples/embedding/java/embedding/atxml/ExampleConcat.java
            ('svn:mergeinfo' removed)

Propchange: xmlgraphics/fop/trunk/examples/embedding/java/embedding/atxml/ExampleStamp.java
            ('svn:mergeinfo' removed)

Propchange: xmlgraphics/fop/trunk/examples/embedding/xml/xslt/ifstamp.xsl
            ('svn:mergeinfo' removed)

Propchange: xmlgraphics/fop/trunk/src/java/META-INF/services/org.apache.fop.render.intermediate.IFDocumentHandler
            ('svn:mergeinfo' removed)

Propchange: xmlgraphics/fop/trunk/src/sandbox/META-INF/services/org.apache.fop.render.intermediate.IFDocumentHandler
            ('svn:mergeinfo' removed)

Propchange: xmlgraphics/fop/trunk/src/sandbox/org/apache/fop/render/svg/AbstractSVGDocumentHandler.java
            ('svn:mergeinfo' removed)

Propchange: xmlgraphics/fop/trunk/src/sandbox/org/apache/fop/render/svg/SVGDocumentHandler.java
            ('svn:mergeinfo' removed)

Propchange: xmlgraphics/fop/trunk/src/sandbox/org/apache/fop/render/svg/SVGDocumentHandlerMaker.java
            ('svn:mergeinfo' removed)

Propchange: xmlgraphics/fop/trunk/src/sandbox/org/apache/fop/render/svg/SVGPrintDocumentHandler.java
            ('svn:mergeinfo' removed)

Propchange: xmlgraphics/fop/trunk/src/sandbox/org/apache/fop/render/svg/SVGPrintDocumentHandlerMaker.java
            ('svn:mergeinfo' removed)

Propchange: xmlgraphics/fop/trunk/test/java/org/apache/fop/intermediate/AbstractIntermediateTestCase.java
            ('svn:mergeinfo' removed)

Propchange: xmlgraphics/fop/trunk/test/java/org/apache/fop/intermediate/AreaTreeXMLFormatTestSuite.java
            ('svn:mergeinfo' removed)

Propchange: xmlgraphics/fop/trunk/test/java/org/apache/fop/intermediate/IFParserTestCase.java
            ('svn:mergeinfo' removed)



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



</pre>
</div>
</content>
</entry>
<entry>
<title>=?utf-8?q?=5BXmlgraphics-fop_Wiki=5D_Update_of_=22PDF=5FAccessibility=22_?= =?utf-8?q?by_VincentHennebert?=</title>
<author><name>Apache Wiki &lt;wikidiffs@apache.org&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/xmlgraphics-fop-commits/200910.mbox/%3c20091026154127.1653.12867@eos.apache.org%3e"/>
<id>urn:uuid:%3c20091026154127-1653-12867@eos-apache-org%3e</id>
<updated>2009-10-26T15:41:27Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Xmlgraphics-fop Wiki" for change notification.

The "PDF_Accessibility" page has been changed by VincentHennebert.
The comment on this change is: Updated to reflect current implementation, user guide moved
to website.
http://wiki.apache.org/xmlgraphics-fop/PDF_Accessibility?action=diff&amp;rev1=4&amp;rev2=5

--------------------------------------------------

  
  '''(R2)''' Providing textual descriptions for images (see PDF Reference 1.4 section 9.8.2,
"Alternate Descriptions")  
  
- '''(R3)''' Specifying the natural language used for text in a PDF document - for example,
as English or German (see PDF Reference 1.4 section 9.8.1, "Natural Language Specification").
An accessible PDF document should include the document's default language which applies to
all text in a PDF document. You can change a language on descendant elements by overriding
the document's language.
+ '''(R3)''' Specifying the natural language used for text in a PDF document - for example,
as English or German (see PDF Reference 1.4 section 9.8.1, "Natural Language Specification").
An accessible PDF document should include the document's default language which applies to
all text in a PDF document. The language can be set on descendant elements by overriding the
document's language, but FOP does not currently carry over that information to the PDF output.
- 
- The section [[#head-1aae9f58ba7b221421d56567b1b6a50d9a75792c|Changes to your XSL-FO input
files]] will illustrate where you provide this information in the input XSL-FO file.
  
  == Implementation ==
  
- The initial implementation is for PDF output only (as this is the only currently implemented
format that supports accessibility) and is based on the code for the new intermediate format.
+ The initial implementation is for PDF output only, as this is the only currently implemented
format that supports accessibility.
  
- The challenge is to find the corresponding FO of a text element or image that is sent to
the PDFPainter.drawText respectively PDFPainter.drawImage from the LM's. This is required
to build the structure tree.
+ The challenge is to find the FO element that corresponds to a piece of text or an image
to be rendered. This is required to build the structure tree.
  
- The current implementation uses 2 XSLT transforms as a preprocess in Fop.getDefaultHandler.
The first {{{addPtr.xsl}}} adds a pointer attribute with an unique value to each FO that appears
in the structure tree. The second transform {{{reduceFOTree.xsl}}} removes all elements, attributes
and text from the input FO, that are not required in the structure tree. The result from this
second transform can be seen in the new IF, where it is split per page-sequence. See the element
{{{structure-tree}}} below:
+ The current implementation uses 2 XSLT transforms as a preprocess in Fop.getDefaultHandler.
The first {{{addPtr.xsl}}} adds a pointer attribute with a unique value to each FO that appears
in the structure tree. The second transform {{{reduceFOTree.xsl}}} removes all elements, attributes
and text from the input FO, that are not required in the structure tree. The result from this
second transform can be seen in the intermediate XML, where it is split per page-sequence.
See the element {{{structure-tree}}} below for the IF ({{{structureTree}}} for Area Tree XML):
  
  {{{ 
  &lt;?xml version="1.0" encoding="UTF-8"?&gt;
@@ -73, +71 @@

  &lt;/document&gt;   
  }}}
  
+ The pointer information is passed to the PDF text or image drawing methods. It is used to
associate the PDF stream that will be produced out of the text or image to its parent structure
element. The intermediate XML formats carry over that information (see elements {{{text}}}
and {{{image}}} above).
- The pointer information is also passed to the PDFPainter.drawText and PDFPainter.drawImage
method. You can find the pointer attributes in the above IF in the {{{page}}} element in the
elements {{{text}}} and {{{image}}}.
- 
- == User Guide ==
- 
- === Enabling PDF accessibility ===
- 
- There are 3 ways to enable PDF accessibility:
- 
-  * '''Command line''' The command line option -a turns on accessibility. {{{fop -a -fo testcases/tc1/tc1.fo
-pdf testcases/tc1/tc1.pdf}}}
-  * '''Embedding''' {{{userAgent.getRendererOptions().put("accessibility", Boolean.TRUE);}}}
-  * '''Optional setting in fop.xconf file'''
- {{{  
- &lt;fop version="1.0"&gt;
-     &lt;accessibility&gt;true&lt;/accessibility&gt;
-     ...
- &lt;/fop&gt;
- }}}
- 
- Make sure to call the new PDF code when you embed FOP in your Java code: {{{MimeConstants.MIME_PDF
+ ";mode=painter"}}}
- === Changes to your XSL-FO input files ===
- 
-  * '''(R1)''' Table cells require a table row as the parent.
-  * '''(R1)''' Ensure that the order of {{{fo:block-container}}} in a page corresponds to
the reading order.
-  * '''(R2)''' Alternate text for images: The attribute {{{fox:alt-text}}} has been added
for {{{fo:external-graphic}}} and {{{fo:instream-foreign-object}}}.
-  * '''(R3)''' Document's default language: ''The document's default language is currently
hard coded to English.''
- 
- === Note ===
- 
- Adjust the Java heap size in order to process larger files.
  
  == TODO ==
  

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



</pre>
</div>
</content>
</entry>
<entry>
<title>svn commit: r829769 - /xmlgraphics/fop/branches/Temp_Accessibility/src/documentation/content/xdocs/trunk/accessibility.xml</title>
<author><name>vhennebert@apache.org</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/xmlgraphics-fop-commits/200910.mbox/%3c20091026123545.4411123888FC@eris.apache.org%3e"/>
<id>urn:uuid:%3c20091026123545-4411123888FC@eris-apache-org%3e</id>
<updated>2009-10-26T12:35:45Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Author: vhennebert
Date: Mon Oct 26 12:35:44 2009
New Revision: 829769

URL: http://svn.apache.org/viewvc?rev=829769&amp;view=rev
Log:
Improved and updated documentation about accessibility

Modified:
    xmlgraphics/fop/branches/Temp_Accessibility/src/documentation/content/xdocs/trunk/accessibility.xml

Modified: xmlgraphics/fop/branches/Temp_Accessibility/src/documentation/content/xdocs/trunk/accessibility.xml
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_Accessibility/src/documentation/content/xdocs/trunk/accessibility.xml?rev=829769&amp;r1=829768&amp;r2=829769&amp;view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_Accessibility/src/documentation/content/xdocs/trunk/accessibility.xml
(original)
+++ xmlgraphics/fop/branches/Temp_Accessibility/src/documentation/content/xdocs/trunk/accessibility.xml
Mon Oct 26 12:35:44 2009
@@ -29,13 +29,12 @@
         &lt;a href="http://en.wikipedia.org/wiki/Accessibility"&gt;accessibility&lt;/a&gt;
         features of Apache FOP.
         &lt;a href="http://www.section508.gov/"&gt;Section 508&lt;/a&gt; defines accessibility
in the context
-        of electronic documents for the US but it impacts also other countries.
+        of electronic documents for the USA but other countries have similar requirements.
       &lt;/p&gt;
       &lt;p&gt;
-        These features are concentrated exclusively on PDF output
-        (Tagged PDF). There are certain implementation limitations that need to be observed
-        and certain actions are necessary by the content creator to ensure that FOP can create
-        a truly accessible document. 
+        Accessibility features are available only for the PDF output format and there are
some 
+        implementation limitations. Also, certain actions must be undertaken by the content
creator 
+        to ensure that FOP can create a truly accessible document. 
       &lt;/p&gt;
     &lt;/section&gt;
     &lt;section&gt;
@@ -43,7 +42,7 @@
       &lt;p&gt;There are 3 ways to enable accessibility:&lt;/p&gt;
       &lt;ol&gt;
         &lt;li&gt;
-          &lt;strong&gt;Command line:&lt;/strong&gt; The command line option -a turns on
accessibility.
+          &lt;strong&gt;Command line:&lt;/strong&gt; The command line option -a turns on
accessibility:
           &lt;code&gt;fop -a -fo mydocument.fo -pdf mydocument.pdf&lt;/code&gt;         
  
         &lt;/li&gt;
         &lt;li&gt;
@@ -60,55 +59,55 @@
         &lt;/li&gt;
       &lt;/ol&gt;
       &lt;p&gt;
-        As mentioned, enabling accessibility currently only changes the way PDFs are generated.
-        Internally, FOP maintains a reduced structure tree of the document so the target
format
-        viewer can ultimately reconstruct the natural reading order of the document. This
is
-        important for document readers that produce an aural representation of the content.
+        When accessibility is enabled, additional information relating to the logical structure
of 
+        the document is added to the PDF. That information allows the PDF viewer (or a 
+        text-to-speech application) to retrieve the natural reading order of the document.
       &lt;/p&gt;
-      &lt;p&gt;
-        Hint: You may need to adjust the Java heap size in order to process larger files.
-      &lt;/p&gt; 
+      &lt;note&gt;The processing of the logical structure is memory-hungry. You may need
to adjust the 
+        Java heap size in order to process larger files.&lt;/note&gt;
     &lt;/section&gt;
     &lt;section id="source"&gt;
       &lt;title&gt;Changes to your XSL-FO input files&lt;/title&gt;
       &lt;p&gt;
         Apache FOP cannot automatically generate accessible PDFs. Some of the work can only
be
         performed by the content provider. Following are some changes that may be necessary
to
-        your XSL-FO content so the generate documents that are truly accessible.
+        your XSL-FO content in order to generate really accessible documents:
       &lt;/p&gt;
       &lt;ul&gt;
-        &lt;li&gt;Table cells require a table row as the parent.&lt;/li&gt;
+        &lt;li&gt;Table cells must have a table row as their parent.&lt;/li&gt;
         &lt;li&gt;
-          Ensure that the order of &lt;code&gt;fo:block-container&lt;/code&gt; in a page
corresponds to
-          the reading order.
+          Images must have an alternate text: use the &lt;code&gt;fox:alt-text&lt;/code&gt;
extension attribute 
+          (in the &lt;a href="extensions.html#fox-namespace"&gt;fox namespace&lt;/a&gt;)
on 
+          &lt;code&gt;fo:external-graphic&lt;/code&gt; and &lt;code&gt;fo:instream-foreign-object&lt;/code&gt;
to specify a 
+          short text describing the image.
         &lt;/li&gt;
         &lt;li&gt;
-          Alternate text for images: The attribute &lt;code&gt;fox:alt-text&lt;/code&gt;
has been added
-          for &lt;code&gt;fo:external-graphic&lt;/code&gt; and &lt;code&gt;fo:instream-foreign-object&lt;/code&gt;.
+          Ensure that the order of &lt;code&gt;fo:block-container&lt;/code&gt; elements in
a page corresponds to
+          the reading order.
         &lt;/li&gt;
         &lt;li&gt;
           Specify the natural language of the document using the language and country properties
-          (or via the xml:lang shorthand property).
+          (or via the &lt;code&gt;xml:lang&lt;/code&gt; shorthand property).
         &lt;/li&gt;
       &lt;/ul&gt;
     &lt;/section&gt;
     &lt;section id="testing"&gt;
       &lt;title&gt;Testing&lt;/title&gt;
       &lt;p&gt;
-        Accessible PDFs can be tested, for example, using Adobe Acrobat Professional. Its
-        Accessibility Check creates a report indicating any deficiencies with a PDF document.
-        Alternatively, you can just let a screen reader read the document out aloud.
+        Accessible PDFs can be tested, for example, using Adobe Acrobat Professional. Its

+        Accessibility Check feature creates a report indicating any deficiencies with a PDF

+        document. Alternatively, you can just let a screen reader read the document aloud.
       &lt;/p&gt;
     &lt;/section&gt;
     &lt;section id="limitations"&gt;
       &lt;title&gt;Limitations&lt;/title&gt;
       &lt;p&gt;
-        Accessibility support in Apache FOP is relatively new, so naturally, there are certain
+        Accessibility support in Apache FOP is relatively new, so there are certain
         limitations. Please help us identify and close any gaps.
       &lt;/p&gt;
       &lt;ul&gt;
         &lt;li&gt;
-          The natural language can currently only be specified on the page-sequence level.
The
+          The natural language can currently only be specified at the page-sequence level.
The
           document language is derived from the language of the first page-sequence. It is
           currently not possible to override the language inside the content below the
           page-sequence level.
@@ -118,7 +117,7 @@
         &lt;/li&gt;
         &lt;li&gt;
           SVG graphics (or images in general) are treated as a single figure. Text contained
in
-          SVGs is not accessible. It's only possible to work with fox:alt-text.
+          SVGs is not accessible. It's only possible to work with &lt;code&gt;fox:alt-text&lt;/code&gt;.
         &lt;/li&gt;
         &lt;li&gt;
           XSL-FO's role property is currently not supported. It could theoretically be used
to
@@ -129,28 +128,23 @@
           The side regions (region-before, region-after etc.) are currently not specially
           identified. Screen readers may read their content at page changes.
         &lt;/li&gt;
-        &lt;li&gt;
-          The accessibility features are only available with PDF output and only if the
-          new output implementation based on the intermediate format (PDFDocumentHandler)
is used.
-          Accessibility (Tagged PDF) is not supported by the legacy PDFRenderer.
-        &lt;/li&gt;
       &lt;/ul&gt;
     &lt;/section&gt;
     &lt;section id="links"&gt;
       &lt;title&gt;Related Links&lt;/title&gt;
       &lt;p&gt;
-        We don't provide a comprehensive guide to create accessible documents. Below are
some
-        links with additional resources around the topic.
+        Many resources providing guidance about creating accessible documents can be found
on the 
+        web. Here are a few links, along with additional resources around the topic:
       &lt;/p&gt;
       &lt;ul&gt;
-        &lt;li&gt;&lt;a href="pdfa.html"&gt;PDF/A support in Apache FOP&lt;/a&gt;&lt;/li&gt;
         &lt;li&gt;&lt;a href="http://www.section508.gov/"&gt;US Government - Website on Section
508&lt;/a&gt;&lt;/li&gt;
         &lt;li&gt;&lt;a href="http://en.wikipedia.org/wiki/Accessibility"&gt;Wikipedia on
Accessibility in general&lt;/a&gt;&lt;/li&gt;
         &lt;li&gt;&lt;a href="http://en.wikipedia.org/wiki/Portable_Document_Format#Accessibility"&gt;Wikipedia
on Accessibility in PDF&lt;/a&gt;&lt;/li&gt;
         &lt;li&gt;
-          &lt;a href="http://partners.adobe.com/public/developer/en/pdf/PDFReference.pdf"&gt;PDF
Reference 1.4&lt;/a&gt; 
-          (lookup chapters 9.7 "Tagged PDF" and 9.8 "Accessibility Support")
+          &lt;a href="http://partners.adobe.com/public/developer/en/pdf/PDFReference.pdf"&gt;PDF

+            Reference 1.4&lt;/a&gt; (look up chapters 9.7 "Tagged PDF" and 9.8 "Accessibility
Support")
         &lt;/li&gt;
+        &lt;li&gt;&lt;a href="pdfa.html"&gt;PDF/A support in Apache FOP&lt;/a&gt;&lt;/li&gt;
         &lt;li&gt;&lt;a href="http://wiki.apache.org/xmlgraphics-fop/PDF_Accessibility"&gt;Developer-oriented
details on the accessibility features (on the Wiki)&lt;/a&gt;&lt;/li&gt;
       &lt;/ul&gt;
     &lt;/section&gt;



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



</pre>
</div>
</content>
</entry>
<entry>
<title>svn commit: r829767 - /xmlgraphics/fop/trunk/conf/fop.xconf</title>
<author><name>vhennebert@apache.org</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/xmlgraphics-fop-commits/200910.mbox/%3c20091026123136.9FA3823888D1@eris.apache.org%3e"/>
<id>urn:uuid:%3c20091026123136-9FA3823888D1@eris-apache-org%3e</id>
<updated>2009-10-26T12:31:36Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Author: vhennebert
Date: Mon Oct 26 12:31:35 2009
New Revision: 829767

URL: http://svn.apache.org/viewvc?rev=829767&amp;view=rev
Log:
Removed obsolete configuration for text output

Modified:
    xmlgraphics/fop/trunk/conf/fop.xconf

Modified: xmlgraphics/fop/trunk/conf/fop.xconf
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/conf/fop.xconf?rev=829767&amp;r1=829766&amp;r2=829767&amp;view=diff
==============================================================================
--- xmlgraphics/fop/trunk/conf/fop.xconf (original)
+++ xmlgraphics/fop/trunk/conf/fop.xconf Mon Oct 26 12:31:35 2009
@@ -443,10 +443,6 @@
     &lt;/renderer&gt;
     --&gt;
 
-    &lt;renderer mime="text/plain"&gt;
-      &lt;pageSize columns="80"/&gt;
-    &lt;/renderer&gt;
-
   &lt;/renderers&gt;
 
 &lt;/fop&gt;



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



</pre>
</div>
</content>
</entry>
<entry>
<title>svn commit: r829761 - /xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/PageBreakingAlgorithm.java</title>
<author><name>vhennebert@apache.org</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/xmlgraphics-fop-commits/200910.mbox/%3c20091026121226.2C9EA238888F@eris.apache.org%3e"/>
<id>urn:uuid:%3c20091026121226-2C9EA238888F@eris-apache-org%3e</id>
<updated>2009-10-26T12:12:26Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Author: vhennebert
Date: Mon Oct 26 12:12:25 2009
New Revision: 829761

URL: http://svn.apache.org/viewvc?rev=829761&amp;view=rev
Log:
Removed addition of stretching to footnoteSeparatorLength. That was done to the parameter
instead of the field, which actually had no effect on the layout, plus it doesn't make sense.

Modified:
    xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/PageBreakingAlgorithm.java

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/PageBreakingAlgorithm.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/PageBreakingAlgorithm.java?rev=829761&amp;r1=829760&amp;r2=829761&amp;view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/PageBreakingAlgorithm.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/PageBreakingAlgorithm.java Mon
Oct 26 12:12:25 2009
@@ -117,10 +117,6 @@
         this.layoutListener = layoutListener;
         best = new BestPageRecords();
         this.footnoteSeparatorLength = (MinOptMax) footnoteSeparatorLength.clone();
-        // add some stretch, to avoid a restart for every page containing footnotes
-        if (footnoteSeparatorLength.min == footnoteSeparatorLength.max) {
-            footnoteSeparatorLength.max += 10000;
-        }
         this.autoHeight = autoHeight;
         this.favorSinglePart = favorSinglePart;
     }



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



</pre>
</div>
</content>
</entry>
<entry>
<title>svn commit: r829532 - in /xmlgraphics/fop/trunk/src/java/org/apache/fop: cli/CommandLineOptions.java cli/InputHandler.java events/EventFormatter.xml events/ResourceEventProducer.java</title>
<author><name>spepping@apache.org</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/xmlgraphics-fop-commits/200910.mbox/%3c20091025110412.3BFC723888CE@eris.apache.org%3e"/>
<id>urn:uuid:%3c20091025110412-3BFC723888CE@eris-apache-org%3e</id>
<updated>2009-10-25T11:04:11Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Author: spepping
Date: Sun Oct 25 11:04:11 2009
New Revision: 829532

URL: http://svn.apache.org/viewvc?rev=829532&amp;view=rev
Log:
Added events to the implementation of the catalog command-line option

Modified:
    xmlgraphics/fop/trunk/src/java/org/apache/fop/cli/CommandLineOptions.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/cli/InputHandler.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/events/EventFormatter.xml
    xmlgraphics/fop/trunk/src/java/org/apache/fop/events/ResourceEventProducer.java

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=829532&amp;r1=829531&amp;r2=829532&amp;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 Sun Oct 25 11:04:11
2009
@@ -1025,7 +1025,11 @@
             case IF_INPUT:
                 return new IFInputHandler(iffile);
             case XSLT_INPUT:
-                return new InputHandler(xmlfile, xsltfile, xsltParams, useCatalogResolver);
+                InputHandler handler = new InputHandler(xmlfile, xsltfile, xsltParams);
+                if (useCatalogResolver) {
+                    handler.createCatalogResolver(foUserAgent);
+                }
+                return handler;
             case IMAGE_INPUT:
                 return new ImageInputHandler(imagefile, xsltfile, xsltParams);
             default:

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/cli/InputHandler.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/cli/InputHandler.java?rev=829532&amp;r1=829531&amp;r2=829532&amp;view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/cli/InputHandler.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/cli/InputHandler.java Sun Oct 25 11:04:11
2009
@@ -51,6 +51,7 @@
 import org.apache.fop.apps.FOUserAgent;
 import org.apache.fop.apps.Fop;
 import org.apache.fop.apps.FopFactory;
+import org.apache.fop.events.ResourceEventProducer;
 import org.apache.fop.render.awt.viewer.Renderable;
 
 /**
@@ -64,8 +65,8 @@
     protected File sourcefile;
     private File stylesheet;  // for XML/XSLT usage
     private Vector xsltParams; // for XML/XSLT usage
-    private EntityResolver entityResolver;
-    private URIResolver uriResolver;
+    private EntityResolver entityResolver = null;
+    private URIResolver uriResolver = null;
 
     /** the logger */
     protected Log log = LogFactory.getLog(InputHandler.class);
@@ -85,23 +86,6 @@
     }
 
     /**
-     * Constructor for XML-&gt;XSLT-&gt;FO input
-     *
-     * @param xmlfile XML file
-     * @param xsltfile XSLT file
-     * @param params Vector of command-line parameters (name, value,
-     *      name, value, ...) for XSL stylesheet, null if none
-     * @param useCatalogResolver if true, use a catalog resolver
-     *      for XML parsing and XSLT URI resolution
-     */
-    public InputHandler(File xmlfile, File xsltfile, Vector params, boolean useCatalogResolver)
{
-        this(xmlfile, xsltfile, params);
-        if (useCatalogResolver) {
-            createCatalogResolver();
-        }
-    }
-
-    /**
      * Constructor for FO input
      * @param fofile the file to read the FO document.
      */
@@ -213,10 +197,12 @@
      * Tries the Apache Commons Resolver, and if unsuccessful,
      * tries the same built into Java 6.
      */
-    private void createCatalogResolver() {
+    public void createCatalogResolver(FOUserAgent userAgent) {
         String[] classNames = new String[] {
                 "org.apache.xml.resolver.tools.CatalogResolver",
                 "com.sun.org.apache.xml.internal.resolver.tools.CatalogResolver"};
+        ResourceEventProducer eventProducer =
+            ResourceEventProducer.Provider.get(userAgent.getEventBroadcaster());
         Class resolverClass = null;
         for (int i = 0; i &lt; classNames.length &amp;&amp; resolverClass == null; ++i) {
             try {
@@ -226,7 +212,7 @@
             }
         }
         if (resolverClass == null) {
-            log.error("Could not find catalog resolver in class path");
+            eventProducer.catalogResolverNotFound(this);
             return;
         }
         try {
@@ -234,8 +220,10 @@
             uriResolver = (URIResolver) resolverClass.newInstance();
         } catch (InstantiationException e) {
             log.error("Error creating the catalog resolver: " + e.getMessage());
+            eventProducer.catalogResolverNotCreated(this, e.getMessage());
         } catch (IllegalAccessException e) {
             log.error("Error creating the catalog resolver: " + e.getMessage());
+            eventProducer.catalogResolverNotCreated(this, e.getMessage());
         }
     }
 

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=829532&amp;r1=829531&amp;r2=829532&amp;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 Sun Oct 25 11:04:11
2009
@@ -79,6 +79,8 @@
   &lt;message key="org.apache.fop.events.ResourceEventProducer.foreignXMLNoHandler"&gt;Some
XML content will be ignored. No handler defined for XML with namespace "{namespaceURI}".&lt;/message&gt;
   &lt;message key="org.apache.fop.events.ResourceEventProducer.imageWritingError"&gt;Error
while writing an image to the target file.[ Reason: {e}]&lt;/message&gt;
   &lt;message key="org.apache.fop.events.ResourceEventProducer.cannotDeleteTempFile"&gt;Temporary
file could not be deleted: {tempFile}&lt;/message&gt;
+  &lt;message key="org.apache.fop.events.ResourceEventProducer.catalogResolverNotFound"&gt;Catalog
resolver not found along the classpath&lt;/message&gt;
+  &lt;message key="org.apache.fop.events.ResourceEventProducer.catalogResolverNotCreated"&gt;Error
creating the catalog resolver: {message}&lt;/message&gt;
   &lt;message key="org.apache.fop.layoutmgr.inline.InlineLevelEventProducer.leaderWithoutContent"&gt;fo:leader
is set to "use-content" but has no content.{{locator}}&lt;/message&gt;
   &lt;message key="org.apache.fop.layoutmgr.inline.InlineLevelEventProducer.lineOverflows"&gt;Line
{line} of a paragraph overflows the available area by {overflowLength,choice,50000#{overflowLength}
millipoints|50000&amp;lt;more than 50 points}.{{locator}}&lt;/message&gt;
   &lt;message key="org.apache.fop.layoutmgr.BlockLevelEventProducer.rowTooTall"&gt;The contents
of table-row {row} are taller than they should be (there is a block-progression-dimension
or height constraint on the indicated row). Due to its contents the row grows to {effCellBPD}
millipoints, but the row shouldn't get any taller than {maxCellBPD} millipoints.{{locator}}&lt;/message&gt;

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/events/ResourceEventProducer.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/events/ResourceEventProducer.java?rev=829532&amp;r1=829531&amp;r2=829532&amp;view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/events/ResourceEventProducer.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/events/ResourceEventProducer.java Sun Oct
25 11:04:11 2009
@@ -133,4 +133,18 @@
      */
     void cannotDeleteTempFile(Object source, File tempFile);
 
+    /**
+     * Catalog Resolver not found along the class path
+     * @param source the event source
+     * @event.severity ERROR
+     */
+    void catalogResolverNotFound(Object source);
+
+    /**
+     * Catalog Resolver not created, due to InstantiationException or IllegalAccessException
+     * @param source the event source
+     * @param message the exception message
+     * @event.severity ERROR
+     */
+    void catalogResolverNotCreated(Object source, String message);
 }



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



</pre>
</div>
</content>
</entry>
<entry>
<title>svn commit: r829347 - /xmlgraphics/fop/trunk/src/documentation/content/xdocs/trunk/output.xml</title>
<author><name>jeremias@apache.org</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/xmlgraphics-fop-commits/200910.mbox/%3c20091024114258.D5B8923888CF@eris.apache.org%3e"/>
<id>urn:uuid:%3c20091024114258-D5B8923888CF@eris-apache-org%3e</id>
<updated>2009-10-24T11:42:58Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Author: jeremias
Date: Sat Oct 24 11:42:58 2009
New Revision: 829347

URL: http://svn.apache.org/viewvc?rev=829347&amp;view=rev
Log:
Added a note about the new CMYK feature for AFP output.

Modified:
    xmlgraphics/fop/trunk/src/documentation/content/xdocs/trunk/output.xml

Modified: xmlgraphics/fop/trunk/src/documentation/content/xdocs/trunk/output.xml
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/documentation/content/xdocs/trunk/output.xml?rev=829347&amp;r1=829346&amp;r2=829347&amp;view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/documentation/content/xdocs/trunk/output.xml (original)
+++ xmlgraphics/fop/trunk/src/documentation/content/xdocs/trunk/output.xml Sat Oct 24 11:42:58
2009
@@ -704,8 +704,15 @@
 ]]&gt;&lt;/source&gt;
       &lt;p&gt;When the native attribute is specified and set to "true", all image resources
will be natively injected
       into the datastream using an object container rather than being converted into an IOCA
FS45 image.
-      Support for native image formats (e.g. JPEG, GIF) is not always available on printer
implementations
+      Support for native image formats (e.g. JPEG, TIFF, GIF) is not always available on
printer implementations
       so by default this configuration option is set to "false".&lt;/p&gt;
+      &lt;p&gt;
+        Setting &lt;code&gt;cmyk="true"&lt;/code&gt; on the &lt;code&gt;images&lt;/code&gt;
element will enable CMYK
+        colors. This will only have an effect if the color mode is set to "color". Example:
+      &lt;/p&gt;
+      &lt;source&gt;&lt;![CDATA[
+      &lt;images mode="color" cmyk="true"/&gt;
+]]&gt;&lt;/source&gt;
       &lt;/section&gt;
       &lt;section id="afp-shading-config"&gt;
         &lt;title&gt;Shading&lt;/title&gt;



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



</pre>
</div>
</content>
</entry>
<entry>
<title>svn commit: r829138 [2/2] - in /xmlgraphics/fop/branches/Temp_Accessibility: ./ lib/ src/documentation/content/xdocs/trunk/ src/java/META-INF/services/ src/java/org/apache/fop/afp/ src/java/org/apache/fop/afp/goca/ src/java/org/apache/fop/afp/ioca/ src...</title>
<author><name>vhennebert@apache.org</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/xmlgraphics-fop-commits/200910.mbox/%3c20091023172719.D3F4423888E3@eris.apache.org%3e"/>
<id>urn:uuid:%3c20091023172719-D3F4423888E3@eris-apache-org%3e</id>
<updated>2009-10-23T17:27:17Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Modified: xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/layoutmgr/ElementListUtils.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/layoutmgr/ElementListUtils.java?rev=829138&amp;r1=829137&amp;r2=829138&amp;view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/layoutmgr/ElementListUtils.java (original)
+++ xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/layoutmgr/ElementListUtils.java Fri Oct 23 17:27:14 2009
@@ -62,13 +62,14 @@
             if (el.isPenalty()) {
                 KnuthPenalty penalty = (KnuthPenalty)el;
                 //Convert all penalties to break inhibitors
-                if (penalty.getP() &lt; KnuthPenalty.INFINITE) {
-                    iter.set(new KnuthPenalty(penalty.getW(), KnuthPenalty.INFINITE,
-                            penalty.isFlagged(), penalty.getPosition(), penalty.isAuxiliary()));
+                if (penalty.getPenalty() &lt; KnuthPenalty.INFINITE) {
+                    iter.set(new KnuthPenalty(penalty.getWidth(), KnuthPenalty.INFINITE,
+                            penalty.isPenaltyFlagged(), penalty.getPosition(),
+                            penalty.isAuxiliary()));
                 }
             } else if (el.isGlue()) {
                 KnuthGlue glue = (KnuthGlue)el;
-                len += glue.getW();
+                len += glue.getWidth();
                 iter.previous();
                 el = (ListElement)iter.previous();
                 iter.next();
@@ -84,7 +85,7 @@
                 }
             } else {
                 KnuthElement kel = (KnuthElement)el;
-                len += kel.getW();
+                len += kel.getWidth();
             }
             if (len &gt;= constraint) {
                 return false;
@@ -109,13 +110,14 @@
             if (el.isPenalty()) {
                 KnuthPenalty penalty = (KnuthPenalty)el;
                 //Convert all penalties to break inhibitors
-                if (penalty.getP() &lt; KnuthPenalty.INFINITE) {
-                    i.set(new KnuthPenalty(penalty.getW(), KnuthPenalty.INFINITE,
-                            penalty.isFlagged(), penalty.getPosition(), penalty.isAuxiliary()));
+                if (penalty.getPenalty() &lt; KnuthPenalty.INFINITE) {
+                    i.set(new KnuthPenalty(penalty.getWidth(), KnuthPenalty.INFINITE,
+                            penalty.isPenaltyFlagged(), penalty.getPosition(),
+                            penalty.isAuxiliary()));
                 }
             } else if (el.isGlue()) {
                 KnuthGlue glue = (KnuthGlue)el;
-                len += glue.getW();
+                len += glue.getWidth();
                 el = (ListElement)i.previous();
                 i.next();
                 if (el.isBox()) {
@@ -134,7 +136,7 @@
                 }
             } else {
                 KnuthElement kel = (KnuthElement)el;
-                len += kel.getW();
+                len += kel.getWidth();
             }
             if (len &gt;= constraint) {
                 return false;
@@ -158,9 +160,9 @@
         while (iter.hasNext()) {
             ListElement el = (ListElement)iter.next();
             if (el.isBox()) {
-                len += ((KnuthElement)el).getW();
+                len += ((KnuthElement)el).getWidth();
             } else if (el.isGlue()) {
-                len += ((KnuthElement)el).getW();
+                len += ((KnuthElement)el).getWidth();
             } else {
                 //log.debug("Ignoring penalty: " + el);
                 //ignore penalties
@@ -210,7 +212,7 @@
      */
     public static boolean endsWithNonInfinitePenalty(List elems) {
         ListElement last = (ListElement) ListUtil.getLast(elems);
-        if (last.isPenalty() &amp;&amp; ((KnuthPenalty)last).getP() &lt; KnuthElement.INFINITE) {
+        if (last.isPenalty() &amp;&amp; ((KnuthPenalty)last).getPenalty() &lt; KnuthElement.INFINITE) {
             return true;
         } else if (last instanceof BreakElement
                         &amp;&amp; ((BreakElement)last).getPenaltyValue() &lt; KnuthElement.INFINITE) {
@@ -230,7 +232,7 @@
         int prevBreak = startIndex - 1;
         while (prevBreak &gt;= 0) {
             KnuthElement el = (KnuthElement)elems.get(prevBreak);
-            if (el.isPenalty() &amp;&amp; el.getP() &lt; KnuthElement.INFINITE) {
+            if (el.isPenalty() &amp;&amp; el.getPenalty() &lt; KnuthElement.INFINITE) {
                 break;
             }
             prevBreak--;

Modified: xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/layoutmgr/InlineKnuthSequence.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/layoutmgr/InlineKnuthSequence.java?rev=829138&amp;r1=829137&amp;r2=829138&amp;view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/layoutmgr/InlineKnuthSequence.java (original)
+++ xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/layoutmgr/InlineKnuthSequence.java Fri Oct 23 17:27:14 2009
@@ -72,7 +72,7 @@
         lastOldElement = getLast();
         firstNewElement = sequence.getElement(0);
         if (firstNewElement.isBox() &amp;&amp; !((KnuthElement) firstNewElement).isAuxiliary()
-                &amp;&amp; lastOldElement.isBox() &amp;&amp; ((KnuthElement) lastOldElement).getW() != 0) {
+                &amp;&amp; lastOldElement.isBox() &amp;&amp; ((KnuthElement) lastOldElement).getWidth() != 0) {
             addALetterSpace();
         }
         addAll(sequence);

Modified: xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/layoutmgr/KnuthBox.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/layoutmgr/KnuthBox.java?rev=829138&amp;r1=829137&amp;r2=829138&amp;view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/layoutmgr/KnuthBox.java (original)
+++ xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/layoutmgr/KnuthBox.java Fri Oct 23 17:27:14 2009
@@ -37,12 +37,12 @@
     /**
      * Create a new KnuthBox.
      *
-     * @param w    the width of this box
+     * @param width    the width of this box
      * @param pos  the Position stored in this box
-     * @param bAux is this box auxiliary?
+     * @param auxiliary is this box auxiliary?
      */
-    public KnuthBox(int w, Position pos, boolean bAux) {
-        super(w, pos, bAux);
+    public KnuthBox(int width, Position pos, boolean auxiliary) {
+        super(width, pos, auxiliary);
     }
 
     /** {@inheritDoc} */
@@ -52,14 +52,14 @@
 
     /** {@inheritDoc} */
     public String toString() {
-        StringBuffer sb = new StringBuffer(64);
+        StringBuffer buffer = new StringBuffer(64);
         if (isAuxiliary()) {
-            sb.append("aux. ");
+            buffer.append("aux. ");
         }
-        sb.append("box");
-        sb.append(" w=");
-        sb.append(getW());
-        return sb.toString();
+        buffer.append("box");
+        buffer.append(" w=");
+        buffer.append(getWidth());
+        return buffer.toString();
     }
 
 }

Modified: xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/layoutmgr/KnuthElement.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/layoutmgr/KnuthElement.java?rev=829138&amp;r1=829137&amp;r2=829138&amp;view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/layoutmgr/KnuthElement.java (original)
+++ xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/layoutmgr/KnuthElement.java Fri Oct 23 17:27:14 2009
@@ -33,44 +33,44 @@
     public static final int INFINITE = 1000;
 
     private int width;
-    private boolean bIsAuxiliary;
+    private boolean auxiliary;
 
     /**
      * Create a new KnuthElement.
      * This class being abstract, this can be called only by subclasses.
      *
-     * @param w    the width of this element
+     * @param width    the width of this element
      * @param pos  the Position stored in this element
-     * @param bAux is this an auxiliary element?
+     * @param auxiliary is this an auxiliary element?
      */
-    protected KnuthElement(int w, Position pos, boolean bAux) {
+    protected KnuthElement(int width, Position pos, boolean auxiliary) {
         super(pos);
-        width = w;
-        bIsAuxiliary = bAux;
+        this.width = width;
+        this.auxiliary = auxiliary;
     }
 
     /** @return true if this element is an auxiliary one. */
     public boolean isAuxiliary() {
-        return bIsAuxiliary;
+        return auxiliary;
     }
 
     /** @return the width of this element. */
-    public int getW() {
+    public int getWidth() {
         return width;
     }
 
     /** @return the penalty value of this element, if applicable. */
-    public int getP() {
+    public int getPenalty() {
         throw new RuntimeException("Element is not a penalty");
     }
 
     /** @return the stretch value of this element, if applicable. */
-    public int getY() {
+    public int getStretch() {
         throw new RuntimeException("Element is not a glue");
     }
 
     /** @return the shrink value of this element, if applicable. */
-    public int getZ() {
+    public int getShrink() {
         throw new RuntimeException("Element is not a glue");
     }
 

Modified: xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/layoutmgr/KnuthGlue.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/layoutmgr/KnuthGlue.java?rev=829138&amp;r1=829137&amp;r2=829138&amp;view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/layoutmgr/KnuthGlue.java (original)
+++ xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/layoutmgr/KnuthGlue.java Fri Oct 23 17:27:14 2009
@@ -54,24 +54,25 @@
     /**
      * Create a new KnuthGlue.
      *
-     * @param w the width of this glue
-     * @param y the stretchability of this glue
-     * @param z the shrinkability of this glue
+     * @param width the width of this glue
+     * @param stretchability the stretchability of this glue
+     * @param shrinkability the shrinkability of this glue
      * @param pos the Position stored in this glue
-     * @param bAux is this glue auxiliary?
+     * @param auxiliary is this glue auxiliary?
      */
-    public KnuthGlue(int w, int y, int z, Position pos, boolean bAux) {
-        super(w, pos, bAux);
-        stretchability = y;
-        shrinkability = z;
+    public KnuthGlue(int width, int stretchability, int shrinkability, Position pos,
+                     boolean auxiliary) {
+        super(width, pos, auxiliary);
+        this.stretchability = stretchability;
+        this.shrinkability = shrinkability;
     }
 
-    public KnuthGlue(int w, int y, int z,
-            int iAdjClass, Position pos, boolean bAux) {
-        super(w, pos, bAux);
-        stretchability = y;
-        shrinkability = z;
-        adjustmentClass = iAdjClass;
+    public KnuthGlue(int width, int stretchability, int shrinkability, int adjustmentClass,
+                     Position pos, boolean auxiliary) {
+        super(width, pos, auxiliary);
+        this.stretchability = stretchability;
+        this.shrinkability = shrinkability;
+        this.adjustmentClass = adjustmentClass;
     }
 
     /** {@inheritDoc} */
@@ -80,12 +81,12 @@
     }
 
     /** @return the stretchability of this glue. */
-    public int getY() {
+    public int getStretch() {
         return stretchability;
     }
 
     /** @return the shrinkability of this glue. */
-    public int getZ() {
+    public int getShrink() {
         return shrinkability;
     }
 
@@ -96,18 +97,18 @@
 
     /** {@inheritDoc} */
     public String toString() {
-        StringBuffer sb = new StringBuffer(64);
+        StringBuffer buffer = new StringBuffer(64);
         if (isAuxiliary()) {
-            sb.append("aux. ");
+            buffer.append("aux. ");
         }
-        sb.append("glue");
-        sb.append(" w=").append(getW());
-        sb.append(" stretch=").append(getY());
-        sb.append(" shrink=").append(getZ());
+        buffer.append("glue");
+        buffer.append(" w=").append(getWidth());
+        buffer.append(" stretch=").append(getStretch());
+        buffer.append(" shrink=").append(getShrink());
         if (getAdjustmentClass() &gt;= 0) {
-            sb.append(" adj-class=").append(getAdjustmentClass());
+            buffer.append(" adj-class=").append(getAdjustmentClass());
         }
-        return sb.toString();
+        return buffer.toString();
     }
 
 }

Modified: xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/layoutmgr/KnuthPenalty.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/layoutmgr/KnuthPenalty.java?rev=829138&amp;r1=829137&amp;r2=829138&amp;view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/layoutmgr/KnuthPenalty.java (original)
+++ xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/layoutmgr/KnuthPenalty.java Fri Oct 23 17:27:14 2009
@@ -45,39 +45,40 @@
     public static final int FLAGGED_PENALTY = 50;
 
     private int penalty;
-    private boolean isFlagged;
+    private boolean penaltyFlagged;
     private int breakClass = -1;
 
     /**
      * Create a new KnuthPenalty.
      *
-     * @param w the width of this penalty
-     * @param p the penalty value of this penalty
-     * @param f is this penalty flagged?
+     * @param width the width of this penalty
+     * @param penalty the penalty value of this penalty
+     * @param penaltyFlagged is this penalty flagged?
      * @param pos the Position stored in this penalty
-     * @param isAuxiliary is this penalty auxiliary?
+     * @param auxiliary is this penalty auxiliary?
      */
-    public KnuthPenalty(int w, int p, boolean f, Position pos, boolean isAuxiliary) {
-        super(w, pos, isAuxiliary);
-        penalty = p;
-        isFlagged = f;
+    public KnuthPenalty(int width, int penalty, boolean penaltyFlagged, Position pos,
+                        boolean auxiliary) {
+        super(width, pos, auxiliary);
+        this.penalty = penalty;
+        this.penaltyFlagged = penaltyFlagged;
     }
 
     /**
      * Create a new KnuthPenalty.
      *
-     * @param w the width of this penalty
-     * @param p the penalty value of this penalty
-     * @param f is this penalty flagged?
+     * @param width the width of this penalty
+     * @param penalty the penalty value of this penalty
+     * @param penaltyFlagged is this penalty flagged?
      * @param breakClass the break class of this penalty (one of
      * {@link Constants#EN_AUTO}, {@link Constants#EN_COLUMN}, {@link Constants#EN_PAGE},
      * {@link Constants#EN_EVEN_PAGE}, {@link Constants#EN_ODD_PAGE})
      * @param pos the Position stored in this penalty
      * @param isAuxiliary is this penalty auxiliary?
      */
-    public KnuthPenalty(int w, int p, boolean f,
-            int breakClass, Position pos, boolean isAuxiliary) {
-        this(w, p, f, pos, isAuxiliary);
+    public KnuthPenalty(int width, int penalty, boolean penaltyFlagged, int breakClass,
+                        Position pos, boolean isAuxiliary) {
+        this(width, penalty, penaltyFlagged, pos, isAuxiliary);
         this.breakClass = breakClass;
     }
 
@@ -90,6 +91,8 @@
      * (Mainly used in {@link #toString()} methods, to improve readability
      * of the trace logs.)
      *
+     * TODO: shouldn't be penalty a class of its own?
+     *
      * @param penaltyValue  the penalty value
      * @return  the penalty value as a {@link java.lang.String}
      */
@@ -110,21 +113,21 @@
     /**
      * @return the penalty value of this penalty.
      */
-    public int getP() {
+    public int getPenalty() {
         return penalty;
     }
 
     /**
      * Sets a new penalty value.
-     * @param p the new penalty value
+     * @param penalty the new penalty value
      */
-    public void setP(int p) {
-        this.penalty = p;
+    public void setPenalty(int penalty) {
+        this.penalty = penalty;
     }
 
     /** @return true is this penalty is a flagged one. */
-    public boolean isFlagged() {
-        return isFlagged;
+    public boolean isPenaltyFlagged() {
+        return penaltyFlagged;
     }
 
     /** {@inheritDoc} */
@@ -142,28 +145,28 @@
 
     /** {@inheritDoc} */
     public String toString() {
-        StringBuffer sb = new StringBuffer(64);
+        StringBuffer buffer = new StringBuffer(64);
         if (isAuxiliary()) {
-            sb.append("aux. ");
+            buffer.append("aux. ");
         }
-        sb.append("penalty");
-        sb.append(" p=");
-        sb.append(valueOf(this.penalty));
-        if (this.isFlagged) {
-            sb.append(" [flagged]");
+        buffer.append("penalty");
+        buffer.append(" p=");
+        buffer.append(valueOf(this.penalty));
+        if (this.penaltyFlagged) {
+            buffer.append(" [flagged]");
         }
-        sb.append(" w=");
-        sb.append(getW());
+        buffer.append(" w=");
+        buffer.append(getWidth());
         if (isForcedBreak()) {
-            sb.append(" (forced break, ")
+            buffer.append(" (forced break, ")
                     .append(getBreakClassName(this.breakClass))
                     .append(")");
         } else if (this.penalty &gt;= 0 &amp;&amp; this.breakClass != -1) {
             //penalty corresponding to a keep constraint
-            sb.append(" (keep constraint, ")
+            buffer.append(" (keep constraint, ")
                     .append(getBreakClassName(this.breakClass))
                     .append(")");
         }
-        return sb.toString();
+        return buffer.toString();
     }
 }

Modified: xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/layoutmgr/KnuthSequence.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/layoutmgr/KnuthSequence.java?rev=829138&amp;r1=829137&amp;r2=829138&amp;view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/layoutmgr/KnuthSequence.java (original)
+++ xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/layoutmgr/KnuthSequence.java Fri Oct 23 17:27:14 2009
@@ -26,9 +26,12 @@
 import java.util.ListIterator;
 
 /**
- * Represents a list of Knuth elements.
+ * Represents a list of {@link KnuthElement Knuth elements}.
  */
 public abstract class KnuthSequence extends ArrayList {
+
+    //TODO: do not extend ArrayList
+
     /**
      * Creates a new and empty list.
      */

Modified: xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/layoutmgr/PageBreakingAlgorithm.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/layoutmgr/PageBreakingAlgorithm.java?rev=829138&amp;r1=829137&amp;r2=829138&amp;view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/layoutmgr/PageBreakingAlgorithm.java (original)
+++ xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/layoutmgr/PageBreakingAlgorithm.java Fri Oct 23 17:27:14 2009
@@ -96,7 +96,7 @@
     //Controls whether a single part should be forced if possible (ex. block-container)
     private boolean favorSinglePart = false;
 
-    private boolean ipdChange;
+    private int ipdDifference;
     private KnuthNode bestNodeForIPDChange;
 
     //Used to keep track of switches in keep-context
@@ -320,7 +320,7 @@
          * will not have considered it a legal break, but it could still
          * be one.
          */
-        if (penalty.getP() == KnuthPenalty.INFINITE) {
+        if (penalty.getPenalty() == KnuthPenalty.INFINITE) {
             int breakClass = penalty.getBreakClass();
             if (breakClass == Constants.EN_PAGE
                     || breakClass == Constants.EN_COLUMN) {
@@ -363,7 +363,7 @@
                     noteListIterator.hasNext();) {
                 final KnuthElement element = (KnuthElement) noteListIterator.next();
                 if (element.isBox() || element.isGlue()) {
-                    noteLength += element.getW();
+                    noteLength += element.getWidth();
                 }
             }
             int prevLength = (lengthList == null || lengthList.isEmpty())
@@ -445,22 +445,22 @@
             return true;
         } else {
             KnuthPenalty p = (KnuthPenalty) element;
-            if (p.getP() &lt;= 0) {
+            if (p.getPenalty() &lt;= 0) {
                 return true;
             } else {
                 int context = p.getBreakClass();
                 switch (context) {
                 case Constants.EN_LINE:
                 case Constants.EN_COLUMN:
-                    return p.getP() &lt; KnuthPenalty.INFINITE;
+                    return p.getPenalty() &lt; KnuthPenalty.INFINITE;
                 case Constants.EN_PAGE:
-                    return p.getP() &lt; KnuthPenalty.INFINITE
+                    return p.getPenalty() &lt; KnuthPenalty.INFINITE
                             || !pageProvider.endPage(line - 1);
                 case Constants.EN_AUTO:
                     log.debug("keep is not auto but context is");
                     return true;
                 default:
-                    if (p.getP() &lt; KnuthPenalty.INFINITE) {
+                    if (p.getPenalty() &lt; KnuthPenalty.INFINITE) {
                         log.debug("Non recognized keep context:" + context);
                         return true;
                     } else {
@@ -479,7 +479,7 @@
         int footnoteSplit = 0;
         boolean canDeferOldFootnotes;
         if (element.isPenalty()) {
-            actualWidth += element.getW();
+            actualWidth += element.getWidth();
         }
         if (footnotesPending) {
             // compute the total length of the footnotes not yet inserted
@@ -588,7 +588,7 @@
                  index++) {
                 if (par.getElement(index).isGlue() &amp;&amp; par.getElement(index - 1).isBox()
                     || par.getElement(index).isPenalty()
-                       &amp;&amp; ((KnuthElement) par.getElement(index)).getP() &lt; KnuthElement.INFINITE) {
+                       &amp;&amp; ((KnuthElement) par.getElement(index)).getPenalty() &lt; KnuthElement.INFINITE) {
                     // break found
                     break;
                 }
@@ -711,7 +711,7 @@
                     element = (KnuthElement) noteListIterator.next();
                     if (element.isBox()) {
                         // element is a box
-                        splitLength += element.getW();
+                        splitLength += element.getWidth();
                         boxPreceding = true;
                     } else if (element.isGlue()) {
                         // element is a glue
@@ -721,10 +721,10 @@
                             break;
                         }
                         boxPreceding = false;
-                        splitLength += element.getW();
+                        splitLength += element.getWidth();
                     } else {
                         // element is a penalty
-                        if (element.getP() &lt; KnuthElement.INFINITE) {
+                        if (element.getPenalty() &lt; KnuthElement.INFINITE) {
                             // end of the sub-sequence
                             index = noteListIterator.previousIndex();
                             break;
@@ -792,7 +792,7 @@
         double f = Math.abs(r);
         f = 1 + 100 * f * f * f;
         if (element.isPenalty()) {
-            double penalty = element.getP();
+            double penalty = element.getPenalty();
             if (penalty &gt;= 0) {
                 f += penalty;
                 demerits = f * f;
@@ -805,9 +805,9 @@
             demerits = f * f;
         }
 
-        if (element.isPenalty() &amp;&amp; ((KnuthPenalty) element).isFlagged()
+        if (element.isPenalty() &amp;&amp; ((KnuthPenalty) element).isPenaltyFlagged()
             &amp;&amp; getElement(activeNode.position).isPenalty()
-            &amp;&amp; ((KnuthPenalty) getElement(activeNode.position)).isFlagged()) {
+            &amp;&amp; ((KnuthPenalty) getElement(activeNode.position)).isPenaltyFlagged()) {
             // add demerit for consecutive breaks at flagged penalties
             demerits += repeatedFlaggedDemerit;
         }
@@ -1077,8 +1077,8 @@
     }
 
     /** {@inheritDoc} */
-    protected boolean ipdChanged() {
-        return ipdChange;
+    protected int getIPDdifference() {
+        return ipdDifference;
     }
 
     /** {@inheritDoc} */
@@ -1104,9 +1104,9 @@
      * @param node the active node to add
      */
     protected void addNode(int line, KnuthNode node) {
-        if (node.position &lt; par.size() - 1 &amp;&amp; line &gt; 0 &amp;&amp; ipdChange(line - 1)) {
+        if (node.position &lt; par.size() - 1 &amp;&amp; line &gt; 0
+                &amp;&amp; (ipdDifference = compareIPDs(line - 1)) != 0) {
             log.trace("IPD changes at page " + line);
-            ipdChange = true;
             if (bestNodeForIPDChange == null
                     || node.totalDemerits &lt; bestNodeForIPDChange.totalDemerits) {
                 bestNodeForIPDChange = node;
@@ -1117,7 +1117,7 @@
                  * The whole sequence could actually fit on the last page before
                  * the IPD change. No need to do any special handling.
                  */
-                ipdChange = false;
+                ipdDifference = 0;
             }
             super.addNode(line, node);
         }
@@ -1127,12 +1127,11 @@
         return bestNodeForIPDChange;
     }
 
-    /** {@inheritDoc} */
-    protected boolean ipdChange(int line) {
+    private int compareIPDs(int line) {
         if (pageProvider == null) {
-            return false;
+            return 0;
         }
-        return pageProvider.ipdChange(line);
+        return pageProvider.compareIPDs(line);
     }
 
 }

Modified: xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/layoutmgr/PageProvider.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/layoutmgr/PageProvider.java?rev=829138&amp;r1=829137&amp;r2=829138&amp;view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/layoutmgr/PageProvider.java (original)
+++ xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/layoutmgr/PageProvider.java Fri Oct 23 17:27:14 2009
@@ -161,12 +161,13 @@
     }
 
     /**
-     * Returns true if the part following the given one has a different IPD.
+     * Compares the IPD of the given part with the following one.
      *
      * @param index index of the current part
-     * @return true if the following part has a different IPD, false otherwise
+     * @return a negative integer, zero or a positive integer as the current IPD is less
+     * than, equal to or greater than the IPD of the following part
      */
-    public boolean ipdChange(int index) {
+    public int compareIPDs(int index) {
         int columnCount = 0;
         int colIndex = startColumnOfCurrentElementList + index;
         int pageIndex = -1;
@@ -179,11 +180,11 @@
         } while (colIndex &gt;= columnCount);
         if (colIndex + 1 &lt; columnCount) {
             // Next part is a column on same page =&gt; same IPD
-            return false;
+            return 0;
         } else {
             Page nextPage = getPage(false, pageIndex + 1, RELTO_CURRENT_ELEMENT_LIST);
             return page.getPageViewport().getBodyRegion().getIPD()
-                    != nextPage.getPageViewport().getBodyRegion().getIPD();
+                    - nextPage.getPageViewport().getBodyRegion().getIPD();
         }
     }
 

Modified: xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/layoutmgr/inline/ContentLayoutManager.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/layoutmgr/inline/ContentLayoutManager.java?rev=829138&amp;r1=829137&amp;r2=829138&amp;view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/layoutmgr/inline/ContentLayoutManager.java (original)
+++ xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/layoutmgr/inline/ContentLayoutManager.java Fri Oct 23 17:27:14 2009
@@ -266,12 +266,12 @@
                         KnuthSequence ks = (KnuthSequence)obj;
                         for (Iterator it = ks.iterator(); it.hasNext(); ) {
                             contentElement = (KnuthElement)it.next();
-                            stackSize += contentElement.getW();
+                            stackSize += contentElement.getWidth();
                             contentList.add(contentElement);
                         }
                     } else {
                         contentElement = (KnuthElement)obj;
-                        stackSize += contentElement.getW();
+                        stackSize += contentElement.getWidth();
                         contentList.add(contentElement);
                     }
                 }

Modified: xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/layoutmgr/inline/LineLayoutManager.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/layoutmgr/inline/LineLayoutManager.java?rev=829138&amp;r1=829137&amp;r2=829138&amp;view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/layoutmgr/inline/LineLayoutManager.java (original)
+++ xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/layoutmgr/inline/LineLayoutManager.java Fri Oct 23 17:27:14 2009
@@ -680,7 +680,7 @@
                     assert lastElement != null;
                     previousIsBox = lastElement.isBox()
                             &amp;&amp; !((KnuthElement) lastElement).isAuxiliary()
-                            &amp;&amp; ((KnuthElement) lastElement).getW() != 0;
+                            &amp;&amp; ((KnuthElement) lastElement).getWidth() != 0;
 
                     // if last paragraph is open, add the new elements to the paragraph
                     // else this is the last paragraph
@@ -705,7 +705,7 @@
 
                     // finish last paragraph if it was closed with a linefeed
                     if (lastElement.isPenalty()
-                            &amp;&amp; ((KnuthPenalty) lastElement).getP() == -KnuthPenalty.INFINITE) {
+                            &amp;&amp; ((KnuthPenalty) lastElement).getPenalty() == -KnuthPenalty.INFINITE) {
                         // a penalty item whose value is -inf
                         // represents a preserved linefeed,
                         // which forces a line break
@@ -1172,7 +1172,7 @@
         LeafPosition pos = (LeafPosition)lastElement.getPosition();
         int totalAdj = adj;
         //if (lastElement.isPenalty()) {
-        //    totalAdj += lastElement.getW();
+        //    totalAdj += lastElement.getWidth();
         //}
         //int lineNumberDifference = (int)((double) totalAdj / constantLineHeight);
         int lineNumberDifference = (int) Math.round((double) totalAdj / constantLineHeight

Modified: xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/layoutmgr/inline/TextLayoutManager.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/layoutmgr/inline/TextLayoutManager.java?rev=829138&amp;r1=829137&amp;r2=829138&amp;view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/layoutmgr/inline/TextLayoutManager.java (original)
+++ xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/layoutmgr/inline/TextLayoutManager.java Fri Oct 23 17:27:14 2009
@@ -57,6 +57,8 @@
  */
 public class TextLayoutManager extends LeafNodeLayoutManager {
 
+    //TODO: remove all final modifiers at local variables
+
     /**
      * Store information about each potential text area.
      * Index of character which ends the area, IPD of area, including
@@ -703,39 +705,39 @@
     }
 
     private AreaInfo processWord(final int alignment, final KnuthSequence sequence,
-            AreaInfo prevAi, final char ch, final boolean breakOpportunity,
+            AreaInfo prevAreaInfo, final char ch, final boolean breakOpportunity,
             final boolean checkEndsWithHyphen) {
-        AreaInfo ai;
+
         //Word boundary found, process widths and kerning
         int lastIndex = this.nextStart;
         while (lastIndex &gt; 0
-                &amp;&amp; this.foText.charAt(lastIndex - 1) == CharUtilities.SOFT_HYPHEN) {
+                &amp;&amp; foText.charAt(lastIndex - 1) == CharUtilities.SOFT_HYPHEN) {
             lastIndex--;
         }
         final boolean endsWithHyphen = checkEndsWithHyphen
-                &amp;&amp; this.foText.charAt(lastIndex) == CharUtilities.SOFT_HYPHEN;
+                &amp;&amp; foText.charAt(lastIndex) == CharUtilities.SOFT_HYPHEN;
         final Font font = FontSelector
-                .selectFontForCharactersInText(this.foText,
-                        this.thisStart, lastIndex, this.foText, this);
+                .selectFontForCharactersInText(foText,
+                        this.thisStart, lastIndex, foText, this);
         final int wordLength = lastIndex - this.thisStart;
         final boolean kerning = font.hasKerning();
         final MinOptMax wordIPD = new MinOptMax(0);
         for (int i = this.thisStart; i &lt; lastIndex; i++) {
-            final char c = this.foText.charAt(i);
+            final char currentChar = foText.charAt(i);
 
             //character width
-            final int charWidth = font.getCharWidth(c);
+            final int charWidth = font.getCharWidth(currentChar);
             wordIPD.add(charWidth);
 
             //kerning
             if (kerning) {
                 int kern = 0;
                 if (i &gt; this.thisStart) {
-                    final char previous = this.foText.charAt(i - 1);
-                    kern = font.getKernValue(previous, c) * font.getFontSize() / 1000;
-                } else if (prevAi != null &amp;&amp; !prevAi.isSpace &amp;&amp; prevAi.breakIndex &gt; 0) {
-                    final char previous = this.foText.charAt(prevAi.breakIndex - 1);
-                    kern = font.getKernValue(previous, c) * font.getFontSize() / 1000;
+                    final char previousChar = foText.charAt(i - 1);
+                    kern = font.getKernValue(previousChar, currentChar);
+                } else if (prevAreaInfo != null &amp;&amp; !prevAreaInfo.isSpace &amp;&amp; prevAreaInfo.breakIndex &gt; 0) {
+                    final char previousChar = foText.charAt(prevAreaInfo.breakIndex - 1);
+                    kern = font.getKernValue(previousChar, currentChar);
                 }
                 if (kern != 0) {
                     this.addToLetterAdjust(i, kern);
@@ -748,11 +750,10 @@
                 &amp;&amp; !TextLayoutManager.isSpace(ch)
                 &amp;&amp; lastIndex &gt; 0
                 &amp;&amp; endsWithHyphen) {
-            final int kern = font.getKernValue(
-                    this.foText.charAt(lastIndex - 1), ch)
-                    * font.getFontSize() / 1000;
+            final int kern = font.getKernValue(foText.charAt(lastIndex - 1), ch);
             if (kern != 0) {
                 this.addToLetterAdjust(lastIndex, kern);
+                //TODO: add kern to wordIPD?
             }
         }
         int iLetterSpaces = wordLength - 1;
@@ -765,20 +766,20 @@
         wordIPD.add(MinOptMax.multiply(this.letterSpaceIPD, iLetterSpaces));
 
         // create the AreaInfo object
-        ai = new AreaInfo(this.thisStart, lastIndex, 0,
+        AreaInfo areaInfo = new AreaInfo(this.thisStart, lastIndex, 0,
                 iLetterSpaces, wordIPD,
                 endsWithHyphen,
                 false, breakOpportunity, font);
-        prevAi = ai;
-        this.vecAreaInfo.add(ai);
+        prevAreaInfo = areaInfo;
+        this.vecAreaInfo.add(areaInfo);
         this.tempStart = this.nextStart;
 
         //add the elements
-        this.addElementsForAWordFragment(sequence, alignment, ai,
+        this.addElementsForAWordFragment(sequence, alignment, areaInfo,
                 this.vecAreaInfo.size() - 1, this.letterSpaceIPD);
-        ai = null;
         this.thisStart = this.nextStart;
-        return prevAi;
+
+        return prevAreaInfo;
     }
 
     /** {@inheritDoc} */

Modified: xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/layoutmgr/list/ListItemLayoutManager.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/layoutmgr/list/ListItemLayoutManager.java?rev=829138&amp;r1=829137&amp;r2=829138&amp;view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/layoutmgr/list/ListItemLayoutManager.java (original)
+++ xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/layoutmgr/list/ListItemLayoutManager.java Fri Oct 23 17:27:14 2009
@@ -298,14 +298,14 @@
             int stepPenalty = 0;
             KnuthElement endEl = (KnuthElement)elementLists[0].get(end[0]);
             if (endEl instanceof KnuthPenalty) {
-                additionalPenaltyHeight = endEl.getW();
-                stepPenalty = Math.max(stepPenalty, endEl.getP());
+                additionalPenaltyHeight = endEl.getWidth();
+                stepPenalty = Math.max(stepPenalty, endEl.getPenalty());
             }
             endEl = (KnuthElement)elementLists[1].get(end[1]);
             if (endEl instanceof KnuthPenalty) {
                 additionalPenaltyHeight = Math.max(
-                        additionalPenaltyHeight, endEl.getW());
-                stepPenalty = Math.max(stepPenalty, endEl.getP());
+                        additionalPenaltyHeight, endEl.getWidth());
+                stepPenalty = Math.max(stepPenalty, endEl.getPenalty());
             }
 
             int boxHeight = step - addedBoxHeight - penaltyHeight;
@@ -367,7 +367,7 @@
                 end[i]++;
                 KnuthElement el = (KnuthElement)elementLists[i].get(end[i]);
                 if (el.isPenalty()) {
-                    if (el.getP() &lt; KnuthElement.INFINITE) {
+                    if (el.getPenalty() &lt; KnuthElement.INFINITE) {
                         //First legal break point
                         break;
                     }
@@ -379,9 +379,9 @@
                             break;
                         }
                     }
-                    partialHeights[i] += el.getW();
+                    partialHeights[i] += el.getWidth();
                 } else {
-                    partialHeights[i] += el.getW();
+                    partialHeights[i] += el.getWidth();
                 }
             }
             if (end[i] &lt; start[i]) {

Modified: xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/layoutmgr/table/ActiveCell.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/layoutmgr/table/ActiveCell.java?rev=829138&amp;r1=829137&amp;r2=829138&amp;view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/layoutmgr/table/ActiveCell.java (original)
+++ xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/layoutmgr/table/ActiveCell.java Fri Oct 23 17:27:14 2009
@@ -158,9 +158,9 @@
         private int contentLength;
 
         FillerPenalty(KnuthPenalty p, int length) {
-            super(length, p.getP(), p.isFlagged(), p.getBreakClass(),
+            super(length, p.getPenalty(), p.isPenaltyFlagged(), p.getBreakClass(),
                     p.getPosition(), p.isAuxiliary());
-            contentLength = p.getW();
+            contentLength = p.getWidth();
         }
 
         FillerPenalty(int length) {
@@ -190,7 +190,7 @@
         } else if (el instanceof FillerBox) {
             return 0;
         } else {
-            return el.getW();
+            return el.getWidth();
         }
     }
 
@@ -248,17 +248,17 @@
                 KnuthElement el = (KnuthElement) iter.next();
                 if (el.isBox()) {
                     prevIsBox = true;
-                    cumulateLength += el.getW();
+                    cumulateLength += el.getWidth();
                 } else if (el.isGlue()) {
                     if (prevIsBox) {
                         elementList.add(iter.nextIndex() - 1,
                                 new FillerPenalty(minBPD - cumulateLength));
                     }
                     prevIsBox = false;
-                    cumulateLength += el.getW();
+                    cumulateLength += el.getWidth();
                 } else {
                     prevIsBox = false;
-                    if (cumulateLength + el.getW() &lt; minBPD) {
+                    if (cumulateLength + el.getWidth() &lt; minBPD) {
                         iter.set(new FillerPenalty((KnuthPenalty) el, minBPD - cumulateLength));
                     }
                 }
@@ -314,7 +314,7 @@
             KnuthElement el = (KnuthElement) knuthIter.next();
             if (el.isPenalty()) {
                 prevIsBox = false;
-                if (el.getP() &lt; KnuthElement.INFINITE
+                if (el.getPenalty() &lt; KnuthElement.INFINITE
                         || ((KnuthPenalty) el).getBreakClass() == Constants.EN_PAGE) {
                     // TODO too much is being done in that test, only to handle
                     // keep.within-column properly.
@@ -322,8 +322,8 @@
                     // First legal break point
                     breakFound = true;
                     KnuthPenalty p = (KnuthPenalty) el;
-                    afterNextStep.penaltyLength = p.getW();
-                    afterNextStep.penaltyValue = p.getP();
+                    afterNextStep.penaltyLength = p.getWidth();
+                    afterNextStep.penaltyValue = p.getPenalty();
                     if (p.isForcedBreak()) {
                         afterNextStep.breakClass = p.getBreakClass();
                     }
@@ -333,9 +333,9 @@
                     // Second legal break point
                     breakFound = true;
                 } else {
-                    afterNextStep.contentLength += el.getW();
+                    afterNextStep.contentLength += el.getWidth();
                     if (!boxFound) {
-                        afterNextStep.condBeforeContentLength += el.getW();
+                        afterNextStep.condBeforeContentLength += el.getWidth();
                     }
                 }
                 prevIsBox = false;
@@ -348,7 +348,7 @@
                 }
                 prevIsBox = true;
                 boxFound = true;
-                afterNextStep.contentLength += el.getW();
+                afterNextStep.contentLength += el.getWidth();
             }
         }
         afterNextStep.end = knuthIter.nextIndex() - 1;

Modified: xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/layoutmgr/table/RowPainter.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/layoutmgr/table/RowPainter.java?rev=829138&amp;r1=829137&amp;r2=829138&amp;view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/layoutmgr/table/RowPainter.java (original)
+++ xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/layoutmgr/table/RowPainter.java Fri Oct 23 17:27:14 2009
@@ -361,7 +361,7 @@
                 while (iter.nextIndex() &lt; endIndex) {
                     KnuthElement el = (KnuthElement) iter.next();
                     if (el.isBox() || el.isGlue()) {
-                        len += el.getW();
+                        len += el.getWidth();
                     }
                 }
                 len += ActiveCell.getElementContentLength((KnuthElement) iter.next());

Modified: xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/layoutmgr/table/TableCellLayoutManager.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/layoutmgr/table/TableCellLayoutManager.java?rev=829138&amp;r1=829137&amp;r2=829138&amp;view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/layoutmgr/table/TableCellLayoutManager.java (original)
+++ xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/layoutmgr/table/TableCellLayoutManager.java Fri Oct 23 17:27:14 2009
@@ -202,7 +202,7 @@
         if (lastItem.isForcedBreak()) {
             KnuthPenalty p = (KnuthPenalty) lastItem;
             primaryGridUnit.setBreakAfter(p.getBreakClass());
-            p.setP(0);
+            p.setPenalty(0);
         }
 
         setFinished(true);

Modified: xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/pdf/PDFFontNonBase14.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/pdf/PDFFontNonBase14.java?rev=829138&amp;r1=829137&amp;r2=829138&amp;view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/pdf/PDFFontNonBase14.java (original)
+++ xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/pdf/PDFFontNonBase14.java Fri Oct 23 17:27:14 2009
@@ -76,7 +76,7 @@
         if (getDocumentSafely().getProfile().isFontEmbeddingRequired()) {
             if (this.getDescriptor().getFontFile() == null) {
                 throw new PDFConformanceException("For " + getDocumentSafely().getProfile()
-                    + ", all fonts have to be embedded!");
+                    + ", all fonts have to be embedded! Offending font: " + getBaseFont());
             }
         }
     }

Modified: xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/render/afp/AFPCustomizable.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/render/afp/AFPCustomizable.java?rev=829138&amp;r1=829137&amp;r2=829138&amp;view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/render/afp/AFPCustomizable.java (original)
+++ xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/render/afp/AFPCustomizable.java Fri Oct 23 17:27:14 2009
@@ -51,6 +51,14 @@
     void setNativeImagesSupported(boolean nativeImages);
 
     /**
+     * Controls whether CMYK images (IOCA FS45) are enabled. By default, support is disabled
+     * for wider compatibility. When disabled, any CMYK image is converted to the selected
+     * color format.
+     * @param value true to enabled CMYK images
+     */
+    void setCMYKImagesSupported(boolean value);
+
+    /**
      * Sets the shading mode for painting filled rectangles.
      * @param shadingMode the shading mode
      */

Modified: xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/render/afp/AFPDocumentHandler.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/render/afp/AFPDocumentHandler.java?rev=829138&amp;r1=829137&amp;r2=829138&amp;view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/render/afp/AFPDocumentHandler.java (original)
+++ xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/render/afp/AFPDocumentHandler.java Fri Oct 23 17:27:14 2009
@@ -357,6 +357,11 @@
     }
 
     /** {@inheritDoc} */
+    public void setCMYKImagesSupported(boolean value) {
+        paintingState.setCMYKImagesSupported(value);
+    }
+
+    /** {@inheritDoc} */
     public void setShadingMode(AFPShadingMode shadingMode) {
         this.shadingMode = shadingMode;
     }

Modified: xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/render/afp/AFPImageHandlerRawStream.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/render/afp/AFPImageHandlerRawStream.java?rev=829138&amp;r1=829137&amp;r2=829138&amp;view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/render/afp/AFPImageHandlerRawStream.java (original)
+++ xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/render/afp/AFPImageHandlerRawStream.java Fri Oct 23 17:27:14 2009
@@ -24,6 +24,7 @@
 import org.apache.xmlgraphics.image.loader.impl.ImageRawEPS;
 import org.apache.xmlgraphics.image.loader.impl.ImageRawJPEG;
 import org.apache.xmlgraphics.image.loader.impl.ImageRawStream;
+import org.apache.xmlgraphics.util.MimeConstants;
 
 import org.apache.fop.afp.AFPDataObjectInfo;
 import org.apache.fop.render.RenderingContext;
@@ -35,6 +36,7 @@
 
     private static final ImageFlavor[] FLAVORS = new ImageFlavor[] {
         ImageFlavor.RAW_JPEG,
+        ImageFlavor.RAW_TIFF,
         ImageFlavor.RAW_EPS,
     };
 
@@ -63,7 +65,12 @@
         if (targetContext instanceof AFPRenderingContext) {
             AFPRenderingContext afpContext = (AFPRenderingContext)targetContext;
             return (afpContext.getPaintingState().isNativeImagesSupported())
-                &amp;&amp; (image == null || image instanceof ImageRawJPEG || image instanceof ImageRawEPS);
+                &amp;&amp; (image == null
+                        || image instanceof ImageRawJPEG
+                        || image instanceof ImageRawEPS
+                        || ((image instanceof ImageRawStream)
+                                &amp;&amp; (MimeConstants.MIME_TIFF.equals(
+                                        ((ImageRawStream)image).getMimeType()))));
         }
         return false;
     }

Modified: xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/render/afp/AFPImageHandlerRenderedImage.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/render/afp/AFPImageHandlerRenderedImage.java?rev=829138&amp;r1=829137&amp;r2=829138&amp;view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/render/afp/AFPImageHandlerRenderedImage.java (original)
+++ xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/render/afp/AFPImageHandlerRenderedImage.java Fri Oct 23 17:27:14 2009
@@ -89,7 +89,11 @@
         int resolution = paintingState.getResolution();
         int maxPixelSize = paintingState.getBitsPerPixel();
         if (paintingState.isColorImages()) {
-            maxPixelSize *= 3; //RGB only at the moment
+            if (paintingState.isCMYKImagesSupported()) {
+                maxPixelSize *= 4; //CMYK is maximum
+            } else {
+                maxPixelSize *= 3; //RGB is maximum
+            }
         }
         RenderedImage renderedImage = imageRendered.getRenderedImage();
 
@@ -97,6 +101,7 @@
         ImageSize intrinsicSize = imageInfo.getSize();
 
         boolean useFS10 = (maxPixelSize == 1) || BitmapImageUtil.isMonochromeImage(renderedImage);
+        int functionSet = useFS10 ? 10 : 11;
         boolean usePageSegments = useFS10
                     &amp;&amp; !imageObjectInfo.getResourceInfo().getLevel().isInline();
 
@@ -124,11 +129,6 @@
                         resampledDim.width, resampledDim.height, resolution);
             }
         }
-        if (useFS10) {
-            imageObjectInfo.setMimeType(MimeConstants.MIME_AFP_IOCA_FS10);
-        } else {
-            imageObjectInfo.setMimeType(MimeConstants.MIME_AFP_IOCA_FS11);
-        }
 
         imageObjectInfo.setDataHeightRes((int)Math.round(
                 effIntrinsicSize.getDpiHorizontal() * 10));
@@ -156,9 +156,9 @@
         byte[] imageData = null;
         ByteArrayOutputStream baos = new ByteArrayOutputStream();
         boolean allowDirectEncoding = true;
-        if (allowDirectEncoding &amp;&amp; pixelSize &lt;= maxPixelSize) {
+        if (allowDirectEncoding &amp;&amp; (pixelSize &lt;= maxPixelSize)) {
             //Attempt to encode without resampling the image
-            ImageEncodingHelper helper = new ImageEncodingHelper(renderedImage);
+            ImageEncodingHelper helper = new ImageEncodingHelper(renderedImage, pixelSize == 32);
             ColorModel encodedColorModel = helper.getEncodedColorModel();
             boolean directEncode = true;
             if (helper.getEncodedColorModel().getPixelSize() &gt; maxPixelSize) {
@@ -180,6 +180,9 @@
                     log.trace("set subtractive mode");
                     imageObjectInfo.setSubtractive(true);
                 }
+                if (pixelSize == 32) {
+                    functionSet = 45; //IOCA FS45 required for CMYK
+                }
 
                 helper.encode(baos);
                 imageData = baos.toByteArray();
@@ -191,6 +194,7 @@
             //Convert image to 24bit RGB
             ImageEncodingHelper.encodeRenderedImageAsRGB(renderedImage, baos);
             imageData = baos.toByteArray();
+            imageObjectInfo.setBitsPerPixel(24);
 
             boolean colorImages = paintingState.isColorImages();
             imageObjectInfo.setColor(colorImages);
@@ -212,6 +216,20 @@
             }
         }
 
+        switch (functionSet) {
+        case 10:
+            imageObjectInfo.setMimeType(MimeConstants.MIME_AFP_IOCA_FS10);
+            break;
+        case 11:
+            imageObjectInfo.setMimeType(MimeConstants.MIME_AFP_IOCA_FS11);
+            break;
+        case 45:
+            imageObjectInfo.setMimeType(MimeConstants.MIME_AFP_IOCA_FS45);
+            break;
+        default:
+            throw new IllegalStateException("Invalid IOCA function set: " + functionSet);
+        }
+
         imageObjectInfo.setData(imageData);
 
         // set object area info

Modified: xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/render/afp/AFPRenderer.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/render/afp/AFPRenderer.java?rev=829138&amp;r1=829137&amp;r2=829138&amp;view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/render/afp/AFPRenderer.java (original)
+++ xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/render/afp/AFPRenderer.java Fri Oct 23 17:27:14 2009
@@ -90,8 +90,8 @@
 import org.apache.fop.render.afp.extensions.AFPExtensionAttachment;
 import org.apache.fop.render.afp.extensions.AFPIncludeFormMap;
 import org.apache.fop.render.afp.extensions.AFPInvokeMediumMap;
-import org.apache.fop.render.afp.extensions.AFPPageSetup;
 import org.apache.fop.render.afp.extensions.AFPPageOverlay;
+import org.apache.fop.render.afp.extensions.AFPPageSetup;
 
 /**
  * This is an implementation of a FOP Renderer that renders areas to AFP.
@@ -444,6 +444,7 @@
         ImageFlavor.XML_DOM,
         /*ImageFlavor.RAW_PNG, */ // PNG not natively supported in AFP
         ImageFlavor.RAW_JPEG, ImageFlavor.RAW_CCITTFAX, ImageFlavor.RAW_EPS,
+        ImageFlavor.RAW_TIFF,
         ImageFlavor.GRAPHICS2D, ImageFlavor.BUFFERED_IMAGE, ImageFlavor.RENDERED_IMAGE };
 
     private static final ImageFlavor[] FLAVORS = new ImageFlavor[] {
@@ -831,6 +832,11 @@
     }
 
     /** {@inheritDoc} */
+    public void setCMYKImagesSupported(boolean value) {
+        paintingState.setCMYKImagesSupported(value);
+    }
+
+    /** {@inheritDoc} */
     public void setShadingMode(AFPShadingMode shadingMode) {
         this.shadingMode = shadingMode;
     }

Modified: xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/render/afp/AFPRendererConfigurator.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/render/afp/AFPRendererConfigurator.java?rev=829138&amp;r1=829137&amp;r2=829138&amp;view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/render/afp/AFPRendererConfigurator.java (original)
+++ xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/render/afp/AFPRendererConfigurator.java Fri Oct 23 17:27:14 2009
@@ -318,6 +318,9 @@
         String imagesMode = imagesCfg.getAttribute("mode", IMAGES_MODE_GRAYSCALE);
         if (IMAGES_MODE_COLOR.equals(imagesMode)) {
             customizable.setColorImages(true);
+
+            boolean cmyk = imagesCfg.getAttributeAsBoolean("cmyk", false);
+            customizable.setCMYKImagesSupported(cmyk);
         } else {
             customizable.setColorImages(false);
             // default to 8 bits per pixel

Propchange: xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/render/intermediate/AbstractIFDocumentHandler.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Oct 23 17:27:14 2009
@@ -1 +1 @@
-/xmlgraphics/fop/trunk/src/java/org/apache/fop/render/intermediate/AbstractIFDocumentHandler.java:699793-824832
+/xmlgraphics/fop/trunk/src/java/org/apache/fop/render/intermediate/AbstractIFDocumentHandler.java:699793-829121

Propchange: xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/render/intermediate/IFContentHandler.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Oct 23 17:27:14 2009
@@ -1 +1 @@
-/xmlgraphics/fop/trunk/src/java/org/apache/fop/render/intermediate/IFContentHandler.java:680381-824832
+/xmlgraphics/fop/trunk/src/java/org/apache/fop/render/intermediate/IFContentHandler.java:680381-829121

Propchange: xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/render/intermediate/IFPainter.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Oct 23 17:27:14 2009
@@ -1 +1 @@
-/xmlgraphics/fop/trunk/src/java/org/apache/fop/render/intermediate/IFPainter.java:680381-824832
+/xmlgraphics/fop/trunk/src/java/org/apache/fop/render/intermediate/IFPainter.java:680381-829121

Propchange: xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/render/intermediate/IFRenderer.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Oct 23 17:27:14 2009
@@ -1 +1 @@
-/xmlgraphics/fop/trunk/src/java/org/apache/fop/render/intermediate/IFRenderer.java:680381-824832
+/xmlgraphics/fop/trunk/src/java/org/apache/fop/render/intermediate/IFRenderer.java:680381-829121

Propchange: xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/render/intermediate/extensions/DocumentNavigationExtensionConstants.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Oct 23 17:27:14 2009
@@ -1 +1 @@
-/xmlgraphics/fop/trunk/src/java/org/apache/fop/render/intermediate/extensions/DocumentNavigationExtensionConstants.java:685127-824832
+/xmlgraphics/fop/trunk/src/java/org/apache/fop/render/intermediate/extensions/DocumentNavigationExtensionConstants.java:685127-829121

Propchange: xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/render/pcl/PCLDocumentHandler.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Oct 23 17:27:14 2009
@@ -1 +1 @@
-/xmlgraphics/fop/trunk/src/java/org/apache/fop/render/pcl/PCLDocumentHandler.java:699793-824832
+/xmlgraphics/fop/trunk/src/java/org/apache/fop/render/pcl/PCLDocumentHandler.java:699793-829121

Propchange: xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/render/pcl/PCLDocumentHandlerMaker.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Oct 23 17:27:14 2009
@@ -1 +1 @@
-/xmlgraphics/fop/trunk/src/java/org/apache/fop/render/pcl/PCLDocumentHandlerMaker.java:699793-824832
+/xmlgraphics/fop/trunk/src/java/org/apache/fop/render/pcl/PCLDocumentHandlerMaker.java:699793-829121

Propchange: xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/render/pdf/PDFDocumentHandler.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Oct 23 17:27:14 2009
@@ -1 +1 @@
-/xmlgraphics/fop/trunk/src/java/org/apache/fop/render/pdf/PDFDocumentHandler.java:699793-824832
+/xmlgraphics/fop/trunk/src/java/org/apache/fop/render/pdf/PDFDocumentHandler.java:699793-829121

Modified: xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/tools/anttasks/Fop.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/tools/anttasks/Fop.java?rev=829138&amp;r1=829137&amp;r2=829138&amp;view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/tools/anttasks/Fop.java (original)
+++ xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/tools/anttasks/Fop.java Fri Oct 23 17:27:14 2009
@@ -34,6 +34,7 @@
 import java.io.OutputStream;
 import java.net.MalformedURLException;
 import java.util.List;
+import java.util.Vector;
 
 // FOP
 import org.apache.fop.apps.FOPException;
@@ -67,7 +68,10 @@
 public class Fop extends Task {
 
     private File foFile;
-    private List filesets = new java.util.ArrayList();
+    private File xmlFile;
+    private File xsltFile;
+    private String xsltParams;
+    private List/*&lt;FileSet&gt;*/ filesets = new java.util.ArrayList/*&lt;FileSet&gt;*/();
     private File outFile;
     private File outDir;
     private String format; //MIME type
@@ -112,6 +116,54 @@
     }
 
     /**
+     * Gets the input XML file.
+     * @return the input XML file.
+     */
+    public File getXmlFile() {
+        return xmlFile;
+    }
+
+    /**
+     * Sets the input XML file.
+     * @param xmlFile the input XML file.
+     */
+    public void setXmlFile(File xmlFile) {
+        this.xmlFile = xmlFile;
+    }
+
+    /**
+     * Gets the input XSLT file.
+     * @return the input XSLT file.
+     */
+    public File getXsltFile() {
+        return xsltFile;
+    }
+
+    /**
+     * Sets the input XSLT file.
+     * @param xsltFile the input XSLT file.
+     */
+    public void setXsltFile(File xsltFile) {
+        this.xsltFile = xsltFile;
+    }
+
+    /**
+     * Gets the XSLT parameters
+     * @return the XSLT parameters
+     */
+    public String getXsltParams() {
+        return xsltParams;
+    }
+
+    /**
+     * Sets the XSLT parameters 
+     * @param xsltParams the XSLT parameters
+     */
+    public void setXsltParams(String xsltParams) {
+        this.xsltParams = xsltParams;
+    }
+
+    /**
      * Adds a set of XSL-FO files (nested fileset attribute).
      * @param set a fileset
      */
@@ -491,10 +543,39 @@
                     skippedcount++;
                 }
             }
+        } else if (task.getXmlFile() != null &amp;&amp; task.getXsltFile() != null) {
+            if (task.getXmlFile().exists() &amp;&amp; task.getXsltFile().exists()) {
+                File outf = task.getOutfile();
+                if (outf == null) {
+                    throw new BuildException("outfile is required when fofile is used");
+                }
+                if (task.getOutdir() != null) {
+                    outf = new File(task.getOutdir(), outf.getName());
+                }
+                // Render if "force" flag is set OR
+                // OR output file doesn't exist OR
+                // output file is older than input file
+                if (task.getForce() || !outf.exists()
+                    || (task.getXmlFile().lastModified() &gt; outf.lastModified() ||
+                            task.getXsltFile().lastModified() &gt; outf.lastModified())) {
+                    render(task.getXmlFile(), task.getXsltFile(), outf, outputFormat);
+                    actioncount++;
+                } else if (outf.exists()
+                        &amp;&amp; (task.getXmlFile().lastModified() &lt;= outf.lastModified() ||
+                                task.getXsltFile().lastModified() &lt;= outf.lastModified())) {
+                    skippedcount++;
+                }
+            }
         }
 
         GlobPatternMapper mapper = new GlobPatternMapper();
-        mapper.setFrom("*.fo");
+
+        String inputExtension = ".fo";
+        File xsltFile = task.getXsltFile();
+        if (xsltFile != null) {
+            inputExtension = ".xml";
+        }
+        mapper.setFrom("*" + inputExtension);
         mapper.setTo("*" + newExtension);
 
         // deal with the filesets
@@ -507,16 +588,19 @@
                 File f = new File(fs.getDir(task.getProject()), files[j]);
 
                 File outf = null;
-                if (task.getOutdir() != null &amp;&amp; files[j].endsWith(".fo")) {
+                if (task.getOutdir() != null &amp;&amp; files[j].endsWith(inputExtension)) {
                   String[] sa = mapper.mapFileName(files[j]);
                   outf = new File(task.getOutdir(), sa[0]);
                 } else {
-                  outf = replaceExtension(f, ".fo", newExtension);
+                  outf = replaceExtension(f, inputExtension, newExtension);
                   if (task.getOutdir() != null) {
                       outf = new File(task.getOutdir(), outf.getName());
                   }
                 }
-
+                File dir = outf.getParentFile();
+                if (!dir.exists()) {
+                    dir.mkdirs();
+                }
                 try {
                     if (task.getRelativebase()) {
                         this.baseURL = f.getParentFile().toURI().toURL().
@@ -536,7 +620,11 @@
                 // output file is older than input file
                 if (task.getForce() || !outf.exists()
                     || (f.lastModified() &gt; outf.lastModified() )) {
-                    render(f, outf, outputFormat);
+                    if (xsltFile != null) {
+                        render(f, xsltFile, outf, outputFormat);
+                    } else {
+                        render(f, outf, outputFormat);
+                    }
                     actioncount++;
                 } else if (outf.exists() &amp;&amp; (f.lastModified() &lt;= outf.lastModified() )) {
                     skippedcount++;
@@ -554,10 +642,7 @@
         }
     }
 
-    private void render(File foFile, File outFile,
-                        String outputFormat) throws FOPException {
-        InputHandler inputHandler = new InputHandler(foFile);
-
+    private void renderInputHandler(InputHandler inputHandler, File outFile, String outputFormat) throws Exception {
         OutputStream out = null;
         try {
             out = new java.io.FileOutputStream(outFile);
@@ -565,11 +650,6 @@
         } catch (Exception ex) {
             throw new BuildException("Failed to open " + outFile, ex);
         }
-
-        if (task.getLogFiles()) {
-            task.log(foFile + " -&gt; " + outFile, Project.MSG_INFO);
-        }
-
         boolean success = false;
         try {
             FOUserAgent userAgent = fopFactory.newFOUserAgent();
@@ -580,7 +660,7 @@
             if (task.getThrowexceptions()) {
                 throw new BuildException(ex);
             }
-            logger.error("Error rendering fo file: " + foFile, ex);
+            throw ex;
         } finally {
             try {
                 out.close();
@@ -593,5 +673,31 @@
         }
     }
 
+    private void render(File foFile, File outFile,
+                        String outputFormat) throws FOPException {
+        InputHandler inputHandler = new InputHandler(foFile);
+        try {
+            renderInputHandler(inputHandler, outFile, outputFormat);
+        } catch (Exception ex) {
+            logger.error("Error rendering fo file: " + foFile, ex);
+        }
+        if (task.getLogFiles()) {
+            task.log(foFile + " -&gt; " + outFile, Project.MSG_INFO);
+        }
+    }
+
+    private void render(File xmlFile, File xsltFile, File outFile, String outputFormat) {
+        //TODO: implement support for XSLT params
+        final Vector xsltParams = null;
+        InputHandler inputHandler = new InputHandler(xmlFile, xsltFile, xsltParams);
+        try {
+            renderInputHandler(inputHandler, outFile, outputFormat);
+        } catch (Exception ex) {
+            logger.error("Error rendering xml/xslt files: " + xmlFile + ", " + xsltFile, ex);
+        }
+        if (task.getLogFiles()) {
+            task.log("xml: " + xmlFile + ", xslt: " + xsltFile + " -&gt; " + outFile, Project.MSG_INFO);
+        }
+    }
 }
 

Propchange: xmlgraphics/fop/branches/Temp_Accessibility/src/sandbox/org/apache/fop/render/svg/AbstractSVGDocumentHandler.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Oct 23 17:27:14 2009
@@ -1 +1 @@
-/xmlgraphics/fop/trunk/src/sandbox/org/apache/fop/render/svg/AbstractSVGDocumentHandler.java:699793-824832
+/xmlgraphics/fop/trunk/src/sandbox/org/apache/fop/render/svg/AbstractSVGDocumentHandler.java:699793-829121

Propchange: xmlgraphics/fop/branches/Temp_Accessibility/src/sandbox/org/apache/fop/render/svg/SVGDocumentHandler.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Oct 23 17:27:14 2009
@@ -1 +1 @@
-/xmlgraphics/fop/trunk/src/sandbox/org/apache/fop/render/svg/SVGDocumentHandler.java:699793-824832
+/xmlgraphics/fop/trunk/src/sandbox/org/apache/fop/render/svg/SVGDocumentHandler.java:699793-829121

Modified: xmlgraphics/fop/branches/Temp_Accessibility/status.xml
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_Accessibility/status.xml?rev=829138&amp;r1=829137&amp;r2=829138&amp;view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_Accessibility/status.xml (original)
+++ xmlgraphics/fop/branches/Temp_Accessibility/status.xml Fri Oct 23 17:27:14 2009
@@ -61,6 +61,18 @@
       &lt;action context="Renderers" dev="JM" type="add" fixes-bug="46705" due-to="Jost Klopfstein"&gt;
         Added basic accessibility and Tagged PDF support. 
       &lt;/action&gt;
+      &lt;action context="Code" dev="JM" type="add"&gt;
+        Added support for encoding CMYK bitmap images (IOCA FS45) and TIFF images as embedded objects.
+      &lt;/action&gt;
+      &lt;action context="Code" dev="AC" type="add"&gt;
+        Added support for xmlfile and xsltfile parameters in FOP's Ant Task.
+      &lt;/action&gt;
+      &lt;action context="Renderers" dev="AC" type="fix" fixes-bug="47941"&gt;
+        BugFix: Maintain valid AFP by providing TLE truncation on Attribute Value Triplet values that are greater than 250 chars in length.
+      &lt;/action&gt;
+      &lt;action context="Fonts" dev="JM" type="fix" fixes-bug="47711" due-to="Nicolas Peninguy"&gt;
+        Fixed generation of CIDSet object in PDF output.
+      &lt;/action&gt;
       &lt;action context="Layout" dev="VH" type="fix"&gt;
         Fixed handling of percentage values for provisional-label-separation.
       &lt;/action&gt;

Modified: xmlgraphics/fop/branches/Temp_Accessibility/test/java/org/apache/fop/layoutengine/ElementListCheck.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_Accessibility/test/java/org/apache/fop/layoutengine/ElementListCheck.java?rev=829138&amp;r1=829137&amp;r2=829138&amp;view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_Accessibility/test/java/org/apache/fop/layoutengine/ElementListCheck.java (original)
+++ xmlgraphics/fop/branches/Temp_Accessibility/test/java/org/apache/fop/layoutengine/ElementListCheck.java Fri Oct 23 17:27:14 2009
@@ -83,10 +83,10 @@
                     }
                     if (domEl.getAttribute("w").length() &gt; 0) {
                         int w = Integer.parseInt(domEl.getAttribute("w"));
-                        if (w != knuthEl.getW()) {
+                        if (w != knuthEl.getWidth()) {
                             fail("Expected w=" + w
                                     + " at position " + pos
-                                    + " but got: " + knuthEl.getW());
+                                    + " but got: " + knuthEl.getWidth());
                         }
                     }
                     if ("true".equals(domEl.getAttribute("aux"))) {
@@ -110,24 +110,24 @@
                     KnuthPenalty pen = (KnuthPenalty)knuthEl;
                     if (domEl.getAttribute("w").length() &gt; 0) {
                         int w = Integer.parseInt(domEl.getAttribute("w"));
-                        if (w != knuthEl.getW()) {
+                        if (w != knuthEl.getWidth()) {
                             fail("Expected w=" + w
                                     + " at position " + pos
-                                    + " but got: " + knuthEl.getW());
+                                    + " but got: " + knuthEl.getWidth());
                         }
                     }
                     if (domEl.getAttribute("p").length() &gt; 0) {
                         if ("&lt;0".equals(domEl.getAttribute("p"))) {
-                            if (knuthEl.getP() &gt;= 0) {
+                            if (knuthEl.getPenalty() &gt;= 0) {
                                 fail("Expected p&lt;0"
                                         + " at position " + pos
-                                        + " but got: " + knuthEl.getP());
+                                        + " but got: " + knuthEl.getPenalty());
                             }
                         } else if ("&gt;0".equals(domEl.getAttribute("p"))) {
-                            if (knuthEl.getP() &lt;= 0) {
+                            if (knuthEl.getPenalty() &lt;= 0) {
                                 fail("Expected p&gt;0"
                                         + " at position " + pos
-                                        + " but got: " + knuthEl.getP());
+                                        + " but got: " + knuthEl.getPenalty());
                             }
                         } else {
                             int p;
@@ -142,20 +142,20 @@
                             } else {
                                 p = Integer.parseInt(domEl.getAttribute("p"));
                             }
-                            if (p != knuthEl.getP()) {
+                            if (p != knuthEl.getPenalty()) {
                                 fail("Expected p=" + p
                                         + " at position " + pos
-                                        + " but got: " + knuthEl.getP());
+                                        + " but got: " + knuthEl.getPenalty());
                             }
                         }
                     }
                     if ("true".equals(domEl.getAttribute("flagged"))) {
-                        if (!pen.isFlagged()) {
+                        if (!pen.isPenaltyFlagged()) {
                             fail("Expected flagged penalty"
                                     + " at position " + pos);
                         }
                     } else if ("false".equals(domEl.getAttribute("flagged"))) {
-                        if (pen.isFlagged()) {
+                        if (pen.isPenaltyFlagged()) {
                             fail("Expected non-flagged penalty"
                                     + " at position " + pos);
                         }
@@ -180,26 +180,26 @@
                     KnuthGlue glue = (KnuthGlue)knuthEl;
                     if (domEl.getAttribute("w").length() &gt; 0) {
                         int w = Integer.parseInt(domEl.getAttribute("w"));
-                        if (w != knuthEl.getW()) {
+                        if (w != knuthEl.getWidth()) {
                             fail("Expected w=" + w
                                     + " at position " + pos
-                                    + " but got: " + knuthEl.getW());
+                                    + " but got: " + knuthEl.getWidth());
                         }
                     }
                     if (domEl.getAttribute("y").length() &gt; 0) {
                         int stretch = Integer.parseInt(domEl.getAttribute("y"));
-                        if (stretch != knuthEl.getY()) {
+                        if (stretch != knuthEl.getStretch()) {
                             fail("Expected y=" + stretch
                                     + " (stretch) at position " + pos
-                                    + " but got: " + knuthEl.getY());
+                                    + " but got: " + knuthEl.getStretch());
                         }
                     }
                     if (domEl.getAttribute("z").length() &gt; 0) {
                         int shrink = Integer.parseInt(domEl.getAttribute("z"));
-                        if (shrink != knuthEl.getZ()) {
+                        if (shrink != knuthEl.getShrink()) {
                             fail("Expected z=" + shrink
                                     + " (shrink) at position " + pos
-                                    + " but got: " + knuthEl.getZ());
+                                    + " but got: " + knuthEl.getShrink());
                         }
                     }
                 } else {

Modified: xmlgraphics/fop/branches/Temp_Accessibility/test/java/org/apache/fop/util/ElementListUtilsTestCase.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_Accessibility/test/java/org/apache/fop/util/ElementListUtilsTestCase.java?rev=829138&amp;r1=829137&amp;r2=829138&amp;view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_Accessibility/test/java/org/apache/fop/util/ElementListUtilsTestCase.java (original)
+++ xmlgraphics/fop/branches/Temp_Accessibility/test/java/org/apache/fop/util/ElementListUtilsTestCase.java Fri Oct 23 17:27:14 2009
@@ -55,9 +55,9 @@
 
         assertFalse(res);
 
-        assertEquals(KnuthElement.INFINITE, ((KnuthPenalty)lst.get(1)).getP());
-        assertEquals(KnuthElement.INFINITE, ((KnuthPenalty)lst.get(3)).getP());
-        assertEquals(0, ((KnuthPenalty)lst.get(5)).getP());
+        assertEquals(KnuthElement.INFINITE, ((KnuthPenalty)lst.get(1)).getPenalty());
+        assertEquals(KnuthElement.INFINITE, ((KnuthPenalty)lst.get(3)).getPenalty());
+        assertEquals(0, ((KnuthPenalty)lst.get(5)).getPenalty());
     }
 
     /**
@@ -82,11 +82,11 @@
         assertFalse(res);
 
         //Must insert an INFINITE penalty
-        assertEquals(KnuthElement.INFINITE, ((KnuthPenalty)lst.get(1)).getP());
-        assertEquals(0, ((KnuthGlue)lst.get(2)).getW());
-        assertEquals(KnuthElement.INFINITE, ((KnuthPenalty)lst.get(4)).getP());
-        assertEquals(0, ((KnuthGlue)lst.get(5)).getW());
-        assertEquals(0, ((KnuthGlue)lst.get(7)).getW());
+        assertEquals(KnuthElement.INFINITE, ((KnuthPenalty)lst.get(1)).getPenalty());
+        assertEquals(0, ((KnuthGlue)lst.get(2)).getWidth());
+        assertEquals(KnuthElement.INFINITE, ((KnuthPenalty)lst.get(4)).getPenalty());
+        assertEquals(0, ((KnuthGlue)lst.get(5)).getWidth());
+        assertEquals(0, ((KnuthGlue)lst.get(7)).getWidth());
     }
 
     /**
@@ -110,9 +110,9 @@
 
         assertFalse(res);
 
-        assertEquals(0, ((KnuthPenalty)lst.get(1)).getP());
-        assertEquals(KnuthElement.INFINITE, ((KnuthPenalty)lst.get(3)).getP());
-        assertEquals(KnuthElement.INFINITE, ((KnuthPenalty)lst.get(5)).getP());
+        assertEquals(0, ((KnuthPenalty)lst.get(1)).getPenalty());
+        assertEquals(KnuthElement.INFINITE, ((KnuthPenalty)lst.get(3)).getPenalty());
+        assertEquals(KnuthElement.INFINITE, ((KnuthPenalty)lst.get(5)).getPenalty());
     }
 
     /**
@@ -137,10 +137,10 @@
         assertFalse(res);
 
         //Must insert an INFINITE penalty
-        assertEquals(0, ((KnuthPenalty)lst.get(1)).getP());
-        assertEquals(KnuthElement.INFINITE, ((KnuthPenalty)lst.get(3)).getP());
-        assertEquals(KnuthElement.INFINITE, ((KnuthPenalty)lst.get(5)).getP());
-        assertEquals(0, ((KnuthGlue)lst.get(6)).getW());
+        assertEquals(0, ((KnuthPenalty)lst.get(1)).getPenalty());
+        assertEquals(KnuthElement.INFINITE, ((KnuthPenalty)lst.get(3)).getPenalty());
+        assertEquals(KnuthElement.INFINITE, ((KnuthPenalty)lst.get(5)).getPenalty());
+        assertEquals(0, ((KnuthGlue)lst.get(6)).getWidth());
     }
 
 



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



</pre>
</div>
</content>
</entry>
<entry>
<title>svn commit: r829138 [1/2] - in /xmlgraphics/fop/branches/Temp_Accessibility: ./ lib/ src/documentation/content/xdocs/trunk/ src/java/META-INF/services/ src/java/org/apache/fop/afp/ src/java/org/apache/fop/afp/goca/ src/java/org/apache/fop/afp/ioca/ src...</title>
<author><name>vhennebert@apache.org</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/xmlgraphics-fop-commits/200910.mbox/%3c20091023172719.CDF3123888CF@eris.apache.org%3e"/>
<id>urn:uuid:%3c20091023172719-CDF3123888CF@eris-apache-org%3e</id>
<updated>2009-10-23T17:27:17Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Author: vhennebert
Date: Fri Oct 23 17:27:14 2009
New Revision: 829138

URL: http://svn.apache.org/viewvc?rev=829138&amp;view=rev
Log:
Merged changes from Trunk up to revision 829121

Added:
    xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/afp/ioca/IDEStructureParameter.java
      - copied unchanged from r829121, xmlgraphics/fop/trunk/src/java/org/apache/fop/afp/ioca/IDEStructureParameter.java
    xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/afp/modca/triplets/AttributeQualifierTriplet.java
      - copied unchanged from r829121, xmlgraphics/fop/trunk/src/java/org/apache/fop/afp/modca/triplets/AttributeQualifierTriplet.java
    xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/afp/modca/triplets/AttributeValueTriplet.java
      - copied unchanged from r829121, xmlgraphics/fop/trunk/src/java/org/apache/fop/afp/modca/triplets/AttributeValueTriplet.java
    xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/afp/modca/triplets/Triplet.java
      - copied unchanged from r829121, xmlgraphics/fop/trunk/src/java/org/apache/fop/afp/modca/triplets/Triplet.java
    xmlgraphics/fop/branches/Temp_Accessibility/test/layoutengine/standard-testcases/flow_changing-ipd_no-restartable.xml
      - copied unchanged from r829121, xmlgraphics/fop/trunk/test/layoutengine/standard-testcases/flow_changing-ipd_no-restartable.xml
    xmlgraphics/fop/branches/Temp_Accessibility/test/layoutengine/standard-testcases/flow_changing-ipd_table-after-break.xml
      - copied unchanged from r829121, xmlgraphics/fop/trunk/test/layoutengine/standard-testcases/flow_changing-ipd_table-after-break.xml
Modified:
    xmlgraphics/fop/branches/Temp_Accessibility/   (props changed)
    xmlgraphics/fop/branches/Temp_Accessibility/build.xml
    xmlgraphics/fop/branches/Temp_Accessibility/lib/xmlgraphics-commons-1.4svn.jar
    xmlgraphics/fop/branches/Temp_Accessibility/src/documentation/content/xdocs/trunk/anttask.xml
    xmlgraphics/fop/branches/Temp_Accessibility/src/java/META-INF/services/org.apache.fop.render.intermediate.IFDocumentHandler   (props changed)
    xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/afp/AFPDataObjectFactory.java
    xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/afp/AFPPaintingState.java
    xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/afp/goca/GraphicsCharacterString.java
    xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/afp/ioca/ImageContent.java
    xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/afp/ioca/ImageSegment.java
    xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/afp/modca/AbstractAFPObject.java
    xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/afp/modca/AbstractTripletStructuredObject.java
    xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/afp/modca/ContainerDataDescriptor.java
    xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/afp/modca/ImageDataDescriptor.java
    xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/afp/modca/ImageObject.java
    xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/afp/modca/TagLogicalElement.java
    xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/afp/modca/triplets/AbstractTriplet.java
    xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/cli/CommandLineOptions.java
    xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/cli/InputHandler.java
    xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/fo/FObj.java
    xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/fonts/CIDSubset.java
    xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/fonts/Font.java
    xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/layoutmgr/AbstractBreaker.java
    xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/layoutmgr/BlockContainerLayoutManager.java
    xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/layoutmgr/BlockLayoutManager.java
    xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/layoutmgr/BlockStackingLayoutManager.java
    xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/layoutmgr/BreakingAlgorithm.java
    xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/layoutmgr/ElementListUtils.java
    xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/layoutmgr/InlineKnuthSequence.java
    xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/layoutmgr/KnuthBox.java
    xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/layoutmgr/KnuthElement.java
    xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/layoutmgr/KnuthGlue.java
    xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/layoutmgr/KnuthPenalty.java
    xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/layoutmgr/KnuthSequence.java
    xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/layoutmgr/PageBreakingAlgorithm.java
    xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/layoutmgr/PageProvider.java
    xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/layoutmgr/inline/ContentLayoutManager.java
    xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/layoutmgr/inline/LineLayoutManager.java
    xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/layoutmgr/inline/TextLayoutManager.java
    xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/layoutmgr/list/ListItemLayoutManager.java
    xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/layoutmgr/table/ActiveCell.java
    xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/layoutmgr/table/RowPainter.java
    xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/layoutmgr/table/TableCellLayoutManager.java
    xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/pdf/PDFFontNonBase14.java
    xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/render/afp/AFPCustomizable.java
    xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/render/afp/AFPDocumentHandler.java
    xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/render/afp/AFPImageHandlerRawStream.java
    xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/render/afp/AFPImageHandlerRenderedImage.java
    xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/render/afp/AFPRenderer.java
    xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/render/afp/AFPRendererConfigurator.java
    xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/render/intermediate/AbstractIFDocumentHandler.java   (props changed)
    xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/render/intermediate/IFContentHandler.java   (props changed)
    xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/render/intermediate/IFPainter.java   (props changed)
    xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/render/intermediate/IFRenderer.java   (props changed)
    xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/render/intermediate/extensions/DocumentNavigationExtensionConstants.java   (props changed)
    xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/render/pcl/PCLDocumentHandler.java   (props changed)
    xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/render/pcl/PCLDocumentHandlerMaker.java   (props changed)
    xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/render/pdf/PDFDocumentHandler.java   (props changed)
    xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/tools/anttasks/Fop.java
    xmlgraphics/fop/branches/Temp_Accessibility/src/sandbox/org/apache/fop/render/svg/AbstractSVGDocumentHandler.java   (props changed)
    xmlgraphics/fop/branches/Temp_Accessibility/src/sandbox/org/apache/fop/render/svg/SVGDocumentHandler.java   (props changed)
    xmlgraphics/fop/branches/Temp_Accessibility/status.xml
    xmlgraphics/fop/branches/Temp_Accessibility/test/java/org/apache/fop/layoutengine/ElementListCheck.java
    xmlgraphics/fop/branches/Temp_Accessibility/test/java/org/apache/fop/util/ElementListUtilsTestCase.java

Propchange: xmlgraphics/fop/branches/Temp_Accessibility/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Oct 23 17:27:14 2009
@@ -1,4 +1,4 @@
 /xmlgraphics/fop/branches/Temp_AFPGOCAResources:630874-721418
 /xmlgraphics/fop/branches/Temp_AreaTreeNewDesign:745924-746655
 /xmlgraphics/fop/branches/fop-0_95:684572,688085,688696
-/xmlgraphics/fop/trunk:603620-824832
+/xmlgraphics/fop/trunk:603620-829121

Modified: xmlgraphics/fop/branches/Temp_Accessibility/build.xml
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_Accessibility/build.xml?rev=829138&amp;r1=829137&amp;r2=829138&amp;view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_Accessibility/build.xml (original)
+++ xmlgraphics/fop/branches/Temp_Accessibility/build.xml Fri Oct 23 17:27:14 2009
@@ -156,10 +156,14 @@
   &lt;property name="fo.examples.userconfig" value="conf/fop.xconf"/&gt;
   &lt;property name="fo.examples.include" value="**/*.fo"/&gt;
   &lt;property name="fo.examples.force" value="false"/&gt;
+  &lt;property name="xml.tests.include" value="**/*.xml"/&gt;
+  &lt;property name="xml.tests.force" value="false"/&gt;
+  &lt;property name="xml.tests.userconfig" value="conf/fop.xconf"/&gt;
   &lt;property name="lib.dir" value="${basedir}/lib"/&gt;
   &lt;property name="user.hyph.dir" value="${basedir}/hyph"/&gt;
   &lt;property name="unidata.dir" value="${basedir}/UNIDATA"/&gt;
   &lt;property name="hyph.stacksize" value="512k"/&gt;
+  &lt;property name="test.dir" value="${basedir}/test"/&gt;
   &lt;property name="build.dir" value="${basedir}/build"/&gt;
   &lt;property name="build.gensrc.dir" value="${build.dir}/gensrc"/&gt;
   &lt;property name="build.classes.dir" value="${build.dir}/classes"/&gt;
@@ -167,9 +171,11 @@
   &lt;property name="build.codegen-classes.dir" value="${build.dir}/codegen-classes"/&gt;
   &lt;property name="build.javadocs.dir" value="${build.dir}/javadocs"/&gt;
   &lt;property name="build.examples.dir" value="${build.dir}/examples"/&gt;
+  &lt;property name="build.tests.dir" value="${build.dir}/tests"/&gt;
   &lt;property name="build.viewer.resources.dir" value="${build.classes.dir}/org/apache/fop/render/awt/viewer/resources"/&gt;
   &lt;property name="build.viewer.images.dir" value="${build.classes.dir}/org/apache/fop/render/awt/viewer/images"/&gt;
   &lt;property name="build.property.examples.mime.type" value="application/pdf"/&gt;
+  &lt;property name="build.property.tests.mime.type" value="application/pdf"/&gt;
 &lt;!--property name="layoutengine.disabled" value="test/layoutengine/disabled-testcases.txt"/--&gt;
 &lt;!--property name="fotree.disabled" value="test/fotree/disabled-testcases.txt"/--&gt;
   &lt;property name="layoutengine.disabled" value="test/layoutengine/disabled-testcases.xml"/&gt;
@@ -755,7 +761,7 @@
     &lt;mkdir dir="${build.dir}/test-gensrc"/&gt;
     &lt;mkdir dir="${junit.reports.dir}"/&gt;
     &lt;javac destdir="${build.dir}/test-classes" fork="${javac.fork}" debug="${javac.debug}" deprecation="${javac.deprecation}" optimize="${javac.optimize}" source="${javac.source}" target="${javac.target}"&gt;
-      &lt;src path="${basedir}/test/java"/&gt;
+      &lt;src path="${test.dir}/java"/&gt;
       &lt;patternset refid="test-sources"/&gt;
       &lt;classpath&gt;
         &lt;path refid="libs-build-tools-classpath"/&gt;
@@ -765,19 +771,19 @@
       &lt;/classpath&gt;
     &lt;/javac&gt;
     &lt;copy todir="${build.dir}/test-classes"&gt;
-      &lt;fileset dir="${basedir}/test/java"&gt;
+      &lt;fileset dir="${test.dir}/java"&gt;
         &lt;include name="**/*.xsl"/&gt;
       &lt;/fileset&gt;
     &lt;/copy&gt;
   &lt;/target&gt;
   &lt;target name="junit-compile-copy-resources" if="junit.present"&gt;
     &lt;eventResourceGenerator modelfile="${build.dir}/test-gensrc/org/apache/fop/events/test-event-model.xml"&gt;
-      &lt;fileset dir="${basedir}/test/java"&gt;
+      &lt;fileset dir="${test.dir}/java"&gt;
         &lt;include name="**/*.java"/&gt;
       &lt;/fileset&gt;
     &lt;/eventResourceGenerator&gt;
     &lt;copy todir="${build.dir}/test-classes"&gt;
-      &lt;fileset dir="${basedir}/test/java"&gt;
+      &lt;fileset dir="${test.dir}/java"&gt;
         &lt;include name="META-INF/**"/&gt;
         &lt;include name="**/*.xml"/&gt;
       &lt;/fileset&gt;
@@ -1336,9 +1342,9 @@
     &lt;/jar&gt;
   &lt;/target&gt;
 &lt;!-- =================================================================== --&gt;
-&lt;!-- Generate example PDFs                                               --&gt;
+&lt;!-- Generate examples                                                   --&gt;
 &lt;!-- =================================================================== --&gt;
-  &lt;target name="examples" depends="package" description="Generates example PDF files"&gt;
+  &lt;target name="examples" depends="package" description="Generates the example files"&gt;
     &lt;taskdef name="fop" classname="org.apache.fop.tools.anttasks.Fop" classpathref="libs-run-classpath"/&gt;
     &lt;mkdir dir="${build.examples.dir}"/&gt;
     &lt;fop format="${build.property.examples.mime.type}" outdir="${build.examples.dir}" messagelevel="debug" basedir="${fo.examples.dir}" userconfig="${fo.examples.userconfig}" force="${fo.examples.force}"&gt;
@@ -1347,6 +1353,20 @@
       &lt;/fileset&gt;
     &lt;/fop&gt;
   &lt;/target&gt;
+
+&lt;!-- =================================================================== --&gt;
+&lt;!-- Generate unit tests                                                 --&gt;
+&lt;!-- =================================================================== --&gt;
+  &lt;target name="tests" depends="package" description="Generates the test files"&gt;
+    &lt;taskdef name="fop" classname="org.apache.fop.tools.anttasks.Fop" classpathref="libs-run-classpath"/&gt;
+    &lt;mkdir dir="${build.tests.dir}"/&gt;
+    &lt;fop format="${build.property.tests.mime.type}" xsltfile="${test.dir}/layoutengine/testcase2fo.xsl" outdir="${build.tests.dir}" messagelevel="debug" basedir="${test.dir}" userconfig="${fo.examples.userconfig}" force="${xml.tests.force}"&gt;
+      &lt;fileset dir="${test.dir}"&gt;
+        &lt;include name="${xml.tests.include}"/&gt;
+      &lt;/fileset&gt;
+    &lt;/fop&gt;
+  &lt;/target&gt;
+
 &lt;!-- =================================================================== --&gt;
 &lt;!-- Helper task to generate source files that have already been         --&gt;
 &lt;!-- checked into CVS.  For these files, CVS version is the official one --&gt;

Modified: xmlgraphics/fop/branches/Temp_Accessibility/lib/xmlgraphics-commons-1.4svn.jar
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_Accessibility/lib/xmlgraphics-commons-1.4svn.jar?rev=829138&amp;r1=829137&amp;r2=829138&amp;view=diff
==============================================================================
Binary files - no diff available.

Modified: xmlgraphics/fop/branches/Temp_Accessibility/src/documentation/content/xdocs/trunk/anttask.xml
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_Accessibility/src/documentation/content/xdocs/trunk/anttask.xml?rev=829138&amp;r1=829137&amp;r2=829138&amp;view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_Accessibility/src/documentation/content/xdocs/trunk/anttask.xml (original)
+++ xmlgraphics/fop/branches/Temp_Accessibility/src/documentation/content/xdocs/trunk/anttask.xml Fri Oct 23 17:27:14 2009
@@ -69,6 +69,16 @@
        &lt;td&gt;Yes, if no fileset nested element is used&lt;/td&gt; 
       &lt;/tr&gt; 
       &lt;tr&gt; 
+       &lt;td&gt;xmlfile&lt;/td&gt; 
+       &lt;td&gt;XML input file&lt;/td&gt; 
+       &lt;td&gt;Yes, if no fofile is specified&lt;/td&gt; 
+      &lt;/tr&gt; 
+      &lt;tr&gt; 
+       &lt;td&gt;xsltfile&lt;/td&gt; 
+       &lt;td&gt;XSLT input file&lt;/td&gt; 
+       &lt;td&gt;Yes, if no fofile is specified&lt;/td&gt; 
+      &lt;/tr&gt; 
+      &lt;tr&gt; 
        &lt;td&gt;outfile&lt;/td&gt; 
        &lt;td&gt;Output filename&lt;/td&gt; 
        &lt;td&gt;Yes, when fofile is used.  (This attribute is not valid for filesets.)&lt;/td&gt; 
@@ -196,6 +206,31 @@
    &lt;/fop&gt;
 &lt;/target&gt;
     ]]&gt;&lt;/source&gt;
+    &lt;p&gt;
+    The following example transforms and converts a single XML and XSLT file to an AFP document:
+    &lt;/p&gt;
+    &lt;source&gt;&lt;![CDATA[
+&lt;target name="generate-afp-from-transform" description="Generates a single AFP file from an XSLT stylesheet"&gt;
+   &lt;fop format="application/x-afp" 
+        xmlfile="c:\working\foDirectory\Document.xml"
+        xsltfile="c:\working\foDirectory\Document.xslt"
+        outfile="c:\working\afpDirectory\Document.afp" /&gt;
+&lt;/target&gt;
+    ]]&gt;&lt;/source&gt;
+    &lt;p&gt;
+    This example transforms and converts all XML files within an entire directory to PostScript:
+    &lt;/p&gt;
+    &lt;source&gt;&lt;![CDATA[
+&lt;target name="generate-multiple-ps-from-transform" description="Generates multiple PostScript files using an XSLT stylesheet"&gt;
+   &lt;fop format="application/postscript" 
+        xsltfile="c:\working\foDirectory\Document.xslt"
+        outdir="${build.dir}" messagelevel="debug"&gt;
+        &lt;fileset dir="${test.dir}"&gt;
+           &lt;include name="*.xml"/&gt;
+        &lt;/fileset&gt;
+   &lt;/fop&gt;
+&lt;/target&gt;
+    ]]&gt;&lt;/source&gt;
     &lt;/section&gt;
     &lt;/body&gt;
 &lt;/document&gt;

Propchange: xmlgraphics/fop/branches/Temp_Accessibility/src/java/META-INF/services/org.apache.fop.render.intermediate.IFDocumentHandler
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Oct 23 17:27:14 2009
@@ -1 +1 @@
-/xmlgraphics/fop/trunk/src/java/META-INF/services/org.apache.fop.render.intermediate.IFDocumentHandler:699793-824832
+/xmlgraphics/fop/trunk/src/java/META-INF/services/org.apache.fop.render.intermediate.IFDocumentHandler:699793-829121

Modified: xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/afp/AFPDataObjectFactory.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/afp/AFPDataObjectFactory.java?rev=829138&amp;r1=829137&amp;r2=829138&amp;view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/afp/AFPDataObjectFactory.java (original)
+++ xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/afp/AFPDataObjectFactory.java Fri Oct 23 17:27:14 2009
@@ -24,6 +24,7 @@
 import org.apache.xmlgraphics.image.codec.tiff.TIFFImage;
 import org.apache.xmlgraphics.java2d.Graphics2DImagePainter;
 
+import org.apache.fop.afp.ioca.IDEStructureParameter;
 import org.apache.fop.afp.ioca.ImageContent;
 import org.apache.fop.afp.modca.AbstractDataObject;
 import org.apache.fop.afp.modca.AbstractNamedAFPObject;
@@ -113,12 +114,35 @@
             }
         }
 
-        if (imageObjectInfo.isColor()) {
-            imageObj.setIDESize((byte) 24);
-        } else {
-            imageObj.setIDESize((byte) imageObjectInfo.getBitsPerPixel());
+        ImageContent content = imageObj.getImageSegment().getImageContent();
+        int bitsPerPixel = imageObjectInfo.getBitsPerPixel();
+        imageObj.setIDESize((byte) bitsPerPixel);
+        IDEStructureParameter ideStruct;
+        switch (bitsPerPixel) {
+        case 1:
+            //Skip IDE Structure Parameter
+            break;
+        case 4:
+        case 8:
+            ideStruct = content.needIDEStructureParameter();
+            ideStruct.setBitsPerComponent(new int[] {bitsPerPixel});
+            break;
+        case 24:
+            ideStruct = content.needIDEStructureParameter();
+            ideStruct.setDefaultRGBColorModel();
+            break;
+        case 32:
+            ideStruct = content.needIDEStructureParameter();
+            ideStruct.setDefaultCMYKColorModel();
+            break;
+        default:
+            throw new IllegalArgumentException("Unsupported number of bits per pixel: "
+                    + bitsPerPixel);
+        }
+        if (imageObjectInfo.isSubtractive()) {
+            ideStruct = content.needIDEStructureParameter();
+            ideStruct.setSubtractive(imageObjectInfo.isSubtractive());
         }
-        imageObj.setSubtractive(imageObjectInfo.isSubtractive());
 
         imageObj.setData(imageObjectInfo.getData());
 

Modified: xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/afp/AFPPaintingState.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/afp/AFPPaintingState.java?rev=829138&amp;r1=829137&amp;r2=829138&amp;view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/afp/AFPPaintingState.java (original)
+++ xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/afp/AFPPaintingState.java Fri Oct 23 17:27:14 2009
@@ -46,8 +46,10 @@
     /** color image support */
     private boolean colorImages = false;
 
-    /** images are supported in this AFP environment */
+    /** true if certain image formats may be embedded unchanged in their native format. */
     private boolean nativeImagesSupported = false;
+    /** true if CMYK images (requires IOCA FS45 suppport on the target platform) may be generated */
+    private boolean cmykImagesSupported;
 
     /** default value for image depth */
     private int bitsPerPixel = 8;
@@ -64,6 +66,7 @@
     /** a unit converter */
     private final transient AFPUnitConverter unitConv = new AFPUnitConverter(this);
 
+
     /**
      * Sets the rotation to be used for portrait pages, valid values are 0
      * (default), 90, 180, 270.
@@ -186,6 +189,24 @@
     }
 
     /**
+     * Controls whether CMYK images (IOCA FS45) are enabled. By default, support is disabled
+     * for wider compatibility. When disabled, any CMYK image is converted to the selected
+     * color format.
+     * @param value true to enabled CMYK images
+     */
+    public void setCMYKImagesSupported(boolean value) {
+        this.cmykImagesSupported = value;
+    }
+
+    /**
+     * Indicates whether CMYK images (IOCA FS45) are enabled.
+     * @return true if IOCA FS45 is enabled
+     */
+    public boolean isCMYKImagesSupported() {
+        return this.cmykImagesSupported;
+    }
+
+    /**
      * Sets the output/device resolution
      *
      * @param resolution

Modified: xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/afp/goca/GraphicsCharacterString.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/afp/goca/GraphicsCharacterString.java?rev=829138&amp;r1=829137&amp;r2=829138&amp;view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/afp/goca/GraphicsCharacterString.java (original)
+++ xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/afp/goca/GraphicsCharacterString.java Fri Oct 23 17:27:14 2009
@@ -45,7 +45,7 @@
      */
     public GraphicsCharacterString(String str, int x, int y) {
         super(x, y);
-        this.str = truncate(str);
+        this.str = truncate(str, MAX_STR_LEN);
     }
 
     /**
@@ -57,7 +57,7 @@
      */
     public GraphicsCharacterString(String str) {
         super(null);
-        this.str = truncate(str);
+        this.str = truncate(str, MAX_STR_LEN);
     }
 
     /** {@inheritDoc} */
@@ -83,20 +83,6 @@
     }
 
     /**
-     * Truncates the string as necessary
-     *
-     * @param str a character string
-     * @return a possibly truncated string
-     */
-    private String truncate(String str) {
-        if (str.length() &gt; MAX_STR_LEN) {
-            str = str.substring(0, MAX_STR_LEN);
-            log.warn("truncated character string, longer than " + MAX_STR_LEN + " chars");
-        }
-        return str;
-    }
-
-    /**
      * Returns the text string as an encoded byte array
      *
      * @return the text string as an encoded byte array

Modified: xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/afp/ioca/ImageContent.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/afp/ioca/ImageContent.java?rev=829138&amp;r1=829137&amp;r2=829138&amp;view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/afp/ioca/ImageContent.java (original)
+++ xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/afp/ioca/ImageContent.java Fri Oct 23 17:27:14 2009
@@ -56,21 +56,18 @@
     /** the image size parameter */
     private ImageSizeParameter imageSizeParameter = null;
 
+    /** the IDE Structure parameter */
+    private IDEStructureParameter ideStructureParameter = null;
+
     /** the image encoding */
     private byte encoding = (byte)0x03;
 
-    /** the image ide size */
-    private byte size = 1;
+    /** the image IDE (Image Data Element, Sample) size */
+    private byte ideSize = 1;
 
     /** the image compression */
     private byte compression = (byte)0xC0;
 
-    /** the image color model */
-    private byte colorModel = (byte)0x01;
-
-    /** additive/subtractive setting for ASFLAG */
-    private boolean subtractive = false;
-
     /** the image data */
     private byte[] data;
 
@@ -90,6 +87,34 @@
     }
 
     /**
+     * Sets the IDE Structure parameter.
+     * @param parameter the IDE Structure parameter
+     */
+    public void setIDEStructureParameter(IDEStructureParameter parameter) {
+        this.ideStructureParameter = parameter;
+    }
+
+    /**
+     * Returns the (optional) IDE Structure parameter
+     * @return the IDE Structure parameter or null if none is set
+     */
+    public IDEStructureParameter getIDEStructureParameter() {
+        return this.ideStructureParameter;
+    }
+
+    /**
+     * Returns the (optional) IDE Structure parameter. If none is set an instance is prepared
+     * with defaults for a bi-level image.
+     * @return the IDE Structure parameter
+     */
+    public IDEStructureParameter needIDEStructureParameter() {
+        if (this.ideStructureParameter == null) {
+            setIDEStructureParameter(new IDEStructureParameter());
+        }
+        return getIDEStructureParameter();
+    }
+
+    /**
      * Sets the image encoding.
      *
      * @param enc The image encoding.
@@ -113,24 +138,26 @@
      * @param s The IDE size.
      */
     public void setImageIDESize(byte s) {
-        this.size = s;
+        this.ideSize = s;
     }
 
     /**
      * Sets the image IDE color model.
      *
      * @param color    the IDE color model.
+     * @deprecated use {@link #setIDEStructureParameter(IDEStructureParameter)} instead
      */
     public void setImageIDEColorModel(byte color) {
-        this.colorModel = color;
+        needIDEStructureParameter().setColorModel(color);
     }
 
     /**
      * Set either additive or subtractive mode (used for ASFLAG).
      * @param subtractive true for subtractive mode, false for additive mode
+     * @deprecated use {@link #setIDEStructureParameter(IDEStructureParameter)} instead
      */
     public void setSubtractive(boolean subtractive) {
-        this.subtractive = subtractive;
+        needIDEStructureParameter().setSubtractive(subtractive);
     }
 
     /**
@@ -155,10 +182,12 @@
 
         os.write(getImageIDESizeParameter());
 
-        boolean useFS10 = (this.size == 1);
-        if (!useFS10) {
-            os.write(getIDEStructureParameter());
+        if (getIDEStructureParameter() != null) {
+            getIDEStructureParameter().writeToStream(os);
+        }
 
+        boolean useFS10 = (this.ideSize == 1);
+        if (!useFS10) {
             os.write(getExternalAlgorithmParameter());
         }
 
@@ -243,58 +272,15 @@
      * @return byte[] The data stream.
      */
     private byte[] getImageIDESizeParameter() {
-        if (size != 1) {
+        if (ideSize != 1) {
             final byte[] ideSizeData = new byte[] {
                     (byte)0x96, // ID
                     0x01, // Length
-                    size};
+                    ideSize};
             return ideSizeData;
         } else {
             return new byte[0];
         }
     }
 
-    /**
-     * Helper method to return the external algorithm parameter.
-     *
-     * @return byte[] The data stream.
-     */
-    private byte[] getIDEStructureParameter() {
-        byte flags = 0x00;
-        if (subtractive) {
-            flags |= 1 &lt;&lt; 7;
-        }
-        if (colorModel != 0 &amp;&amp; size == 24) {
-            final byte bits = (byte)(size / 3);
-            final byte[] ideStructData = new byte[] {
-                (byte)0x9B, // ID
-                0x00, // Length
-                flags, // FLAGS
-                colorModel, // COLOR MODEL
-                0x00, // Reserved
-                0x00, // Reserved
-                0x00, // Reserved
-                bits,
-                bits,
-                bits,
-            };
-            ideStructData[1] = (byte)(ideStructData.length - 2);
-            return ideStructData;
-        } else if (size == 1) {
-            final byte[] ideStructData = new byte[] {
-                    (byte)0x9B, // ID
-                    0x00, // Length
-                    flags, // FLAGS
-                    colorModel, // COLOR MODEL
-                    0x00, // Reserved
-                    0x00, // Reserved
-                    0x00, // Reserved
-                    0x01
-                };
-                ideStructData[1] = (byte)(ideStructData.length - 2);
-                return ideStructData;
-        }
-        return new byte[0];
-    }
-
 }

Modified: xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/afp/ioca/ImageSegment.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/afp/ioca/ImageSegment.java?rev=829138&amp;r1=829137&amp;r2=829138&amp;view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/afp/ioca/ImageSegment.java (original)
+++ xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/afp/ioca/ImageSegment.java Fri Oct 23 17:27:14 2009
@@ -56,7 +56,11 @@
         this.factory = factory;
     }
 
-    private ImageContent getImageContent() {
+    /**
+     * Returns the image content object associated with this image segment.
+     * @return the image content
+     */
+    public ImageContent getImageContent() {
         if (imageContent == null) {
             this.imageContent = factory.createImageContent();
         }
@@ -108,6 +112,7 @@
      * Sets the image IDE color model.
      *
      * @param colorModel the IDE color model.
+     * @deprecated Use {@link IDEStructureParameter#setColorModel(byte)} instead.
      */
     public void setIDEColorModel(byte colorModel) {
         getImageContent().setImageIDEColorModel(colorModel);
@@ -116,6 +121,7 @@
     /**
      * Set either additive or subtractive mode (used for ASFLAG).
      * @param subtractive true for subtractive mode, false for additive mode
+     * @deprecated Use {@link IDEStructureParameter#setSubtractive(boolean)} instead.
      */
     public void setSubtractive(boolean subtractive) {
         getImageContent().setSubtractive(subtractive);
@@ -124,7 +130,7 @@
     /**
      * Set the data image data.
      *
-     * @param data the image data
+     * @param imageData the image data
      */
     public void setData(byte[] imageData) {
         getImageContent().setImageData(imageData);

Modified: xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/afp/modca/AbstractAFPObject.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/afp/modca/AbstractAFPObject.java?rev=829138&amp;r1=829137&amp;r2=829138&amp;view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/afp/modca/AbstractAFPObject.java (original)
+++ xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/afp/modca/AbstractAFPObject.java Fri Oct 23 17:27:14 2009
@@ -43,7 +43,7 @@
     /** the structured field class id */
     protected static final byte SF_CLASS = (byte)0xD3;
 
-    private static final byte[] SF_HEADER = new byte[] {
+    protected static final byte[] SF_HEADER = new byte[] {
         0x5A, // Structured field identifier
         0x00, // Length byte 1
         0x10, // Length byte 2
@@ -177,6 +177,21 @@
         }
     }
 
+    /**
+     * Truncates the string as necessary
+     *
+     * @param str a character string
+     * @param maxLength the maximum length allowed for the string
+     * @return a possibly truncated string
+     */
+    protected String truncate(String str, int maxLength) {
+        if (str.length() &gt; maxLength) {
+            str = str.substring(0, maxLength);
+            log.warn("truncated character string '" + str + "', longer than " + maxLength + " chars");
+        }
+        return str;
+    }
+
     /** structured field type codes */
     public interface Type {
 

Modified: xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/afp/modca/AbstractTripletStructuredObject.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/afp/modca/AbstractTripletStructuredObject.java?rev=829138&amp;r1=829137&amp;r2=829138&amp;view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/afp/modca/AbstractTripletStructuredObject.java (original)
+++ xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/afp/modca/AbstractTripletStructuredObject.java Fri Oct 23 17:27:14 2009
@@ -27,9 +27,12 @@
 
 import org.apache.fop.afp.modca.Registry.ObjectType;
 import org.apache.fop.afp.modca.triplets.AbstractTriplet;
+import org.apache.fop.afp.modca.triplets.AttributeQualifierTriplet;
+import org.apache.fop.afp.modca.triplets.AttributeValueTriplet;
 import org.apache.fop.afp.modca.triplets.CommentTriplet;
 import org.apache.fop.afp.modca.triplets.FullyQualifiedNameTriplet;
 import org.apache.fop.afp.modca.triplets.ObjectClassificationTriplet;
+import org.apache.fop.afp.modca.triplets.Triplet;
 
 /**
  * A MODCA structured object base class providing support for Triplets
@@ -37,7 +40,7 @@
 public class AbstractTripletStructuredObject extends AbstractStructuredObject {
 
     /** list of object triplets */
-    protected List/*&lt;AbstractTriplet&gt;*/ triplets = new java.util.ArrayList/*&lt;AbstractTriplet&gt;*/();
+    protected List/*&lt;Triplet&gt;*/ triplets = new java.util.ArrayList/*&lt;Triplet&gt;*/();
 
     /**
      * Returns the triplet data length
@@ -109,7 +112,7 @@
      *
      * @param triplet the triplet to add
      */
-    protected void addTriplet(AbstractTriplet triplet) {
+    protected void addTriplet(Triplet triplet) {
         triplets.add(triplet);
     }
 
@@ -130,7 +133,7 @@
     }
 
     /**
-     * Sets the fully qualified name of this resource
+     * Sets the fully qualified name of this structured field
      *
      * @param fqnType the fully qualified name type of this resource
      * @param fqnFormat the fully qualified name format of this resource

Modified: xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/afp/modca/ContainerDataDescriptor.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/afp/modca/ContainerDataDescriptor.java?rev=829138&amp;r1=829137&amp;r2=829138&amp;view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/afp/modca/ContainerDataDescriptor.java (original)
+++ xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/afp/modca/ContainerDataDescriptor.java Fri Oct 23 17:27:14 2009
@@ -79,6 +79,8 @@
         data[18] = ysize[0];
         data[19] = ysize[1];
         data[20] = ysize[2];
+
+        os.write(data);
     }
 
 }

Modified: xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/afp/modca/ImageDataDescriptor.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/afp/modca/ImageDataDescriptor.java?rev=829138&amp;r1=829137&amp;r2=829138&amp;view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/afp/modca/ImageDataDescriptor.java (original)
+++ xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/afp/modca/ImageDataDescriptor.java Fri Oct 23 17:27:14 2009
@@ -31,6 +31,7 @@
 
     public static final byte FUNCTION_SET_FS10 = 0x0A;
     public static final byte FUNCTION_SET_FS11 = 0x0B;
+    public static final byte FUNCTION_SET_FS45 = 45;
 
     private byte functionSet = FUNCTION_SET_FS11; // FCNSET = IOCA FS 11
 

Modified: xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/afp/modca/ImageObject.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/afp/modca/ImageObject.java?rev=829138&amp;r1=829137&amp;r2=829138&amp;view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/afp/modca/ImageObject.java (original)
+++ xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/afp/modca/ImageObject.java Fri Oct 23 17:27:14 2009
@@ -24,9 +24,12 @@
 
 import org.apache.commons.io.output.ByteArrayOutputStream;
 
+import org.apache.xmlgraphics.util.MimeConstants;
+
 import org.apache.fop.afp.AFPDataObjectInfo;
 import org.apache.fop.afp.AFPImageObjectInfo;
 import org.apache.fop.afp.Factory;
+import org.apache.fop.afp.ioca.IDEStructureParameter;
 import org.apache.fop.afp.ioca.ImageSegment;
 
 /**
@@ -50,7 +53,11 @@
         super(factory, name);
     }
 
-    private ImageSegment getImageSegment() {
+    /**
+     * Returns the image segment object associated with this image object.
+     * @return the image segment
+     */
+    public ImageSegment getImageSegment() {
         if (imageSegment == null) {
             this.imageSegment = factory.createImageSegment();
         }
@@ -71,6 +78,8 @@
             = factory.createImageDataDescriptor(dataWidth, dataHeight, dataWidthRes, dataHeightRes);
         if (imageObjectInfo.getBitsPerPixel() == 1) {
             imageDataDescriptor.setFunctionSet(ImageDataDescriptor.FUNCTION_SET_FS10);
+        } else if (MimeConstants.MIME_AFP_IOCA_FS45.equals(imageObjectInfo.getMimeType())) {
+            imageDataDescriptor.setFunctionSet(ImageDataDescriptor.FUNCTION_SET_FS45);
         }
         getObjectEnvironmentGroup().setDataDescriptor(imageDataDescriptor);
         getObjectEnvironmentGroup().setMapImageObject(
@@ -110,6 +119,7 @@
      * Sets the image IDE color model.
      *
      * @param colorModel    the IDE color model.
+     * @deprecated Use {@link IDEStructureParameter#setColorModel(byte)} instead.
      */
     public void setIDEColorModel(byte colorModel) {
         getImageSegment().setIDEColorModel(colorModel);
@@ -118,6 +128,7 @@
     /**
      * Set either additive or subtractive mode (used for ASFLAG).
      * @param subtractive true for subtractive mode, false for additive mode
+     * @deprecated Use {@link IDEStructureParameter#setSubtractive(boolean)} instead.
      */
     public void setSubtractive(boolean subtractive) {
         getImageSegment().setSubtractive(subtractive);

Modified: xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/afp/modca/TagLogicalElement.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/afp/modca/TagLogicalElement.java?rev=829138&amp;r1=829137&amp;r2=829138&amp;view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/afp/modca/TagLogicalElement.java (original)
+++ xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/afp/modca/TagLogicalElement.java Fri Oct 23 17:27:14 2009
@@ -21,9 +21,10 @@
 
 import java.io.IOException;
 import java.io.OutputStream;
-import java.io.UnsupportedEncodingException;
 
-import org.apache.fop.afp.AFPConstants;
+import org.apache.fop.afp.modca.triplets.AttributeQualifierTriplet;
+import org.apache.fop.afp.modca.triplets.AttributeValueTriplet;
+import org.apache.fop.afp.modca.triplets.FullyQualifiedNameTriplet;
 import org.apache.fop.afp.util.BinaryUtils;
 
 /**
@@ -45,7 +46,7 @@
  * effect on the appearance of a document when it is presented.
  * &lt;p/&gt;
  */
-public class TagLogicalElement extends AbstractAFPObject {
+public class TagLogicalElement extends AbstractTripletStructuredObject {
 
     /**
      * Name of the key, used within the TLE
@@ -75,77 +76,43 @@
         this.tleID = tleID;
     }
 
-    /** {@inheritDoc} */
-    public void writeToStream(OutputStream os) throws IOException {
+    /**
+     * Sets the attribute value of this structured field
+     *
+     * @param value the attribute value
+     */
+    public void setAttributeValue(String value) {
+        addTriplet(new AttributeValueTriplet(value));
+    }
 
-        // convert name and value to ebcdic
-        byte[] tleByteName = null;
-        byte[] tleByteValue = null;
-        try {
-            tleByteName = name.getBytes(AFPConstants.EBCIDIC_ENCODING);
-            tleByteValue = value.getBytes(AFPConstants.EBCIDIC_ENCODING);
-        } catch (UnsupportedEncodingException usee) {
-            tleByteName = name.getBytes();
-            tleByteValue = value.getBytes();
-            log.warn(
-                "Constructor:: UnsupportedEncodingException translating the name "
-                + name);
-        }
-
-        byte[] data = new byte[27 + tleByteName.length + tleByteValue.length];
-
-        data[0] = 0x5A;
-        // Set the total record length
-        byte[] rl1
-            = BinaryUtils.convert(26 + tleByteName.length + tleByteValue.length, 2);
-        //Ignore first byte
-        data[1] = rl1[0];
-        data[2] = rl1[1];
-
-        // Structured field ID for a TLE
-        data[3] = (byte) 0xD3;
-        data[4] = (byte) Type.ATTRIBUTE;
-        data[5] = (byte) Category.PROCESS_ELEMENT;
-
-        data[6] = 0x00; // Reserved
-        data[7] = 0x00; // Reserved
-        data[8] = 0x00; // Reserved
-
-        //Use 2 triplets, attribute name and value (the key for indexing)
-
-        byte[] rl2 = BinaryUtils.convert(tleByteName.length + 4, 1);
-        data[9] = rl2[0]; // length of the triplet, including this field
-        data[10] = 0x02; //Identifies it as a FQN triplet
-        data[11] = 0x0B; // GID format
-        data[12] = 0x00;
-
-        // write out TLE name
-        int pos = 13;
-        for (int i = 0; i &lt; tleByteName.length; i++) {
-            data[pos++] = tleByteName[i];
-        }
-
-        byte[] rl3 = BinaryUtils.convert(tleByteValue.length + 4, 1);
-        data[pos++] = rl3[0]; // length of the triplet, including this field
-        data[pos++] = 0x36; //Identifies the triplet, attribute value
-        data[pos++] = 0x00; // Reserved
-        data[pos++] = 0x00; // Reserved
-
-        for (int i = 0; i &lt; tleByteValue.length; i++) {
-            data[pos++] = tleByteValue[i];
-        }
-        // attribute qualifier
-        data[pos++] = 0x0A;
-        data[pos++] = (byte)0x80;
-        byte[] id = BinaryUtils.convert(tleID, 4);
-        for (int i = 0; i &lt; id.length; i++) {
-            data[pos++] = id[i];
-        }
-        byte[] level = BinaryUtils.convert(1, 4);
-        for (int i = 0; i &lt; level.length; i++) {
-            data[pos++] = level[i];
-        }
+    /**
+     * Sets the attribute qualifier of this structured field
+     *
+     * @param seqNumber the attribute sequence number
+     * @param levNumber the attribute level number
+     */
+    public void setAttributeQualifier(int seqNumber, int levNumber) {
+        addTriplet(new AttributeQualifierTriplet(seqNumber, levNumber));
+    }
 
+    /** {@inheritDoc} */
+    public void writeToStream(OutputStream os) throws IOException {
+        setFullyQualifiedName(
+                FullyQualifiedNameTriplet.TYPE_ATTRIBUTE_GID,
+                FullyQualifiedNameTriplet.FORMAT_CHARSTR,
+                name);
+        setAttributeQualifier(tleID, 1);
+        setAttributeValue(value);
+        
+        byte[] data = new byte[SF_HEADER.length];
+        copySF(data, Type.ATTRIBUTE, Category.PROCESS_ELEMENT);
+        
+        int tripletDataLength = getTripletDataLength();
+        byte[] l = BinaryUtils.convert(data.length + tripletDataLength - 1, 2);
+        data[1] = l[0];
+        data[2] = l[1];
         os.write(data);
+
+        writeTriplets(os);
     }
 }

Modified: xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/afp/modca/triplets/AbstractTriplet.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/afp/modca/triplets/AbstractTriplet.java?rev=829138&amp;r1=829137&amp;r2=829138&amp;view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/afp/modca/triplets/AbstractTriplet.java (original)
+++ xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/afp/modca/triplets/AbstractTriplet.java Fri Oct 23 17:27:14 2009
@@ -19,70 +19,12 @@
 
 package org.apache.fop.afp.modca.triplets;
 
-import org.apache.fop.afp.Streamable;
-import org.apache.fop.afp.StructuredData;
+import org.apache.fop.afp.modca.AbstractAFPObject;
 
 /**
  * A simple implementation of a MOD:CA triplet
  */
-public abstract class AbstractTriplet implements Streamable, StructuredData {
-    public static final byte CODED_GRAPHIC_CHARACTER_SET_GLOBAL_IDENTIFIER = 0x01;
-
-    /** Triplet identifiers */
-    public static final byte FULLY_QUALIFIED_NAME = 0x02;
-    public static final byte MAPPING_OPTION = 0x04;
-    public static final byte OBJECT_CLASSIFICATION = 0x10;
-    public static final byte MODCA_INTERCHANGE_SET = 0x18;
-    public static final byte FONT_DESCRIPTOR_SPECIFICATION = 0x1F;
-    public static final byte OBJECT_FUNCTION_SET_SPECIFICATION = 0x21;
-    public static final byte EXTENDED_RESOURCE_LOCAL_IDENTIFIER = 0x22;
-    public static final byte RESOURCE_LOCAL_IDENTIFIER = 0x24;
-    public static final byte RESOURCE_SECTION_NUMBER = 0x25;
-    public static final byte CHARACTER_ROTATION = 0x26;
-    public static final byte OBJECT_BYTE_OFFSET = 0x2D;
-    public static final byte ATTRIBUTE_VALUE = 0x36;
-    public static final byte DESCRIPTOR_POSITION = 0x43;
-    public static final byte MEDIA_EJECT_CONTROL = 0x45;
-    public static final byte PAGE_OVERLAY_CONDITIONAL_PROCESSING = 0x46;
-    public static final byte RESOURCE_USAGE_ATTRIBUTE = 0x47;
-    public static final byte MEASUREMENT_UNITS = 0x4B;
-    public static final byte OBJECT_AREA_SIZE = 0x4C;
-    public static final byte AREA_DEFINITION = 0x4D;
-    public static final byte COLOR_SPECIFICATION = 0x4E;
-    public static final byte ENCODING_SCHEME_ID = 0x50;
-    public static final byte MEDIUM_MAP_PAGE_NUMBER = 0x56;
-    public static final byte OBJECT_BYTE_EXTENT = 0x57;
-    public static final byte OBJECT_STRUCTURED_FIELD_OFFSET = 0x58;
-    public static final byte OBJECT_STRUCTURED_FIELD_EXTENT = 0x59;
-    public static final byte OBJECT_OFFSET = 0x5A;
-    public static final byte FONT_HORIZONTAL_SCALE_FACTOR = 0x5D;
-    public static final byte OBJECT_COUNT = 0x5E;
-    public static final byte OBJECT_DATE_AND_TIMESTAMP = 0x62;
-    public static final byte COMMENT = 0x65;
-    public static final byte MEDIUM_ORIENTATION = 0x68;
-    public static final byte RESOURCE_OBJECT_INCLUDE = 0x6C;
-    public static final byte PRESENTATION_SPACE_RESET_MIXING = 0x70;
-    public static final byte PRESENTATION_SPACE_MIXING_RULE = 0x71;
-    public static final byte UNIVERSAL_DATE_AND_TIMESTAMP = 0x72;
-    public static final byte TONER_SAVER = 0x74;
-    public static final byte COLOR_FIDELITY = 0x75;
-    public static final byte FONT_FIDELITY = 0x78;
-    public static final byte ATTRIBUTE_QUALIFIER = (byte)0x80;
-    public static final byte PAGE_POSITION_INFORMATION = (byte)0x81;
-    public static final byte PARAMETER_VALUE = (byte)0x82;
-    public static final byte PRESENTATION_CONTROL = (byte)0x83;
-    public static final byte FONT_RESOLUTION_AND_METRIC_TECHNOLOGY = (byte)0x84;
-    public static final byte FINISHING_OPERATION = (byte)0x85;
-    public static final byte TEXT_FIDELITY = (byte)0x86;
-    public static final byte MEDIA_FIDELITY = (byte)0x87;
-    public static final byte FINISHING_FIDELITY = (byte)0x88;
-    public static final byte DATA_OBJECT_FONT_DESCRIPTOR = (byte)0x8B;
-    public static final byte LOCALE_SELECTOR = (byte)0x8C;
-    public static final byte UP3I_FINISHING_OPERATION = (byte)0x8E;
-    public static final byte COLOR_MANAGEMENT_RESOURCE_DESCRIPTOR = (byte)0x91;
-    public static final byte RENDERING_INTENT = (byte)0x95;
-    public static final byte CMR_TAG_FIDELITY = (byte)0x96;
-    public static final byte DEVICE_APPEARANCE = (byte)0x97;
+public abstract class AbstractTriplet extends AbstractAFPObject implements Triplet {
 
     /** the triplet identifier */
     protected final byte id;

Modified: xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/cli/CommandLineOptions.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/cli/CommandLineOptions.java?rev=829138&amp;r1=829137&amp;r2=829138&amp;view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/cli/CommandLineOptions.java (original)
+++ xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/cli/CommandLineOptions.java Fri Oct 23 17:27:14 2009
@@ -109,6 +109,8 @@
     private boolean useStdIn = false;
     /* true if System.out (stdout) should be used for the output file */
     private boolean useStdOut = false;
+    /* true if a catalog resolver should be used for entity and uri resolution */ 
+    private boolean useCatalogResolver = false;
     /* rendering options (for the user agent) */
     private Map renderingOptions = new java.util.HashMap();
     /* target resolution (for the user agent) */
@@ -354,6 +356,8 @@
                   } else {
                       throw new FOPException("invalid param usage: use -param &lt;name&gt; &lt;value&gt;");
                   }
+            } else if (args[i].equals("-catalog")) {
+                useCatalogResolver = true;
             } else if (args[i].equals("-o")) {
                 i = i + parsePDFOwnerPassword(args, i);
             } else if (args[i].equals("-u")) {
@@ -1024,7 +1028,7 @@
             case IF_INPUT:
                 return new IFInputHandler(iffile);
             case XSLT_INPUT:
-                return new InputHandler(xmlfile, xsltfile, xsltParams);
+                return new InputHandler(xmlfile, xsltfile, xsltParams, useCatalogResolver);
             case IMAGE_INPUT:
                 return new ImageInputHandler(imagefile, xsltfile, xsltParams);
             default:
@@ -1166,6 +1170,7 @@
             + "  -xsl stylesheet   xslt stylesheet \n \n"
             + "  -param name value &lt;value&gt; to use for parameter &lt;name&gt; in xslt stylesheet\n"
             + "                    (repeat '-param name value' for each parameter)\n \n"
+            + "  -catalog          use catalog resolver for input XML and XSLT files\n"
             + " [OUTPUT] \n"
             + "  outfile           input will be rendered as PDF into outfile\n"
             + "                    (use '-' for outfile to pipe output to stdout)\n"

Modified: xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/cli/InputHandler.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/cli/InputHandler.java?rev=829138&amp;r1=829137&amp;r2=829138&amp;view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/cli/InputHandler.java (original)
+++ xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/cli/InputHandler.java Fri Oct 23 17:27:14 2009
@@ -19,7 +19,6 @@
 
 package org.apache.fop.cli;
 
-// Imported java.io classes
 import java.io.File;
 import java.io.FileNotFoundException;
 import java.io.InputStream;
@@ -34,11 +33,13 @@
 import javax.xml.transform.Transformer;
 import javax.xml.transform.TransformerException;
 import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.URIResolver;
 import javax.xml.transform.sax.SAXResult;
 import javax.xml.transform.sax.SAXSource;
 import javax.xml.transform.stream.StreamResult;
 import javax.xml.transform.stream.StreamSource;
 
+import org.xml.sax.EntityResolver;
 import org.xml.sax.InputSource;
 import org.xml.sax.SAXException;
 import org.xml.sax.XMLReader;
@@ -51,27 +52,27 @@
 import org.apache.fop.apps.Fop;
 import org.apache.fop.apps.FopFactory;
 import org.apache.fop.render.awt.viewer.Renderable;
-import org.xml.sax.InputSource;
-import org.xml.sax.SAXException;
-import org.xml.sax.XMLReader;
 
 /**
  * Class for handling files input from command line
  * either with XML and XSLT files (and optionally xsl
- * parameters) or FO File input alone
+ * parameters) or FO File input alone.
  */
 public class InputHandler implements ErrorListener, Renderable {
 
     /** original source file */
-    protected File sourcefile = null;
-    private File stylesheet = null;  // for XML/XSLT usage
-    private Vector xsltParams = null; // for XML/XSLT usage
+    protected File sourcefile;
+    private File stylesheet;  // for XML/XSLT usage
+    private Vector xsltParams; // for XML/XSLT usage
+    private EntityResolver entityResolver;
+    private URIResolver uriResolver;
 
     /** the logger */
     protected Log log = LogFactory.getLog(InputHandler.class);
 
     /**
      * Constructor for XML-&gt;XSLT-&gt;FO input
+     *
      * @param xmlfile XML file
      * @param xsltfile XSLT file
      * @param params Vector of command-line parameters (name, value,
@@ -84,6 +85,23 @@
     }
 
     /**
+     * Constructor for XML-&gt;XSLT-&gt;FO input
+     *
+     * @param xmlfile XML file
+     * @param xsltfile XSLT file
+     * @param params Vector of command-line parameters (name, value,
+     *      name, value, ...) for XSL stylesheet, null if none
+     * @param useCatalogResolver if true, use a catalog resolver
+     *      for XML parsing and XSLT URI resolution
+     */
+    public InputHandler(File xmlfile, File xsltfile, Vector params, boolean useCatalogResolver) {
+        this(xmlfile, xsltfile, params);
+        if (useCatalogResolver) {
+            createCatalogResolver();
+        }
+    }
+
+    /**
      * Constructor for FO input
      * @param fofile the file to read the FO document.
      */
@@ -151,7 +169,7 @@
      * @return the Source for the main input file
      */
     protected Source createMainSource() {
-        Source result;
+        Source source;
         InputStream in;
         String uri;
         if (this.sourcefile != null) {
@@ -169,37 +187,91 @@
         try {
             InputSource is = new InputSource(in);
             is.setSystemId(uri);
-            SAXParserFactory spf = SAXParserFactory.newInstance();
-            spf.setFeature("http://xml.org/sax/features/namespaces", true);
-            spf.setFeature("http://apache.org/xml/features/xinclude", true);
-            XMLReader xr = spf.newSAXParser().getXMLReader();
-            result = new SAXSource(xr, is);
+            XMLReader xr = getXMLReader();
+            if (entityResolver != null) {
+                xr.setEntityResolver(entityResolver);
+            }
+            source = new SAXSource(xr, is);
         } catch (SAXException e) {
             if (this.sourcefile != null) {
-                result = new StreamSource(this.sourcefile);
+                source = new StreamSource(this.sourcefile);
             } else {
-                result = new StreamSource(in, uri);
+                source = new StreamSource(in, uri);
             }
         } catch (ParserConfigurationException e) {
             if (this.sourcefile != null) {
-                result = new StreamSource(this.sourcefile);
+                source = new StreamSource(this.sourcefile);
             } else {
-                result = new StreamSource(in, uri);
+                source = new StreamSource(in, uri);
+            }
+        }
+        return source;
+    }
+
+    /**
+     * Creates a catalog resolver and uses it for XML parsing and XSLT URI resolution.
+     * Tries the Apache Commons Resolver, and if unsuccessful,
+     * tries the same built into Java 6.
+     */
+    private void createCatalogResolver() {
+        String[] classNames = new String[] {
+                "org.apache.xml.resolver.tools.CatalogResolver",
+                "com.sun.org.apache.xml.internal.resolver.tools.CatalogResolver"};
+        Class resolverClass = null;
+        for (int i = 0; i &lt; classNames.length &amp;&amp; resolverClass == null; ++i) {
+            try {
+                resolverClass = Class.forName(classNames[i]);
+            } catch (ClassNotFoundException e) {
+                // No worries
             }
         }
-        return result;
+        if (resolverClass == null) {
+            log.error("Could not find catalog resolver in class path");
+            return;
+        }
+        try {
+            entityResolver = (EntityResolver) resolverClass.newInstance();
+            uriResolver = (URIResolver) resolverClass.newInstance();
+        } catch (InstantiationException e) {
+            log.error("Error creating the catalog resolver: " + e.getMessage());
+        } catch (IllegalAccessException e) {
+            log.error("Error creating the catalog resolver: " + e.getMessage());
+        }
     }
 
     /**
      * Creates a Source for the selected stylesheet.
+     *
      * @return the Source for the selected stylesheet or null if there's no stylesheet
      */
     protected Source createXSLTSource() {
+        Source xslt = null;
         if (this.stylesheet != null) {
-            return new StreamSource(this.stylesheet);
-        } else {
-            return null;
+            if (entityResolver != null) {
+                try {
+                    InputSource is = new InputSource(this.stylesheet.getPath());
+                    XMLReader xr = getXMLReader();
+                    xr.setEntityResolver(entityResolver);
+                    xslt = new SAXSource(xr, is);
+                } catch (SAXException e) {
+                    // return StreamSource
+                } catch (ParserConfigurationException e) {
+                    // return StreamSource
+                }
+            }
+            if (xslt == null) {
+                xslt = new StreamSource(this.stylesheet);
+            }
         }
+        return xslt;
+    }
+
+    private XMLReader getXMLReader() throws ParserConfigurationException, SAXException {
+        SAXParserFactory spf = SAXParserFactory.newInstance();
+        spf.setFeature("http://xml.org/sax/features/namespaces", true);
+        spf.setFeature("http://apache.org/xml/features/xinclude", true);
+        XMLReader xr = spf.newSAXParser().getXMLReader();
+        return xr;
     }
 
     /**
@@ -226,6 +298,9 @@
                             (String) xsltParams.elementAt(i + 1));
                     }
                 }
+                if (uriResolver != null) {
+                    transformer.setURIResolver(uriResolver);
+                }
             }
             transformer.setErrorListener(this);
 

Modified: xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/fo/FObj.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/fo/FObj.java?rev=829138&amp;r1=829137&amp;r2=829138&amp;view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/fo/FObj.java (original)
+++ xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/fo/FObj.java Fri Oct 23 17:27:14 2009
@@ -56,7 +56,7 @@
     private List/*&lt;ExtensionAttachment&gt;*/ extensionAttachments = null;
 
     /** The map of foreign attributes, null if none */
-    private Map foreignAttributes = null;
+    private Map/*&lt;QName,String&gt;*/ foreignAttributes = null;
 
     /** Used to indicate if this FO is either an Out Of Line FO (see rec)
      *  or a descendant of one. Used during FO validation.
@@ -591,7 +591,7 @@
             throw new NullPointerException("Parameter attributeName must not be null");
         }
         if (foreignAttributes == null) {
-            foreignAttributes = new java.util.HashMap();
+            foreignAttributes = new java.util.HashMap/*&lt;QName,String&gt;*/();
         }
         foreignAttributes.put(attributeName, value);
     }

Modified: xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/fonts/CIDSubset.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/fonts/CIDSubset.java?rev=829138&amp;r1=829137&amp;r2=829138&amp;view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/fonts/CIDSubset.java (original)
+++ xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/fonts/CIDSubset.java Fri Oct 23 17:27:14 2009
@@ -161,12 +161,12 @@
     }
 
     /**
-     * Returns a BitSet with bits set for each available glyph index.
+     * Returns a BitSet with bits set for each available glyph index in the subset.
      * @return a BitSet indicating available glyph indices
      */
     public BitSet getGlyphIndexBitSet() {
         BitSet bitset = new BitSet();
-        Iterator iter = usedGlyphs.keySet().iterator();
+        Iterator iter = usedGlyphsIndex.keySet().iterator();
         while (iter.hasNext()) {
             Integer cid = (Integer)iter.next();
             bitset.set(cid.intValue());

Modified: xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/fonts/Font.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/fonts/Font.java?rev=829138&amp;r1=829137&amp;r2=829138&amp;view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/fonts/Font.java (original)
+++ xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/fonts/Font.java Fri Oct 23 17:27:14 2009
@@ -170,6 +170,9 @@
 
     /**
      * Returns the amount of kerning between two characters.
+     *
+     * The value returned measures in pt. So it is already adjusted for font size.
+     *
      * @param ch1 first character
      * @param ch2 second character
      * @return the distance to adjust for kerning, 0 if there's no kerning
@@ -179,7 +182,7 @@
         if (kernPair != null) {
             Integer width = (Integer)kernPair.get(new Integer(ch2));
             if (width != null) {
-                return width.intValue();
+                return width.intValue() * getFontSize() / 1000;
             }
         }
         return 0;

Modified: xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/layoutmgr/AbstractBreaker.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/layoutmgr/AbstractBreaker.java?rev=829138&amp;r1=829137&amp;r2=829138&amp;view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/layoutmgr/AbstractBreaker.java (original)
+++ xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/layoutmgr/AbstractBreaker.java Fri Oct 23 17:27:14 2009
@@ -367,7 +367,7 @@
                 alg.setConstantLineWidth(flowBPD);
                 int optimalPageCount = alg.findBreakingPoints(effectiveList, 1, true,
                         BreakingAlgorithm.ALL_BREAKS);
-                if (alg.ipdChanged()) {
+                if (alg.getIPDdifference() != 0) {
                     KnuthNode optimalBreak = alg.getBestNodeBeforeIPDChange();
                     int positionIndex = optimalBreak.position;
                     KnuthElement elementAtBreak = alg.getElement(positionIndex);
@@ -381,14 +381,19 @@
                     LayoutManager restartAtLM = null;
                     List firstElements = Collections.EMPTY_LIST;
                     if (containsNonRestartableLM(positionAtBreak)) {
+                        if (alg.getIPDdifference() &gt; 0) {
+                            log.warn("Content that cannot handle IPD changes is flowing to a"
+                                    + " narrower page. Part of it may be clipped"
+                                    + " by the page border.");
+                        }
                         firstElements = new LinkedList();
                         boolean boxFound = false;
-                        Iterator iter = effectiveList.listIterator(++positionIndex);
+                        Iterator iter = effectiveList.listIterator(positionIndex + 1);
                         Position position = null;
                         while (iter.hasNext()
                                 &amp;&amp; (position == null || containsNonRestartableLM(position))) {
-                            KnuthElement element = (KnuthElement) iter.next();
                             positionIndex++;
+                            KnuthElement element = (KnuthElement) iter.next();
                             position = element.getPosition();
                             if (element.isBox()) {
                                 boxFound = true;
@@ -400,9 +405,11 @@
                         if (position instanceof SpaceResolver.SpaceHandlingBreakPosition) {
                             /* Retrieve the original position wrapped into this space position */
                             positionAtBreak = position.getPosition();
+                        } else {
+                            positionAtBreak = null;
                         }
                     }
-                    if (positionAtBreak.getIndex() == -1) {
+                    if (positionAtBreak != null &amp;&amp; positionAtBreak.getIndex() == -1) {
                         /*
                          * This is an indication that we are between two blocks
                          * (possibly surrounded by another block), not inside a
@@ -588,7 +595,7 @@
                             .listIterator(startElementIndex);
                     while (effectiveListIterator.nextIndex() &lt;= endElementIndex) {
                         KnuthElement tempEl = (KnuthElement)effectiveListIterator.next();
-                        if (tempEl.isBox() &amp;&amp; tempEl.getW() &gt; 0) {
+                        if (tempEl.isBox() &amp;&amp; tempEl.getWidth() &gt; 0) {
                             boxCount++;
                         }
                     }
@@ -678,8 +685,23 @@
 
         BlockSequence blockList;
         List returnedList;
-        if (positionAtIPDChange == null) {
+        if (firstElements == null) {
             returnedList = getNextKnuthElements(childLC, alignment);
+        } else if (positionAtIPDChange == null) {
+            /*
+             * No restartable element found after changing IPD break. Simply add the
+             * non-restartable elements found after the break.
+             */
+            returnedList = firstElements;
+            /*
+             * Remove the last 3 penalty-filler-forced break elements that were added by
+             * the Knuth algorithm. They will be re-added later on.
+             */
+            ListIterator iter = returnedList.listIterator(returnedList.size());
+            for (int i = 0; i &lt; 3; i++) {
+                iter.previous();
+                iter.remove();
+            }
         } else {
             returnedList = getNextKnuthElements(childLC, alignment, positionAtIPDChange,
                     restartAtLM);
@@ -861,9 +883,9 @@
                     case BlockLevelLayoutManager.LINE_NUMBER_ADJUSTMENT:
                         // potential line number adjustment
                         lineNumberMaxAdjustment.max += ((KnuthGlue) thisElement)
-                                .getY();
+                                .getStretch();
                         lineNumberMaxAdjustment.min -= ((KnuthGlue) thisElement)
-                                .getZ();
+                                .getShrink();
                         adjustableLinesList.add(thisElement);
                         break;
                     case BlockLevelLayoutManager.LINE_HEIGHT_ADJUSTMENT:
@@ -885,9 +907,9 @@
                             KnuthGlue blockSpace = (KnuthGlue) unconfirmedList
                                     .removeFirst();
                             spaceMaxAdjustment.max += ((KnuthGlue) blockSpace)
-                                    .getY();
+                                    .getStretch();
                             spaceMaxAdjustment.min -= ((KnuthGlue) blockSpace)
-                                    .getZ();
+                                    .getShrink();
                             blockSpacesList.add(blockSpace);
                         }
                     }
@@ -898,11 +920,11 @@
             log.debug("| space adj      = "
                     + spaceMaxAdjustment);
 
-            if (thisElement.isPenalty() &amp;&amp; thisElement.getW() &gt; 0) {
+            if (thisElement.isPenalty() &amp;&amp; thisElement.getWidth() &gt; 0) {
                 log.debug("  mandatory variation to the number of lines!");
                 ((BlockLevelLayoutManager) thisElement
                         .getLayoutManager()).negotiateBPDAdjustment(
-                        thisElement.getW(), thisElement);
+                        thisElement.getWidth(), thisElement);
             }
 
             if (thisBreak.bpdAdjust != 0
@@ -967,7 +989,7 @@
         int partial = 0;
         while (spaceListIterator.hasNext()) {
             KnuthGlue blockSpace = (KnuthGlue)spaceListIterator.next();
-            partial += (difference &gt; 0 ? blockSpace.getY() : blockSpace.getZ());
+            partial += (difference &gt; 0 ? blockSpace.getStretch() : blockSpace.getShrink());
             if (log.isDebugEnabled()) {
                 log.debug("available = " + partial +  " / " + total);
                 log.debug("competenza  = "
@@ -990,7 +1012,7 @@
         int partial = 0;
         while (lineListIterator.hasNext()) {
             KnuthGlue line = (KnuthGlue)lineListIterator.next();
-            partial += (difference &gt; 0 ? line.getY() : line.getZ());
+            partial += (difference &gt; 0 ? line.getStretch() : line.getShrink());
             int newAdjust = ((BlockLevelLayoutManager) line.getLayoutManager()).negotiateBPDAdjustment(((int) ((float) partial * difference / total)) - adjustedDiff, line);
             adjustedDiff += newAdjust;
         }

Modified: xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/layoutmgr/BlockContainerLayoutManager.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/layoutmgr/BlockContainerLayoutManager.java?rev=829138&amp;r1=829137&amp;r2=829138&amp;view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/layoutmgr/BlockContainerLayoutManager.java (original)
+++ xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/layoutmgr/BlockContainerLayoutManager.java Fri Oct 23 17:27:14 2009
@@ -1133,7 +1133,7 @@
                     // by this BlockLM, and must be ignored
                     if (element.getLayoutManager() != this) {
                         splitList.add(element);
-                        splitLength += element.getW();
+                        splitLength += element.getWidth();
                         lastLM = element.getLayoutManager();
                     }
                 }

Modified: xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/layoutmgr/BlockLayoutManager.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/layoutmgr/BlockLayoutManager.java?rev=829138&amp;r1=829137&amp;r2=829138&amp;view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/layoutmgr/BlockLayoutManager.java (original)
+++ xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/layoutmgr/BlockLayoutManager.java Fri Oct 23 17:27:14 2009
@@ -339,7 +339,7 @@
                 // by this BlockLM, and must be ignored
                 if (element.getLayoutManager() != this) {
                     splitList.add(element);
-                    splitLength += element.getW();
+                    splitLength += element.getWidth();
                     lastLM = element.getLayoutManager();
                 }
             }

Modified: xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/layoutmgr/BlockStackingLayoutManager.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/layoutmgr/BlockStackingLayoutManager.java?rev=829138&amp;r1=829137&amp;r2=829138&amp;view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/layoutmgr/BlockStackingLayoutManager.java (original)
+++ xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/layoutmgr/BlockStackingLayoutManager.java Fri Oct 23 17:27:14 2009
@@ -695,11 +695,11 @@
 /*LF*/          //log.debug("  BLM.negotiateBPDAdjustment&gt; bpunit con penalty");
                 KnuthPenalty storedPenalty = (KnuthPenalty)
                                              storedList.get(mappingPos.getLastIndex());
-                if (storedPenalty.getW() &gt; 0) {
+                if (storedPenalty.getWidth() &gt; 0) {
                     // the original penalty has width &gt; 0
 /*LF*/              //log.debug("  BLM.negotiateBPDAdjustment&gt; chiamata passata");
                     return ((BlockLevelLayoutManager)storedPenalty.getLayoutManager())
-                           .negotiateBPDAdjustment(storedPenalty.getW(),
+                           .negotiateBPDAdjustment(storedPenalty.getWidth(),
                                    storedPenalty);
                 } else {
                     // the original penalty has width = 0
@@ -1406,17 +1406,18 @@
         while (oldListIterator.hasNext()) {
             KnuthElement element = (KnuthElement) oldListIterator.next();
             if (element.isBox()) {
-                totalLength.add(new MinOptMax(element.getW()));
-                //log.debug("box " + element.getW());
+                totalLength.add(new MinOptMax(element.getWidth()));
+                //log.debug("box " + element.getWidth());
             } else if (element.isGlue()) {
-                totalLength.min -= element.getZ();
-                totalLength.max += element.getY();
+                totalLength.min -= element.getShrink();
+                totalLength.max += element.getStretch();
                 //leafValue = ((LeafPosition) element.getPosition()).getLeafPos();
-                //log.debug("glue " + element.getW() + " + "
-                //    + ((KnuthGlue) element).getY() + " - " + ((KnuthGlue) element).getZ());
+                //log.debug("glue " + element.getWidth() + " + "
+                //    + ((KnuthGlue) element).getStretch() + " - "
+                //    + ((KnuthGlue) element).getShrink());
             } else {
-                //log.debug((((KnuthPenalty)element).getP() == KnuthElement.INFINITE
-                //    ? "PENALTY " : "penalty ") + element.getW());
+                //log.debug((((KnuthPenalty)element).getPenalty() == KnuthElement.INFINITE
+                //    ? "PENALTY " : "penalty ") + element.getWidth());
             }
         }
         // compute the total amount of "units"
@@ -1443,22 +1444,22 @@
             KnuthElement element = (KnuthElement) oldListIterator.next();
             lastIndex++;
             if (element.isBox()) {
-                lengthBeforeBreak.add(new MinOptMax(element.getW()));
-                lengthAfterBreak.subtract(new MinOptMax(element.getW()));
+                lengthBeforeBreak.add(new MinOptMax(element.getWidth()));
+                lengthAfterBreak.subtract(new MinOptMax(element.getWidth()));
                 bPrevIsBox = true;
             } else if (element.isGlue()) {
-                lengthBeforeBreak.min -= element.getZ();
-                lengthAfterBreak.min += element.getZ();
-                lengthBeforeBreak.max += element.getY();
-                lengthAfterBreak.max -= element.getY();
+                lengthBeforeBreak.min -= element.getShrink();
+                lengthAfterBreak.min += element.getShrink();
+                lengthBeforeBreak.max += element.getStretch();
+                lengthAfterBreak.max -= element.getStretch();
                 bPrevIsBox = false;
             } else {
-                lengthBeforeBreak.add(new MinOptMax(element.getW()));
+                lengthBeforeBreak.add(new MinOptMax(element.getWidth()));
                 bPrevIsBox = false;
             }
 
             // create the new elements
-            if (element.isPenalty() &amp;&amp; element.getP() &lt; KnuthElement.INFINITE
+            if (element.isPenalty() &amp;&amp; element.getPenalty() &lt; KnuthElement.INFINITE
                     || element.isGlue() &amp;&amp; bPrevIsBox
                     || !oldListIterator.hasNext()) {
                 // suppress elements after the breaking point
@@ -1468,8 +1469,8 @@
                     iStepsForward++;
                     if (el.isGlue()) {
                         // suppressed glue
-                        lengthAfterBreak.min += el.getZ();
-                        lengthAfterBreak.max -= el.getY();
+                        lengthAfterBreak.min += el.getShrink();
+                        lengthAfterBreak.max -= el.getStretch();
                     } else if (el.isPenalty()) {
                         // suppressed penalty, do nothing
                     } else {
@@ -1489,8 +1490,8 @@
                 for (int i = 0; i &lt; iStepsForward; i++) {
                     KnuthElement el = (KnuthElement) oldListIterator.previous();
                     if (el.isGlue()) {
-                        lengthAfterBreak.min -= el.getZ();
-                        lengthAfterBreak.max += el.getY();
+                        lengthAfterBreak.min -= el.getShrink();
+                        lengthAfterBreak.max += el.getStretch();
                     }
                 }
 
@@ -1611,7 +1612,7 @@
             }
 
             if (element.isPenalty()) {
-                lengthBeforeBreak.add(new MinOptMax(-element.getW()));
+                lengthBeforeBreak.add(new MinOptMax(-element.getWidth()));
             }
 
         }
@@ -1640,14 +1641,14 @@
                                    - neededUnits(totalLength.opt - adjustedSpaceBefore))
                                   * bpUnit;
             // insert the correct elements
-            newList.addFirst(new KnuthBox(wrongBox.getW() - decreasedLength,
+            newList.addFirst(new KnuthBox(wrongBox.getWidth() - decreasedLength,
                                           wrongBox.getPosition(), false));
             newList.addFirst(new KnuthGlue(decreasedLength, 0, 0, SPACE_BEFORE_ADJUSTMENT,
                                            wrongBox.getPosition(), false));
-            //log.debug("        rimosso box " + neededUnits(wrongBox.getW()));
+            //log.debug("        rimosso box " + neededUnits(wrongBox.getWidth()));
             //log.debug("        aggiunto glue " + neededUnits(decreasedLength) + " 0 0");
             //log.debug("        aggiunto box " + neededUnits(
-            //       wrongBox.getW() - decreasedLength));
+            //       wrongBox.getWidth() - decreasedLength));
         }
 
         // if space-after.conditionality is "discard", correct newList
@@ -1663,7 +1664,7 @@
             // (it cannot be parted and has some stretch or shrink)
             // the wrong box is the first one, not the last one
             LinkedList preserveList = new LinkedList();
-            if (wrongBox.getW() == 0) {
+            if (wrongBox.getWidth() == 0) {
                 preserveList.add(wrongBox);
                 preserveList.addFirst((KnuthGlue) newList.removeLast());
                 preserveList.addFirst((KnuthPenalty) newList.removeLast());
@@ -1676,7 +1677,7 @@
                                    - neededUnits(totalLength.opt - adjustedSpaceAfter))
                                   * bpUnit;
             // insert the correct box
-            newList.addLast(new KnuthBox(wrongBox.getW() - decreasedLength,
+            newList.addLast(new KnuthBox(wrongBox.getWidth() - decreasedLength,
                                          wrongBox.getPosition(), false));
             // add preserved elements
             if (!preserveList.isEmpty()) {
@@ -1685,9 +1686,9 @@
             // insert the correct glue
             newList.addLast(new KnuthGlue(decreasedLength, 0, 0, SPACE_AFTER_ADJUSTMENT,
                                           wrongBox.getPosition(), false));
-            //log.debug("        rimosso box " + neededUnits(wrongBox.getW()));
+            //log.debug("        rimosso box " + neededUnits(wrongBox.getWidth()));
             //log.debug("        aggiunto box " + neededUnits(
-            //      wrongBox.getW() - decreasedLength));
+            //      wrongBox.getWidth() - decreasedLength));
             //log.debug("        aggiunto glue " + neededUnits(decreasedLength) + " 0 0");
         }
 

Modified: xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/layoutmgr/BreakingAlgorithm.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/layoutmgr/BreakingAlgorithm.java?rev=829138&amp;r1=829137&amp;r2=829138&amp;view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/layoutmgr/BreakingAlgorithm.java (original)
+++ xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/layoutmgr/BreakingAlgorithm.java Fri Oct 23 17:27:14 2009
@@ -491,7 +491,7 @@
                     elementIndex, previousIsBox, allowedBreaks).isBox();
 
             if (activeNodeCount == 0) {
-                if (ipdChanged()) {
+                if (getIPDdifference() != 0) {
                     return handleIpdChange();
                 }
                 if (!force) {
@@ -538,8 +538,8 @@
         return line;
     }
 
-    protected boolean ipdChanged() {
-        return false;
+    protected int getIPDdifference() {
+        return 0;
     }
 
     protected int handleIpdChange() {
@@ -676,7 +676,7 @@
     protected void handleBox(KnuthBox box) {
         // a KnuthBox object is not a legal line break,
         // just add the width to the total
-        totalWidth += box.getW();
+        totalWidth += box.getWidth();
     }
 
     /**
@@ -697,9 +697,9 @@
             &amp;&amp; !(allowedBreaks == ONLY_FORCED_BREAKS)) {
             considerLegalBreak(glue, position);
         }
-        totalWidth += glue.getW();
-        totalStretch += glue.getY();
-        totalShrink += glue.getZ();
+        totalWidth += glue.getWidth();
+        totalStretch += glue.getStretch();
+        totalShrink += glue.getShrink();
     }
 
     /**
@@ -716,8 +716,8 @@
         // only if its penalty is not infinite;
         // consider all penalties, non-flagged penalties or non-forcing penalties
         // according to the value of allowedBreaks
-        if (((penalty.getP() &lt; KnuthElement.INFINITE)
-                &amp;&amp; (!(allowedBreaks == NO_FLAGGED_PENALTIES) || !penalty.isFlagged())
+        if (((penalty.getPenalty() &lt; KnuthElement.INFINITE)
+                &amp;&amp; (!(allowedBreaks == NO_FLAGGED_PENALTIES) || !penalty.isPenaltyFlagged())
                 &amp;&amp; (!(allowedBreaks == ONLY_FORCED_BREAKS)
                         || penalty.isForcedBreak()))) {
             considerLegalBreak(penalty, position);
@@ -880,7 +880,7 @@
      */
     protected boolean elementCanEndLine(KnuthElement element, int line, int difference) {
         return (!element.isPenalty()
-                || element.getP() &lt; KnuthElement.INFINITE);
+                || element.getPenalty() &lt; KnuthElement.INFINITE);
     }
 
     /**
@@ -921,9 +921,9 @@
             if (tempElement.isBox()) {
                 break;
             } else if (tempElement.isGlue()) {
-                newWidth += tempElement.getW();
-                newStretch += tempElement.getY();
-                newShrink += tempElement.getZ();
+                newWidth += tempElement.getWidth();
+                newStretch += tempElement.getStretch();
+                newShrink += tempElement.getShrink();
             } else if (tempElement.isForcedBreak() &amp;&amp; i != elementIdx) {
                 break;
             }
@@ -1034,9 +1034,9 @@
             if (tempElement.isBox()) {
                 break;
             } else if (tempElement.isGlue()) {
-                newWidth += tempElement.getW();
-                newStretch += tempElement.getY();
-                newShrink += tempElement.getZ();
+                newWidth += tempElement.getWidth();
+                newStretch += tempElement.getStretch();
+                newShrink += tempElement.getShrink();
             } else if (tempElement.isForcedBreak() &amp;&amp; i != elementIdx) {
                 break;
             }
@@ -1075,7 +1075,7 @@
         // compute the adjustment ratio
         int actualWidth = totalWidth - activeNode.totalWidth;
         if (element.isPenalty()) {
-            actualWidth += element.getW();
+            actualWidth += element.getWidth();
         }
         return getLineWidth() - actualWidth;
     }
@@ -1133,7 +1133,7 @@
         double f = Math.abs(r);
         f = 1 + 100 * f * f * f;
         if (element.isPenalty()) {
-            double penalty = element.getP();
+            double penalty = element.getPenalty();
             if (penalty &gt;= 0) {
                 f += penalty;
                 demerits = f * f;
@@ -1146,9 +1146,9 @@
             demerits = f * f;
         }
 
-        if (element.isPenalty() &amp;&amp; ((KnuthPenalty) element).isFlagged()
+        if (element.isPenalty() &amp;&amp; ((KnuthPenalty) element).isPenaltyFlagged()
             &amp;&amp; getElement(activeNode.position).isPenalty()
-            &amp;&amp; ((KnuthPenalty) getElement(activeNode.position)).isFlagged()) {
+            &amp;&amp; ((KnuthPenalty) getElement(activeNode.position)).isPenaltyFlagged()) {
             // add demerit for consecutive breaks at flagged penalties
             demerits += repeatedFlaggedDemerit;
             // there are at least two consecutive lines ending with a flagged penalty;
@@ -1160,7 +1160,7 @@
                  prevNode = prevNode.previous) {
                 KnuthElement prevElement = getElement(prevNode.position);
                 if (prevElement.isPenalty()
-                    &amp;&amp; ((KnuthPenalty) prevElement).isFlagged()) {
+                    &amp;&amp; ((KnuthPenalty) prevElement).isPenaltyFlagged()) {
                     // the previous line ends with a flagged penalty too
                     flaggedPenaltiesCount++;
                 } else {



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



</pre>
</div>
</content>
</entry>
<entry>
<title>svn commit: r829135 - /xmlgraphics/fop/branches/Temp_Accessibility/test/layoutengine/standard-testcases/foreign-attributes.xml</title>
<author><name>vhennebert@apache.org</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/xmlgraphics-fop-commits/200910.mbox/%3c20091023172329.0938A23888CF@eris.apache.org%3e"/>
<id>urn:uuid:%3c20091023172329-0938A23888CF@eris-apache-org%3e</id>
<updated>2009-10-23T17:23:28Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Author: vhennebert
Date: Fri Oct 23 17:23:28 2009
New Revision: 829135

URL: http://svn.apache.org/viewvc?rev=829135&amp;view=rev
Log:
Updated test case: there is now a specific handling of alt-text 

Modified:
    xmlgraphics/fop/branches/Temp_Accessibility/test/layoutengine/standard-testcases/foreign-attributes.xml

Modified: xmlgraphics/fop/branches/Temp_Accessibility/test/layoutengine/standard-testcases/foreign-attributes.xml
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_Accessibility/test/layoutengine/standard-testcases/foreign-attributes.xml?rev=829135&amp;r1=829134&amp;r2=829135&amp;view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_Accessibility/test/layoutengine/standard-testcases/foreign-attributes.xml
(original)
+++ xmlgraphics/fop/branches/Temp_Accessibility/test/layoutengine/standard-testcases/foreign-attributes.xml
Fri Oct 23 17:23:28 2009
@@ -31,9 +31,6 @@
       &lt;/fo:layout-master-set&gt;
       &lt;fo:page-sequence master-reference="normal"&gt;
         &lt;fo:flow flow-name="xsl-region-body"&gt;
-          &lt;fo:block id="eg"&gt;
-            &lt;fo:external-graphic src="../../resources/images/bgimg300dpi.jpg" fox:alt-text="description"/&gt;
-          &lt;/fo:block&gt;
           &lt;fo:block id="bl"&gt;
             &lt;fo:basic-link external-destination="url(http://xmlgraphics.apache.org/fop/)"
fox:blah="fop"&gt;FOP&lt;/fo:basic-link&gt;
           &lt;/fo:block&gt;
@@ -43,7 +40,6 @@
   &lt;/fo&gt;
   &lt;checks xmlns:fox="http://xmlgraphics.apache.org/fop/extensions"&gt;
     &lt;eval expected="bar" xpath="//pageViewport[1]/@fox:foo"/&gt;
-    &lt;eval expected="description" xpath="//block[@prod-id='eg']//image/@fox:alt-text"/&gt;
     &lt;!--eval expected="fop" xpath="//block[@prod-id='bl']/inlineparent/@fox:blah"/&gt;
NYI --&gt;
   &lt;/checks&gt;
 &lt;/testcase&gt;



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



</pre>
</div>
</content>
</entry>
</feed>
