]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
Initial commit of experimental version.
authorPeter Bernard West <pbwest@apache.org>
Tue, 7 May 2002 05:17:52 +0000 (05:17 +0000)
committerPeter Bernard West <pbwest@apache.org>
Tue, 7 May 2002 05:17:52 +0000 (05:17 +0000)
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/FOP_0-20-0_Alt-Design@194772 13f79535-47bb-0310-9956-ffa450edef68

src/org/apache/fop/fo/FOAttributes.java [new file with mode: 0644]
src/org/apache/fop/fo/FOTree.java [new file with mode: 0644]
src/org/apache/fop/fo/FObject.java [new file with mode: 0644]
src/org/apache/fop/fo/FObjectNames.java [new file with mode: 0644]
src/org/apache/fop/fo/FObjects.java [new file with mode: 0644]
src/org/apache/fop/fo/FoRoot.java [new file with mode: 0644]
src/org/apache/fop/fo/PropNames.java [new file with mode: 0644]
src/org/apache/fop/fo/Properties.java [new file with mode: 0644]
src/org/apache/fop/fo/PropertyConsts.java [new file with mode: 0644]
src/org/apache/fop/fo/PropertySets.java [new file with mode: 0644]

diff --git a/src/org/apache/fop/fo/FOAttributes.java b/src/org/apache/fop/fo/FOAttributes.java
new file mode 100644 (file)
index 0000000..624102d
--- /dev/null
@@ -0,0 +1,256 @@
+package org.apache.fop.fo;
+
+import org.apache.fop.apps.FOPException;
+import org.apache.fop.fo.expr.PropertyException;
+import org.apache.fop.fo.PropertyConsts;
+import org.apache.fop.datatypes.Ints;
+import org.apache.fop.messaging.MessageHandler;
+import org.apache.fop.xml.XMLEvent;
+
+import org.xml.sax.Attributes;
+
+import java.util.Iterator;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Collections;
+
+/*
+ * FOAttributes.java
+ * $Id$
+ *
+ * Created: Wed Nov 14 15:19:51 2001
+ * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
+ * For details on use and redistribution please refer to the
+ * LICENSE file included with these sources.
+ *
+ * @author <a href="mailto:pbwest@powerup.com.au">Peter B. West</a>
+ * @version $Revision$ $Name$
+ */
+/**
+ * The FO Attributes data structures and methods needed to manage the
+ * Attributes associated with FO nodes.
+ */
+
+public class FOAttributes {
+
+    /**
+     * <i>nSpaceAttrLists</i> is an <tt>ArrayList</tt> to hold the array of 
+     * <tt>HashMap</tt>s which contain the attribute lists for each
+     * namespace which may be active for a particular FO element.  The
+     * <tt>ArrayList</tt> is indexed by the URIIndex for this namespace
+     * which is statically maintained by <tt>XMLEvent</tt>.  The
+     * values in the <tt>HashMap</tt>s are indexed by the local name of the
+     * attribute.
+     * The <tt>ArrayList</tt> will not be created for a particular instance
+     * of <tt>FOAttributes</tt> unless a namespace other than the standard
+     * XSL namespace is activated for this instance.
+     * See <i>foAttrList</i>.
+     */
+    private ArrayList nSpaceAttrLists;
+
+    /**
+     * <i>foAttrList</i> is a <tt>HashMap</tt> to hold the FO namespace
+     * attribute list specified in the FO element with which this list is
+     * associated.  The <tt>String</tt> attribute value is stored
+     * indexed by the integer constant property identifier from
+     * <tt>PropertyConsts</tt>.
+     */
+    private HashMap foAttrList = new HashMap(0);
+
+    private int DefAttrNSIndex = XMLEvent.DefAttrNSIndex;
+
+    /**
+     * Construct an <i>FOAttributes</i> object from the <i>startElement</i>
+     * <tt>XMLEvent</tt> which triggered the construction of its parent
+     * element.
+     * <p>The <tt>Attributes</tt> object on the event is scanned, and each
+     * attribute is examined.  If the attribute is in the default namespace
+     * for fo: attributes, it is an fo: property, and its value is entered
+     * into the <i>foAttrList</i> <tt>Hashmap>/tt> indexed by the property
+     * index.
+     * <p>If the attribute does not belong to the default namespace, its
+     * value is entered into the appropriate <tt>HashMap</tt> in the
+     * <tt>ArrayList</tt> <i>nSpaceAttrLists</i>, indexed by the attribute's
+     * local name.
+     * <p>
+     */
+    public FOAttributes (XMLEvent event) throws FOPException {
+        // If the event is null, there is no event associated with this
+        // node, probably because this is a manufactured node; e.g.,
+        // an "invented" FopageSequenceMaster.  The default initialisation
+        // includes an empty foAttrList HashMap.
+        if (event == null) return;
+            
+        // Create the foAttrList.
+        Attributes attributes = event.attributes;
+        if (attributes == null) throw new FOPException
+                                       ("No Attributes in XMLEvent");
+        int propIndex;
+        HashMap tmpHash;
+        for (int i = 0; i < attributes.getLength(); i++) {
+            String attrUri = attributes.getURI(i);
+            String attrLocalname = attributes.getLocalName(i);
+            String attrValue = attributes.getValue(i);
+            int attrUriIndex = XMLEvent.getURIIndex(attrUri);
+            //System.out.println("FONode:" + event);
+            if (attrUriIndex == DefAttrNSIndex) {
+                // Standard FO namespace
+                // Catch default namespace declaration here.  This seems to
+                // be a kludge.  Should 'xmlns' come through here?
+                if (attrLocalname.equals("xmlns")) break;
+                // Is this a known (valid) property?
+                try {
+                    // throws PropertyException if invalid
+                    propIndex =
+                            PropertyConsts.getPropertyIndex(attrLocalname);
+                    // Known attribute name
+                    foAttrList.put(Ints.consts.get(propIndex), attrValue);
+                } catch (PropertyException e) {
+                    // Not known - ignore
+                    MessageHandler.errorln(event.qName + " "
+                                           + attributes.getQName(i)
+                                           + " not recognized.  Ignoring.");
+                }
+            } else { // Not the XSL FO namespace
+                int j;
+                if (nSpaceAttrLists == null) {
+                    //Create the list
+                    System.out.println("Creating nSpaceAttrLists");
+                    nSpaceAttrLists = new ArrayList(attrUriIndex + 1);
+                    // Add the fo list
+                    for (j = 0; j < DefAttrNSIndex; j++)
+                        nSpaceAttrLists.add(new HashMap(0));
+
+                    System.out.println("Adding foAttrList");
+                    nSpaceAttrLists.add(foAttrList);
+                }
+                // Make sure there are elements between the last current
+                // and the one to be added
+                for (j = nSpaceAttrLists.size(); j <= attrUriIndex; j++)
+                    nSpaceAttrLists.add(new HashMap(0));
+                
+                // Does a HashMap exist for this namespace?
+                if ((tmpHash =
+                     (HashMap)nSpaceAttrLists.get(attrUriIndex)) == null) {
+                    tmpHash = new HashMap(1);
+                    nSpaceAttrLists.set(attrUriIndex, tmpHash);
+                }
+                // Now put this value in the HashMap
+                tmpHash.put(attrLocalname, attrValue);
+            }
+        }
+    }
+
+    /**
+     * @return a unmodifiable <tt>Map</tt> containing the the attribute
+     * values for all of the default attribute namespace attributes in this
+     * attribute list, indexed by the property name index from
+     * <tt>PropNames</tt>.
+     */
+    public Map getFoAttrList() {
+        return Collections.unmodifiableMap((Map)foAttrList);
+    }
+
+    /**
+     * A convenience method for accessing attribute values from the default
+     * attribute namespace.
+     * @param property an <tt>int</tt> containing the property name index
+     * from <tt>PropNames</tt>.
+     * @return a <tt>String</tt> containing the associated property value.
+     */
+    public String getFoAttrValue(int property) {
+        return (String)(foAttrList.get(Ints.consts.get(property)));
+    }
+
+    /**
+     * A convenience method for accessing attribute values from the default
+     * attribute namespace.
+     * @param propertyName a <tt>String</tt> containing the property name.
+     * @return a <tt>String</tt> containing the associated property value.
+     */
+    public String getFoAttrValue(String propertyName)
+        throws PropertyException
+    {
+        return getFoAttrValue
+                        (PropertyConsts.getPropertyIndex(propertyName));
+    }
+
+    /**
+     * @param uriIndex an <tt>int</tt> containing the index of the attribute
+     * values namespace, maintained in an <tt>XMLEvent</tt> <tt>static</tt>
+     * array.
+     * @return an unmodifiable <tt>Map</tt> of the attribute values
+     * within the indexed namespace, for this attribute list, indexed by the
+     * local name of the attribute.  The <tt>Map</tt> returned is
+     * derived from the one maintained in <i>nSpaceAttrLists</i>.
+     */
+    public Map getAttrList(int uriIndex) {
+        if (uriIndex == DefAttrNSIndex)
+            return Collections.unmodifiableMap((Map)foAttrList);
+        if (nSpaceAttrLists != null) {
+            if (uriIndex >= nSpaceAttrLists.size()) return null;
+            return Collections.unmodifiableMap
+                    ((Map)(nSpaceAttrLists.get(uriIndex)));
+        } else {
+            return null;
+        }
+    }
+
+    /**
+     * @param uriIndex an <tt>int</tt> index of the URIs maintained
+     * by <tt>XMLEvent</tt>.
+     * @param localName a <tt>String</tt> with the local name of the
+     * attribute.  In the case of the default attribute namespace, this
+     * will be the fo property name.
+     * @return a <tt>String</tt> containing the value of the attribute.
+     */
+    public String getUriAttrValue(int uriIndex, String localName)
+        throws PropertyException
+    {
+        if (uriIndex == DefAttrNSIndex)
+            return getFoAttrValue(PropertyConsts.getPropertyIndex(localName));
+        return (String)
+                (((HashMap)nSpaceAttrLists.get(uriIndex)).get(localName));
+    }
+
+    /**
+     * Get the size of the <i>nSpaceAttrLists</i> <tt>ArrayList</tt>
+     * containing attribute namespaces active in this set of attributes.
+     * <i>N.B.</i> this may be zero if only the default attribute
+     * namespace has been seen in the attribute set.
+     * @return an <tt>int</tt> containing the size.
+     */
+    public int getNSpaceAttrListsSize() {
+        if (nSpaceAttrLists == null)
+            return 0;
+        return nSpaceAttrLists.size();
+    }
+
+    /**
+     */
+    public void merge(FOAttributes foAttrs) {
+        foAttrList.putAll(foAttrs.getFoAttrList());
+        int attrLen = foAttrs.getNSpaceAttrListsSize();
+        if (attrLen != 0) {
+            // something to copy
+            if (nSpaceAttrLists == null) {
+                // no "foreign" attribute lists in this
+                // copy the others in
+                nSpaceAttrLists = new ArrayList(attrLen);
+            }
+            for (int i = nSpaceAttrLists.size(); i < attrLen; i++)
+                nSpaceAttrLists.add(new HashMap(0));
+            // Except for foAttrs, which has already been merged, merge
+            // the entries from the merging foAttrs
+            for (int i = 0; i < attrLen; i++) {
+                // skip foAttrList
+                if (i == DefAttrNSIndex) continue;
+               ((HashMap) nSpaceAttrLists.get(i))
+                       .putAll(foAttrs.getAttrList(i));
+            }
+        }
+    }
+
+}// FOAttributes
diff --git a/src/org/apache/fop/fo/FOTree.java b/src/org/apache/fop/fo/FOTree.java
new file mode 100644 (file)
index 0000000..279bc50
--- /dev/null
@@ -0,0 +1,357 @@
+package org.apache.fop.fo;
+
+import org.apache.fop.datastructs.Tree;
+import org.apache.fop.datastructs.SyncedCircularBuffer;
+import org.apache.fop.datatypes.Numeric;
+import org.apache.fop.datatypes.Auto;
+import org.apache.fop.datatypes.None;
+import org.apache.fop.datatypes.TextDecorations;
+import org.apache.fop.xml.XMLEvent;
+import org.apache.fop.apps.Driver;
+import org.apache.fop.apps.FOPException;
+import org.apache.fop.configuration.Configuration;
+import org.apache.fop.fo.Properties;
+import org.apache.fop.fo.PropertyConsts;
+import org.apache.fop.fo.PropNames;
+import org.apache.fop.fo.expr.PropertyValue;
+import org.apache.fop.fo.expr.PropertyTriplet;
+import org.apache.fop.fo.expr.PropertyException;
+import org.apache.fop.fo.expr.PropertyParser;
+
+import org.xml.sax.InputSource;
+import org.xml.sax.XMLReader;
+
+import java.util.HashMap;
+import java.util.LinkedList;
+import java.util.ArrayList;
+
+import java.lang.reflect.InvocationTargetException;
+
+/*
+ * FOTree.java
+ *
+ * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
+ * For details on use and redistribution please refer to the
+ * LICENSE file included with these sources.
+ *
+ * Created: Thu Aug  2 20:29:57 2001
+ *
+ * @author <a href="mailto:pbwest@powerup.com.au">Peter B. West</a>
+ * @version $Id$
+ */
+/**
+ * <tt>FOTree</tt> is the class that generates and maintains the FO Tree.
+ * It runs as a thread, so it implements the <tt>run()</tt> method.
+ */
+
+public class FOTree extends Tree implements Runnable {
+
+    /**
+     * The buffer from which the <tt>XMLEvent</tt>s from the parser will
+     * be read.  <tt>protected</tt> so that FONode can access it.
+     */
+    SyncedCircularBuffer xmlevents;
+    private Thread parserThread;
+    private boolean errorDump;
+
+    /**
+     */
+    protected PropertyParser exprParser;
+
+    /**
+     * An Array of LinkedList[].  Each LinkedList is a stack containing the
+     * most recently specified value of a particular property.  The first
+     * element of each stack will contain the initial value.
+     * <p>
+     * The array is indexed by the same index values that are defined as
+     * constants in this file, and are the effective index values for the
+     * PropNames.propertyNames and classNames arrays.
+     * <p>
+     *  LinkedList is part of the 1.2 Collections framework.
+     */
+    protected static final LinkedList[] propertyStacks;
+    static {
+        propertyStacks = new LinkedList[PropNames.LAST_PROPERTY_INDEX + 1];
+        for (int i = 0; i <= PropNames.LAST_PROPERTY_INDEX; i++)
+            propertyStacks[i] = new LinkedList();
+    }
+
+    /**
+     * @param xmlevents the buffer from which <tt>XMLEvent</tt>s from the
+     * parser are read.
+     */
+    public FOTree(SyncedCircularBuffer xmlevents) {
+        super();
+        errorDump = Configuration.getBooleanValue("debugMode").booleanValue();
+        this.xmlevents = xmlevents;
+        exprParser = new PropertyParser();
+
+        // Initialise the propertyStacks
+        // Initialize the FontSize first.  Any lengths defined in ems must
+        // be resolved relative to the current font size.  This may happen
+        // during setup of initial values.
+        try {
+            try {
+                // Set the initial value
+                PropertyConsts.initialValueMethods.get
+                    (PropNames.FONT_SIZE).invoke(null, new Object[]{this});
+            }
+            catch (IllegalArgumentException e) {
+                throw new RuntimeException(
+                    "Illegal argument on \"" + e.getMessage()
+                    + "\" in class FontSize");
+            }
+            catch (IllegalAccessException e) {
+                throw new RuntimeException(
+                    "Illegal access on \"" + e.getMessage()
+                    + "\" in class FontSize");
+            }
+            catch (InvocationTargetException e) {
+                Throwable targetex = e.getTargetException();
+                throw new RuntimeException(
+                    "Invocation target exception on \""
+                    + targetex.getMessage() + "\" in class FontSize");
+            }
+            PropertyValue prop = Properties.FontSize.getInitialValue();
+            if ( ! (prop instanceof Numeric)
+                 || ! ((Numeric)prop).isLength())
+                throw new RuntimeException(
+                        "Initial font-size is not a Length");
+            propertyStacks[PropNames.FONT_SIZE].addLast
+                    (new PropertyTriplet(PropNames.FONT_SIZE, prop, prop));
+        } catch (PropertyException e) {
+            throw new RuntimeException
+                ("PropertyException: " + e.getMessage());
+        }
+
+
+        for (int i = 0; i <= PropNames.LAST_PROPERTY_INDEX; i++) {
+            String cname = "";
+            if (i == PropNames.FONT_SIZE) continue;
+            try {
+                Class vclass = PropertyConsts.propertyClasses.get(i);
+                cname = vclass.getName();
+                // Set up the initial values for each property
+                // Note that initial (specified) values are stored as
+                // unprocessed strings which can then be subject to the same
+                // processing as actual specified strings.
+                switch (PropertyConsts.getInitialValueType(i)) {
+                case Properties.NOTYPE_IT:
+                    propertyStacks[i].addLast(new PropertyTriplet(i, null));
+                    break;
+                case Properties.ENUM_IT:
+                case Properties.BOOL_IT:
+                case Properties.INTEGER_IT:
+                case Properties.NUMBER_IT:
+                case Properties.LENGTH_IT:
+                case Properties.ANGLE_IT:
+                case Properties.PERCENTAGE_IT:
+                case Properties.CHARACTER_IT:
+                case Properties.LITERAL_IT:
+                case Properties.NAME_IT:
+                case Properties.URI_SPECIFICATION_IT:
+                case Properties.COLOR_IT:
+                case Properties.TEXT_DECORATION_IT:
+                    // Set the initial value
+                    try {
+                        PropertyConsts.initialValueMethods.get
+                                (i).invoke(null, new Object[]{this});
+                    }
+                    catch (IllegalArgumentException e) {
+                        throw new RuntimeException(
+                            "Illegal argument on \"" + e.getMessage()
+                            + "\" in class " + cname);
+                    }
+                    catch (IllegalAccessException e) {
+                        throw new RuntimeException(
+                            "Illegal access on \"" + e.getMessage()
+                            + "\" in class " + cname);
+                    }
+                    catch (InvocationTargetException e) {
+                        Throwable targetex = e.getTargetException();
+                        throw new RuntimeException(
+                            "Invocation target exception on \""
+                            + targetex.getMessage() + "\" in class " + cname);
+                    }
+
+                    propertyStacks[i].addLast(new PropertyTriplet(
+                        i,
+                        (PropertyValue)
+                        (PropertyConsts.
+                         propertyClasses.get(i).
+                         getDeclaredField("initialValue").get(null))
+                        ));
+                    break;
+                case Properties.AUTO_IT:
+                    propertyStacks[i].addLast
+                        (new PropertyTriplet(i, new Auto(i)));
+                    break;
+                case Properties.NONE_IT:
+                    propertyStacks[i].addLast
+                        (new PropertyTriplet(i, new None(i)));
+                    break;
+                case Properties.AURAL_IT:
+                    propertyStacks[i].addLast(new PropertyTriplet(i, null));
+                    break;
+                default:
+                    throw new RuntimeException
+                            ("Unknown initial value type "
+                             + PropertyConsts.getInitialValueType(i)
+                             + " for class " + cname);
+                }
+            }
+            catch (NoSuchFieldException e) {
+                throw new RuntimeException(
+                            "Missing field \"" + e.getMessage() + "\""
+                            + " in class " + cname);
+            }
+            catch (IllegalAccessException e) {
+                throw new RuntimeException(
+                    "Illegal access on \"" + e.getMessage() + "\" in class " +
+                    cname);
+            }
+            catch (PropertyException e) {
+                throw new RuntimeException
+                    ("PropertyException: " + e.getMessage());
+            }
+        }
+
+    }
+
+    /**
+     * @return a <tt>Numeric</tt> containing the current font size
+     * @exception PropertyException if current font size is not defined,
+     * or is not expressed as a <tt>Numeric</tt>.
+     */
+    public Numeric currentFontSize() throws PropertyException {
+        Numeric tmpval = (Numeric)
+            (((PropertyTriplet)propertyStacks[PropNames.FONT_SIZE].getLast())
+                .getComputed());
+        if (tmpval == null)
+            throw new PropertyException("'font-size' not computed.");
+        try {
+            return (Numeric)(tmpval.clone());
+        } catch (CloneNotSupportedException e) {
+            throw new PropertyException("Clone not supported.");
+        }
+    }
+
+    /**
+     * @return a <tt>TextDecorations</tt> object containing the current
+     * text decorations
+     * @exception PropertyException if current text decorations are not
+     * defined, or are not expressed as <tt>TextDecorations</tt>.
+     */
+    public TextDecorations currentTextDecorations() throws PropertyException {
+        TextDecorations tmpval = (TextDecorations)
+            (((PropertyTriplet)
+              propertyStacks[PropNames.TEXT_DECORATION].getLast())
+                .getComputed());
+        if (tmpval == null)
+            throw new PropertyException("'text-decoration' not computed.");
+        try {
+            return (TextDecorations)(tmpval.clone());
+        } catch (CloneNotSupportedException e) {
+            throw new PropertyException("Clone not supported.");
+        }
+    }
+
+    /**
+     * @param index: <tt>int</tt> property index.
+     * @return a <tt>PropertyTriplet</tt> containing the latest property
+     * value elements for the indexed property.
+     */
+    public PropertyTriplet getCurrentPropertyTriplet(int index)
+            throws PropertyException
+    {
+        return (PropertyTriplet)(propertyStacks[index].getLast());
+    }
+
+    /**
+     * @param index: <tt>int</tt> property index.
+     * @return a <tt>PropertyTriplet</tt> containing the property
+     * value elements at the top of the stack for the indexed property.
+     */
+    public PropertyTriplet popPropertyTriplet(int index)
+            throws PropertyException
+    {
+        return (PropertyTriplet)(propertyStacks[index].removeLast());
+    }
+
+    /**
+     * @param index: <tt>int</tt> property index.
+     * @return a <tt>PropertyTriplet</tt> containing the property
+     * value elements at the bottom of the stack for the indexed property.
+     */
+    public PropertyTriplet getInitialValue(int index)
+            throws PropertyException
+    {
+        return (PropertyTriplet)(propertyStacks[index].getFirst());
+    }
+
+    /**
+     * @param index: <tt>int</tt> property index.
+     * @param value a <tt>PropertyTriplet</tt> containing the property
+     * value elements for the indexed property.
+     */
+    public void pushPropertyTriplet(int index, PropertyTriplet value)
+            throws PropertyException
+    {
+        propertyStacks[index].addLast(value);
+        return;
+    }
+
+    /**
+     * @param index: <tt>int</tt> property index.
+     * @return a <tt>PropertyValue</tt> containing the latest computed
+     * property value for the indexed property.
+     */
+    public PropertyValue getCurrentComputed(int index)
+            throws PropertyException
+    {
+        return getCurrentPropertyTriplet(index).getComputed();
+    }
+
+    public void setParserThread(Thread parserThread) {
+        this.parserThread = parserThread;
+    }
+
+    /**
+     * The <tt>run</tt> method() invoked by the call of <tt>start</tt>
+     * on the thread in which runs off FOTree.
+     */
+    public void run() {
+        FoRoot foRoot;
+        XMLEvent event;
+        try {
+            // Dummy only - check the language and country setup
+            System.out.println((String)Configuration.getHashMapEntry
+                               ("countriesMap","AU"));
+            System.out.println((String)Configuration.getHashMapEntry
+                               ("languagesMap","EN"));
+            System.out.println((String)Configuration.getHashMapEntry
+                               ("scriptsMap","Pk"));
+            // Let the parser look after STARTDOCUMENT and the correct
+            // positioning of the root element
+            event = XMLEvent.getStartElement
+                    (xmlevents, XMLEvent.XSLNSpaceIndex, "root");
+            //if (event != null) {
+                //System.out.println("FOTree:" + event);
+            //}
+            foRoot = new FoRoot(this, event);
+            foRoot.buildFoTree();
+            System.out.println("Back from buildFoTree");
+            XMLEvent.getEndDocument(xmlevents);
+        } catch (Exception e) {
+            if (errorDump) Driver.dumpError(e);
+            if (parserThread != null) {
+                try {
+                    parserThread.interrupt();
+                } catch (Exception ex) {} // Ignore
+            }
+            // Now propagate a Runtime exception
+            throw new RuntimeException(e.getMessage());
+        }
+    }
+
+}// FOTree
diff --git a/src/org/apache/fop/fo/FObject.java b/src/org/apache/fop/fo/FObject.java
new file mode 100644 (file)
index 0000000..4895cf0
--- /dev/null
@@ -0,0 +1,30 @@
+/*
+ * FObject.java
+ * Created: Sun Jan 27 01:35:24 2002
+ *
+ * @author <a href="mailto:pbwest@powerup.com.au">Peter B. West</a>
+ * @version $Revision$ $Name$
+ */
+
+package org.apache.fop.fo;
+
+import org.apache.fop.apps.FOPException;
+import org.apache.fop.fo.expr.PropertyException;
+import org.apache.fop.for.FObjects;
+
+/**
+ * Base class for all Flow Objects
+ */
+public class FObject {
+
+    private int foIndex;
+
+    public FObject(int foIndex) {
+        this.foIndex = foIndex;
+    }
+
+    public FObject(String foName) {
+        foIndex = FObjects.getFoIndex(foName);
+    }
+
+}// FObject
diff --git a/src/org/apache/fop/fo/FObjectNames.java b/src/org/apache/fop/fo/FObjectNames.java
new file mode 100644 (file)
index 0000000..762144a
--- /dev/null
@@ -0,0 +1,150 @@
+/*
+ * $Id$
+ * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
+ * For details on use and redistribution please refer to the
+ * LICENSE file included with these sources.
+ *
+ * @author <a href="mailto:pbwest@powerup.com.au">Peter B. West</a>
+ * @version $Rev$ $Name$
+ */
+
+package org.apache.fop.fo;
+
+/**
+ * Data class containing the Flow Object names and associated integer
+ * constants.
+ */
+
+public class FObjectNames {
+
+    /**
+     * Constant for matching Flow Object defined in <i>XSLFO</i>.
+     */
+    public static final int
+                                  NO_FO = 0,
+                             BASIC_LINK = 1,
+                          BIDI_OVERRIDE = 2,
+                                  BLOCK = 3,
+                        BLOCK_CONTAINER = 4,
+                              CHARACTER = 5,
+                          COLOR_PROFILE = 6,
+      CONDITIONAL_PAGE_MASTER_REFERENCE = 7,
+                           DECLARATIONS = 8,
+                       EXTERNAL_GRAPHIC = 9,
+                                  FLOAT = 10,
+                                   FLOW = 11,
+                               FOOTNOTE = 12,
+                          FOOTNOTE_BODY = 13,
+                   INITIAL_PROPERTY_SET = 14,
+                                 INLINE = 15,
+                       INLINE_CONTAINER = 16,
+                INSTREAM_FOREIGN_OBJECT = 17,
+                      LAYOUT_MASTER_SET = 18,
+                                 LEADER = 19,
+                             LIST_BLOCK = 20,
+                              LIST_ITEM = 21,
+                         LIST_ITEM_BODY = 22,
+                        LIST_ITEM_LABEL = 23,
+                                 MARKER = 24,
+                             MULTI_CASE = 25,
+                       MULTI_PROPERTIES = 26,
+                     MULTI_PROPERTY_SET = 27,
+                           MULTI_SWITCH = 28,
+                           MULTI_TOGGLE = 29,
+                            PAGE_NUMBER = 30,
+                   PAGE_NUMBER_CITATION = 31,
+                          PAGE_SEQUENCE = 32,
+                   PAGE_SEQUENCE_MASTER = 33,
+                           REGION_AFTER = 34,
+                          REGION_BEFORE = 35,
+                            REGION_BODY = 36,
+                             REGION_END = 37,
+                           REGION_START = 38,
+    REPEATABLE_PAGE_MASTER_ALTERNATIVES = 39,
+       REPEATABLE_PAGE_MASTER_REFERENCE = 40,
+                        RETRIEVE_MARKER = 41,
+                                   ROOT = 42,
+                     SIMPLE_PAGE_MASTER = 43,
+           SINGLE_PAGE_MASTER_REFERENCE = 44,
+                         STATIC_CONTENT = 45,
+                                  TABLE = 46,
+                      TABLE_AND_CAPTION = 47,
+                             TABLE_BODY = 48,
+                          TABLE_CAPTION = 49,
+                             TABLE_CELL = 50,
+                           TABLE_COLUMN = 51,
+                           TABLE_FOOTER = 52,
+                           TABLE_HEADER = 53,
+                              TABLE_ROW = 54,
+                                  TITLE = 55,
+                                WRAPPER = 56,
+
+                                LAST_FO = WRAPPER;
+
+    /**
+     * Array containing the local names of all of the elements in the
+     * <i>FO</i> namespace.  The array is effectively 1-based as the zero
+     * index does not correspond to any FO element.  The list of
+     * <tt>int</tt> constants must be kept in sync with this array, as the
+     * constants are used to index into the array.
+     */
+    public static final String[] foLocalNames = {
+        "no-fo",
+        "basic-link",
+        "bidi-override",
+        "block",
+        "block-container",
+        "character",
+        "color-profile",
+        "conditional-page-master-reference",
+        "declarations",
+        "external-graphic",
+        "float",
+        "flow",
+        "footnote",
+        "footnote-body",
+        "initial-property-set",
+        "inline",
+        "inline-container",
+        "instream-foreign-object",
+        "layout-master-set",
+        "leader",
+        "list-block",
+        "list-item",
+        "list-item-body",
+        "list-item-label",
+        "marker",
+        "multi-case",
+        "multi-properties",
+        "multi-property-set",
+        "multi-switch",
+        "multi-toggle",
+        "page-number",
+        "page-number-citation",
+        "page-sequence",
+        "page-sequence-master",
+        "region-after",
+        "region-before",
+        "region-body",
+        "region-end",
+        "region-start",
+        "repeatable-page-master-alternatives",
+        "repeatable-page-master-reference",
+        "retrieve-marker",
+        "root",
+        "simple-page-master",
+        "single-page-master-reference",
+        "static-content",
+        "table",
+        "table-and-caption",
+        "table-body",
+        "table-caption",
+        "table-cell",
+        "table-column",
+        "table-footer",
+        "table-header",
+        "table-row",
+        "title",
+        "wrapper"
+    };
+}
diff --git a/src/org/apache/fop/fo/FObjects.java b/src/org/apache/fop/fo/FObjects.java
new file mode 100644 (file)
index 0000000..70639cd
--- /dev/null
@@ -0,0 +1,1958 @@
+/*
+ * $Id$
+ * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
+ * For details on use and redistribution please refer to the
+ * LICENSE file included with these sources.
+ *
+ * @author <a href="mailto:pbwest@powerup.com.au">Peter B. West</a>
+ * @version $Id$
+ */
+
+package org.apache.fop.fo;
+
+import java.lang.Character;
+
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.StringTokenizer;
+
+// Only for tree property set partitions
+import java.util.BitSet;
+import java.util.Iterator;
+
+import org.apache.fop.fo.FObjectNames;
+import org.apache.fop.fo.PropertySets;
+import org.apache.fop.fo.PropNames;
+import org.apache.fop.datatypes.Ints;
+import org.apache.fop.datastructs.ROIntArray;
+
+/**
+ * Data class relating sets of properties to Flow Objects.
+ */
+
+public class FObjects {
+
+    public static final String XSLNamespace =
+                                        "http://www.w3.org/1999/XSL/Format";
+
+    private static final String packageName = "org.apache.fop.fo";
+    //private static final String fobsPackageName = packageName + ".fobs";
+    private static final String fobsPackageName = packageName;
+
+    public static int getFoIndex(String name) {
+        return ((Integer)(foToIndex.get(name))).intValue();
+    }
+
+    public static String getClassName(int foIndex) {
+        return foClassNames[foIndex];
+    }
+
+    public static Class getClass(int foIndex) {
+        return foClasses[foIndex];
+    }
+
+    public static BitSet getLayoutMasterSet() {
+        return (BitSet)(layoutMasterSet.clone());
+    }
+
+    public static BitSet getPageFlowSet() {
+        return (BitSet)(pageFlowSet.clone());
+    }
+
+    /**
+     * A String[] array of the fo class names.  This array is
+     * effectively 1-based, with the first element being unused.
+     * The array is initialized in a static initializer by converting the
+     * fo names from the array FObjectNames.foLocalNames into class names by
+     * converting the first character of every component word to upper case,
+     * removing all punctuation characters and prepending the prefix 'Fo'.
+     *  It can be indexed by the fo name constants defined in this file.
+     */
+    private static final String[] foClassNames;
+
+    /**
+     * An Class[] array containing Class objects corresponding to each of the
+     * class names in the foClassNames array.  It is initialized in a static
+     * initializer in parallel with the creation of the class names in the
+     * foClassNames array.  It can be indexed by the class name constants
+     * defined in this file.
+     *
+     * It is not guaranteed that there exists a class corresponding to each of
+     * the FlowObjects defined in this file.
+     */
+    private static final Class[] foClasses;
+
+    /**
+     * A HashMap whose elements are an integer index value keyed by an
+     * fo local name.  The index value is the index of the fo local name in
+     * the FObjectNames.foLocalNames[] array.
+     * It is initialized in a static initializer.
+     */
+    private static final HashMap foToIndex;
+
+    /**
+     * A HashMap whose elements are an integer index value keyed by the name
+     * of a fo class.  The index value is the index of the fo
+     * class name in the foClassNames[] array.  It is initialized in a
+     * static initializer.
+     */
+    private static final HashMap foClassToIndex;
+
+    /**
+     * A array of <tt>HashSet</tt>s indexed by the integer <i>FO</i>
+     * element constants.
+     * Each <tt>HashSet</tt> contains the set of <i>properties</i> that apply
+     * to the corresponding formatting object..  This array, and each
+     * <tt>HashSet</tt> within it, is intialized in a static initializer.
+     */
+    private static final HashSet[] foPropertyLists;
+
+    /**
+     * A Bitmap representing all of the Properties for use in building
+     * the partition sets of the properties.
+     */
+
+    static {
+        foPropertyLists = new HashSet[FObjectNames.LAST_FO + 1];
+        
+        foPropertyLists[FObjectNames.NO_FO] = new HashSet(1);
+        foPropertyLists[FObjectNames.NO_FO].
+                           add(Ints.consts.get(PropNames.NO_PROPERTY));
+
+        //basic-link
+        foPropertyLists[FObjectNames.BASIC_LINK] = new HashSet(
+                                PropertySets.accessibilityPropsSize +
+                                PropertySets.auralPropsSize +
+                                PropertySets.backgroundPropsSize +
+                                PropertySets.borderPropsSize +
+                                PropertySets.paddingPropsSize +
+                                PropertySets.marginInlinePropsSize +
+                                PropertySets.relativePositionPropsSize +
+                                18 );
+        foPropertyLists[FObjectNames.BASIC_LINK].
+                            addAll(PropertySets.accessibilitySet);
+        foPropertyLists[FObjectNames.BASIC_LINK].
+                            addAll(PropertySets.auralSet);
+        foPropertyLists[FObjectNames.BASIC_LINK].
+                            addAll(PropertySets.backgroundSet);
+        foPropertyLists[FObjectNames.BASIC_LINK].
+                            addAll(PropertySets.borderSet);
+        foPropertyLists[FObjectNames.BASIC_LINK].
+                            addAll(PropertySets.paddingSet);
+        foPropertyLists[FObjectNames.BASIC_LINK].
+                            addAll(PropertySets.marginInlineSet);
+        foPropertyLists[FObjectNames.BASIC_LINK].
+                            addAll(PropertySets.relativePositionSet);
+        foPropertyLists[FObjectNames.BASIC_LINK].
+                        add(Ints.consts.get(PropNames.ALIGNMENT_ADJUST));
+        foPropertyLists[FObjectNames.BASIC_LINK].
+                        add(Ints.consts.get(PropNames.ALIGNMENT_BASELINE));
+        foPropertyLists[FObjectNames.BASIC_LINK].
+                        add(Ints.consts.get(PropNames.BASELINE_SHIFT));
+        foPropertyLists[FObjectNames.BASIC_LINK].
+                add(Ints.consts.get(PropNames.DESTINATION_PLACEMENT_OFFSET));
+        foPropertyLists[FObjectNames.BASIC_LINK].
+                        add(Ints.consts.get(PropNames.DOMINANT_BASELINE));
+        foPropertyLists[FObjectNames.BASIC_LINK].
+                        add(Ints.consts.get(PropNames.EXTERNAL_DESTINATION));
+        foPropertyLists[FObjectNames.BASIC_LINK].
+                        add(Ints.consts.get(PropNames.ID));
+        foPropertyLists[FObjectNames.BASIC_LINK].
+                        add(Ints.consts.get(PropNames.INDICATE_DESTINATION));
+        foPropertyLists[FObjectNames.BASIC_LINK].
+                        add(Ints.consts.get(PropNames.INTERNAL_DESTINATION));
+        foPropertyLists[FObjectNames.BASIC_LINK].
+                        add(Ints.consts.get(PropNames.KEEP_TOGETHER));
+        foPropertyLists[FObjectNames.BASIC_LINK].
+                        add(Ints.consts.get(PropNames.KEEP_WITH_NEXT));
+        foPropertyLists[FObjectNames.BASIC_LINK].
+                        add(Ints.consts.get(PropNames.KEEP_WITH_PREVIOUS));
+        foPropertyLists[FObjectNames.BASIC_LINK].
+                        add(Ints.consts.get(PropNames.LINE_HEIGHT));
+        foPropertyLists[FObjectNames.BASIC_LINK].
+                        add(Ints.consts.get(PropNames.SHOW_DESTINATION));
+        foPropertyLists[FObjectNames.BASIC_LINK].
+                    add(Ints.consts.get(PropNames.TARGET_PROCESSING_CONTEXT));
+        foPropertyLists[FObjectNames.BASIC_LINK].
+                add(Ints.consts.get(PropNames.TARGET_PRESENTATION_CONTEXT));
+        foPropertyLists[FObjectNames.BASIC_LINK].
+                        add(Ints.consts.get(PropNames.TARGET_STYLESHEET));
+        
+        //bidi-override
+        foPropertyLists[FObjectNames.BIDI_OVERRIDE] = new HashSet(
+                                PropertySets.auralPropsSize +
+                                PropertySets.fontPropsSize +
+                                PropertySets.relativePositionPropsSize +
+                                1);
+        foPropertyLists[FObjectNames.BIDI_OVERRIDE].
+                            addAll(PropertySets.auralSet);
+        foPropertyLists[FObjectNames.BIDI_OVERRIDE].
+                            addAll(PropertySets.fontSet);
+        foPropertyLists[FObjectNames.BIDI_OVERRIDE].
+                            addAll(PropertySets.relativePositionSet);
+        foPropertyLists[FObjectNames.BIDI_OVERRIDE].
+                        add(Ints.consts.get(PropNames.COLOR));
+        foPropertyLists[FObjectNames.BIDI_OVERRIDE].
+                        add(Ints.consts.get(PropNames.DIRECTION));
+        foPropertyLists[FObjectNames.BIDI_OVERRIDE].
+                        add(Ints.consts.get(PropNames.ID));
+        foPropertyLists[FObjectNames.BIDI_OVERRIDE].
+                        add(Ints.consts.get(PropNames.LETTER_SPACING));
+        foPropertyLists[FObjectNames.BIDI_OVERRIDE].
+                        add(Ints.consts.get(PropNames.LINE_HEIGHT));
+        foPropertyLists[FObjectNames.BIDI_OVERRIDE].
+                        add(Ints.consts.get(PropNames.SCORE_SPACES));
+        foPropertyLists[FObjectNames.BIDI_OVERRIDE].
+                        add(Ints.consts.get(PropNames.UNICODE_BIDI));
+        foPropertyLists[FObjectNames.BIDI_OVERRIDE].
+                        add(Ints.consts.get(PropNames.WORD_SPACING));
+
+        //block
+        foPropertyLists[FObjectNames.BLOCK] = new HashSet(
+                                PropertySets.accessibilityPropsSize +
+                                PropertySets.auralPropsSize +
+                                PropertySets.backgroundPropsSize +
+                                PropertySets.borderPropsSize +
+                                PropertySets.fontPropsSize +
+                                PropertySets.hyphenationPropsSize +
+                                PropertySets.marginBlockPropsSize +
+                                PropertySets.paddingPropsSize +
+                                PropertySets.relativePositionPropsSize +
+                                27);
+        foPropertyLists[FObjectNames.BLOCK].
+                            addAll(PropertySets.accessibilitySet);
+        foPropertyLists[FObjectNames.BLOCK].
+                            addAll(PropertySets.auralSet);
+        foPropertyLists[FObjectNames.BLOCK].
+                            addAll(PropertySets.backgroundSet);
+        foPropertyLists[FObjectNames.BLOCK].
+                            addAll(PropertySets.borderSet);
+        foPropertyLists[FObjectNames.BLOCK].
+                            addAll(PropertySets.fontSet);
+        foPropertyLists[FObjectNames.BLOCK].
+                            addAll(PropertySets.hyphenationSet);
+        foPropertyLists[FObjectNames.BLOCK].
+                            addAll(PropertySets.marginBlockSet);
+        foPropertyLists[FObjectNames.BLOCK].
+                            addAll(PropertySets.paddingSet);
+        foPropertyLists[FObjectNames.BLOCK].
+                            addAll(PropertySets.relativePositionSet);
+        foPropertyLists[FObjectNames.BLOCK].
+                        add(Ints.consts.get(PropNames.BREAK_AFTER));
+        foPropertyLists[FObjectNames.BLOCK].
+                        add(Ints.consts.get(PropNames.BREAK_BEFORE));
+        foPropertyLists[FObjectNames.BLOCK].
+                        add(Ints.consts.get(PropNames.COLOR));
+        foPropertyLists[FObjectNames.BLOCK].
+                        add(Ints.consts.get(PropNames.TEXT_DEPTH));
+        foPropertyLists[FObjectNames.BLOCK].
+                        add(Ints.consts.get(PropNames.TEXT_ALTITUDE));
+        foPropertyLists[FObjectNames.BLOCK].
+                        add(Ints.consts.get(PropNames.HYPHENATION_KEEP));
+        foPropertyLists[FObjectNames.BLOCK].
+                    add(Ints.consts.get(PropNames.HYPHENATION_LADDER_COUNT));
+        foPropertyLists[FObjectNames.BLOCK].
+                        add(Ints.consts.get(PropNames.ID));
+        foPropertyLists[FObjectNames.BLOCK].
+                        add(Ints.consts.get(PropNames.INTRUSION_DISPLACE));
+        foPropertyLists[FObjectNames.BLOCK].
+                        add(Ints.consts.get(PropNames.KEEP_TOGETHER));
+        foPropertyLists[FObjectNames.BLOCK].
+                        add(Ints.consts.get(PropNames.KEEP_WITH_NEXT));
+        foPropertyLists[FObjectNames.BLOCK].
+                        add(Ints.consts.get(PropNames.KEEP_WITH_PREVIOUS));
+        foPropertyLists[FObjectNames.BLOCK].
+                        add(Ints.consts.get(PropNames.LAST_LINE_END_INDENT));
+        foPropertyLists[FObjectNames.BLOCK].
+                        add(Ints.consts.get(PropNames.LINEFEED_TREATMENT));
+        foPropertyLists[FObjectNames.BLOCK].
+                        add(Ints.consts.get(PropNames.LINE_HEIGHT));
+        foPropertyLists[FObjectNames.BLOCK].
+                add(Ints.consts.get(PropNames.LINE_HEIGHT_SHIFT_ADJUSTMENT));
+        foPropertyLists[FObjectNames.BLOCK].
+                    add(Ints.consts.get(PropNames.LINE_STACKING_STRATEGY));
+        foPropertyLists[FObjectNames.BLOCK].
+                        add(Ints.consts.get(PropNames.ORPHANS));
+        foPropertyLists[FObjectNames.BLOCK].
+                        add(Ints.consts.get(PropNames.WHITE_SPACE_TREATMENT));
+        foPropertyLists[FObjectNames.BLOCK].
+                        add(Ints.consts.get(PropNames.SPAN));
+        foPropertyLists[FObjectNames.BLOCK].
+                        add(Ints.consts.get(PropNames.TEXT_ALIGN));
+        foPropertyLists[FObjectNames.BLOCK].
+                        add(Ints.consts.get(PropNames.TEXT_ALIGN_LAST));
+        foPropertyLists[FObjectNames.BLOCK].
+                        add(Ints.consts.get(PropNames.TEXT_INDENT));
+        foPropertyLists[FObjectNames.BLOCK].
+                        add(Ints.consts.get(PropNames.VISIBILITY));
+        foPropertyLists[FObjectNames.BLOCK].
+                        add(Ints.consts.get(PropNames.WHITE_SPACE_COLLAPSE));
+        foPropertyLists[FObjectNames.BLOCK].
+                        add(Ints.consts.get(PropNames.WIDOWS));
+        foPropertyLists[FObjectNames.BLOCK].
+                        add(Ints.consts.get(PropNames.WRAP_OPTION));
+
+        //block-container
+        foPropertyLists[FObjectNames.BLOCK_CONTAINER] = new HashSet(
+                                PropertySets.absolutePositionPropsSize +
+                                PropertySets.backgroundPropsSize +
+                                PropertySets.borderPropsSize +
+                                PropertySets.marginBlockPropsSize +
+                                PropertySets.paddingPropsSize +
+                                18);
+        foPropertyLists[FObjectNames.BLOCK_CONTAINER].
+                            addAll(PropertySets.absolutePositionSet);
+        foPropertyLists[FObjectNames.BLOCK_CONTAINER].
+                            addAll(PropertySets.backgroundSet);
+        foPropertyLists[FObjectNames.BLOCK_CONTAINER].
+                            addAll(PropertySets.borderSet);
+        foPropertyLists[FObjectNames.BLOCK_CONTAINER].
+                            addAll(PropertySets.marginBlockSet);
+        foPropertyLists[FObjectNames.BLOCK_CONTAINER].
+                            addAll(PropertySets.paddingSet);
+        foPropertyLists[FObjectNames.BLOCK_CONTAINER].
+                add(Ints.consts.get(PropNames.BLOCK_PROGRESSION_DIMENSION));
+        foPropertyLists[FObjectNames.BLOCK_CONTAINER].
+                        add(Ints.consts.get(PropNames.BREAK_AFTER));
+        foPropertyLists[FObjectNames.BLOCK_CONTAINER].
+                        add(Ints.consts.get(PropNames.BREAK_BEFORE));
+        foPropertyLists[FObjectNames.BLOCK_CONTAINER].
+                        add(Ints.consts.get(PropNames.CLIP));
+        foPropertyLists[FObjectNames.BLOCK_CONTAINER].
+                        add(Ints.consts.get(PropNames.DISPLAY_ALIGN));
+        foPropertyLists[FObjectNames.BLOCK_CONTAINER].
+                        add(Ints.consts.get(PropNames.HEIGHT));
+        foPropertyLists[FObjectNames.BLOCK_CONTAINER].
+                        add(Ints.consts.get(PropNames.ID));
+        foPropertyLists[FObjectNames.BLOCK_CONTAINER].
+                add(Ints.consts.get(PropNames.INLINE_PROGRESSION_DIMENSION));
+        foPropertyLists[FObjectNames.BLOCK_CONTAINER].
+                        add(Ints.consts.get(PropNames.INTRUSION_DISPLACE));
+        foPropertyLists[FObjectNames.BLOCK_CONTAINER].
+                        add(Ints.consts.get(PropNames.KEEP_TOGETHER));
+        foPropertyLists[FObjectNames.BLOCK_CONTAINER].
+                        add(Ints.consts.get(PropNames.KEEP_WITH_NEXT));
+        foPropertyLists[FObjectNames.BLOCK_CONTAINER].
+                        add(Ints.consts.get(PropNames.KEEP_WITH_PREVIOUS));
+        foPropertyLists[FObjectNames.BLOCK_CONTAINER].
+                        add(Ints.consts.get(PropNames.OVERFLOW));
+        foPropertyLists[FObjectNames.BLOCK_CONTAINER].
+                        add(Ints.consts.get(PropNames.REFERENCE_ORIENTATION));
+        foPropertyLists[FObjectNames.BLOCK_CONTAINER].
+                        add(Ints.consts.get(PropNames.SPAN));
+        foPropertyLists[FObjectNames.BLOCK_CONTAINER].
+                        add(Ints.consts.get(PropNames.WIDTH));
+        foPropertyLists[FObjectNames.BLOCK_CONTAINER].
+                        add(Ints.consts.get(PropNames.WRITING_MODE));
+        foPropertyLists[FObjectNames.BLOCK_CONTAINER].
+                        add(Ints.consts.get(PropNames.Z_INDEX));
+
+        //character
+        foPropertyLists[FObjectNames.CHARACTER] = new HashSet(
+                                PropertySets.auralPropsSize +
+                                PropertySets.backgroundPropsSize +
+                                PropertySets.borderPropsSize +
+                                PropertySets.fontPropsSize +
+                                PropertySets.hyphenationPropsSize +
+                                PropertySets.marginInlinePropsSize +
+                                PropertySets.paddingPropsSize +
+                                PropertySets.relativePositionPropsSize +
+                                23);
+        foPropertyLists[FObjectNames.CHARACTER].
+                            addAll(PropertySets.auralSet);
+        foPropertyLists[FObjectNames.CHARACTER].
+                            addAll(PropertySets.backgroundSet);
+        foPropertyLists[FObjectNames.CHARACTER].
+                            addAll(PropertySets.borderSet);
+        foPropertyLists[FObjectNames.CHARACTER].
+                            addAll(PropertySets.fontSet);
+        foPropertyLists[FObjectNames.CHARACTER].
+                            addAll(PropertySets.hyphenationSet);
+        foPropertyLists[FObjectNames.CHARACTER].
+                            addAll(PropertySets.marginInlineSet);
+        foPropertyLists[FObjectNames.CHARACTER].
+                            addAll(PropertySets.paddingSet);
+        foPropertyLists[FObjectNames.CHARACTER].
+                            addAll(PropertySets.relativePositionSet);
+        foPropertyLists[FObjectNames.CHARACTER].
+                        add(Ints.consts.get(PropNames.ALIGNMENT_ADJUST));
+        foPropertyLists[FObjectNames.CHARACTER].
+                        add(Ints.consts.get(PropNames.TREAT_AS_WORD_SPACE));
+        foPropertyLists[FObjectNames.CHARACTER].
+                        add(Ints.consts.get(PropNames.ALIGNMENT_BASELINE));
+        foPropertyLists[FObjectNames.CHARACTER].
+                        add(Ints.consts.get(PropNames.BASELINE_SHIFT));
+        foPropertyLists[FObjectNames.CHARACTER].
+                        add(Ints.consts.get(PropNames.CHARACTER));
+        foPropertyLists[FObjectNames.CHARACTER].
+                        add(Ints.consts.get(PropNames.COLOR));
+        foPropertyLists[FObjectNames.CHARACTER].
+                        add(Ints.consts.get(PropNames.DOMINANT_BASELINE));
+        foPropertyLists[FObjectNames.CHARACTER].
+                        add(Ints.consts.get(PropNames.TEXT_DEPTH));
+        foPropertyLists[FObjectNames.CHARACTER].
+                        add(Ints.consts.get(PropNames.TEXT_ALTITUDE));
+        foPropertyLists[FObjectNames.CHARACTER].
+                add(Ints.consts.get(PropNames.GLYPH_ORIENTATION_HORIZONTAL));
+        foPropertyLists[FObjectNames.CHARACTER].
+                add(Ints.consts.get(PropNames.GLYPH_ORIENTATION_VERTICAL));
+        foPropertyLists[FObjectNames.CHARACTER].
+                        add(Ints.consts.get(PropNames.ID));
+        foPropertyLists[FObjectNames.CHARACTER].
+                        add(Ints.consts.get(PropNames.KEEP_WITH_NEXT));
+        foPropertyLists[FObjectNames.CHARACTER].
+                        add(Ints.consts.get(PropNames.KEEP_WITH_PREVIOUS));
+        foPropertyLists[FObjectNames.CHARACTER].
+                        add(Ints.consts.get(PropNames.LETTER_SPACING));
+        foPropertyLists[FObjectNames.CHARACTER].
+                        add(Ints.consts.get(PropNames.LINE_HEIGHT));
+        foPropertyLists[FObjectNames.CHARACTER].
+                        add(Ints.consts.get(PropNames.SCORE_SPACES));
+        foPropertyLists[FObjectNames.CHARACTER].
+                        add(Ints.consts.get(PropNames.SUPPRESS_AT_LINE_BREAK));
+        foPropertyLists[FObjectNames.CHARACTER].
+                        add(Ints.consts.get(PropNames.TEXT_DECORATION));
+        foPropertyLists[FObjectNames.CHARACTER].
+                        add(Ints.consts.get(PropNames.TEXT_SHADOW));
+        foPropertyLists[FObjectNames.CHARACTER].
+                        add(Ints.consts.get(PropNames.TEXT_TRANSFORM));
+        foPropertyLists[FObjectNames.CHARACTER].
+                        add(Ints.consts.get(PropNames.VISIBILITY));
+        foPropertyLists[FObjectNames.CHARACTER].
+                        add(Ints.consts.get(PropNames.WORD_SPACING));
+
+        //color-profile
+        foPropertyLists[FObjectNames.COLOR_PROFILE] = new HashSet(3);
+        foPropertyLists[FObjectNames.COLOR_PROFILE].
+                        add(Ints.consts.get(PropNames.COLOR_PROFILE_NAME));
+        foPropertyLists[FObjectNames.COLOR_PROFILE].
+                        add(Ints.consts.get(PropNames.RENDERING_INTENT));
+        foPropertyLists[FObjectNames.COLOR_PROFILE].
+                        add(Ints.consts.get(PropNames.SRC));
+
+        //conditional-page-master-reference
+        foPropertyLists[FObjectNames.CONDITIONAL_PAGE_MASTER_REFERENCE]
+                        = new HashSet(4);
+        foPropertyLists[FObjectNames.CONDITIONAL_PAGE_MASTER_REFERENCE].
+                        add(Ints.consts.get(PropNames.MASTER_REFERENCE));
+        foPropertyLists[FObjectNames.CONDITIONAL_PAGE_MASTER_REFERENCE].
+                        add(Ints.consts.get(PropNames.PAGE_POSITION));
+        foPropertyLists[FObjectNames.CONDITIONAL_PAGE_MASTER_REFERENCE].
+                        add(Ints.consts.get(PropNames.ODD_OR_EVEN));
+        foPropertyLists[FObjectNames.CONDITIONAL_PAGE_MASTER_REFERENCE].
+                        add(Ints.consts.get(PropNames.BLANK_OR_NOT_BLANK));
+
+        //declarations
+        foPropertyLists[FObjectNames.DECLARATIONS] = null;
+
+        //external-graphic
+        foPropertyLists[FObjectNames.EXTERNAL_GRAPHIC] = new HashSet(
+                                PropertySets.accessibilityPropsSize +
+                                PropertySets.auralPropsSize +
+                                PropertySets.backgroundPropsSize +
+                                PropertySets.borderPropsSize +
+                                PropertySets.marginInlinePropsSize +
+                                PropertySets.paddingPropsSize +
+                                PropertySets.relativePositionPropsSize +
+                                22);
+        foPropertyLists[FObjectNames.EXTERNAL_GRAPHIC].
+                            addAll(PropertySets.accessibilitySet);
+        foPropertyLists[FObjectNames.EXTERNAL_GRAPHIC].
+                            addAll(PropertySets.auralSet);
+        foPropertyLists[FObjectNames.EXTERNAL_GRAPHIC].
+                            addAll(PropertySets.backgroundSet);
+        foPropertyLists[FObjectNames.EXTERNAL_GRAPHIC].
+                            addAll(PropertySets.borderSet);
+        foPropertyLists[FObjectNames.EXTERNAL_GRAPHIC].
+                            addAll(PropertySets.marginInlineSet);
+        foPropertyLists[FObjectNames.EXTERNAL_GRAPHIC].
+                            addAll(PropertySets.paddingSet);
+        foPropertyLists[FObjectNames.EXTERNAL_GRAPHIC].
+                            addAll(PropertySets.relativePositionSet);
+        foPropertyLists[FObjectNames.EXTERNAL_GRAPHIC].
+                        add(Ints.consts.get(PropNames.ALIGNMENT_ADJUST));
+        foPropertyLists[FObjectNames.EXTERNAL_GRAPHIC].
+                        add(Ints.consts.get(PropNames.ALIGNMENT_BASELINE));
+        foPropertyLists[FObjectNames.EXTERNAL_GRAPHIC].
+                        add(Ints.consts.get(PropNames.BASELINE_SHIFT));
+        foPropertyLists[FObjectNames.EXTERNAL_GRAPHIC].
+                add(Ints.consts.get(PropNames.BLOCK_PROGRESSION_DIMENSION));
+        foPropertyLists[FObjectNames.EXTERNAL_GRAPHIC].
+                        add(Ints.consts.get(PropNames.CLIP));
+        foPropertyLists[FObjectNames.EXTERNAL_GRAPHIC].
+                        add(Ints.consts.get(PropNames.CONTENT_HEIGHT));
+        foPropertyLists[FObjectNames.EXTERNAL_GRAPHIC].
+                        add(Ints.consts.get(PropNames.CONTENT_TYPE));
+        foPropertyLists[FObjectNames.EXTERNAL_GRAPHIC].
+                        add(Ints.consts.get(PropNames.CONTENT_WIDTH));
+        foPropertyLists[FObjectNames.EXTERNAL_GRAPHIC].
+                        add(Ints.consts.get(PropNames.DISPLAY_ALIGN));
+        foPropertyLists[FObjectNames.EXTERNAL_GRAPHIC].
+                        add(Ints.consts.get(PropNames.DOMINANT_BASELINE));
+        foPropertyLists[FObjectNames.EXTERNAL_GRAPHIC].
+                        add(Ints.consts.get(PropNames.HEIGHT));
+        foPropertyLists[FObjectNames.EXTERNAL_GRAPHIC].
+                        add(Ints.consts.get(PropNames.ID));
+        foPropertyLists[FObjectNames.EXTERNAL_GRAPHIC].
+                add(Ints.consts.get(PropNames.INLINE_PROGRESSION_DIMENSION));
+        foPropertyLists[FObjectNames.EXTERNAL_GRAPHIC].
+                        add(Ints.consts.get(PropNames.KEEP_WITH_NEXT));
+        foPropertyLists[FObjectNames.EXTERNAL_GRAPHIC].
+                        add(Ints.consts.get(PropNames.KEEP_WITH_PREVIOUS));
+        foPropertyLists[FObjectNames.EXTERNAL_GRAPHIC].
+                        add(Ints.consts.get(PropNames.LINE_HEIGHT));
+        foPropertyLists[FObjectNames.EXTERNAL_GRAPHIC].
+                        add(Ints.consts.get(PropNames.OVERFLOW));
+        foPropertyLists[FObjectNames.EXTERNAL_GRAPHIC].
+                        add(Ints.consts.get(PropNames.SCALING));
+        foPropertyLists[FObjectNames.EXTERNAL_GRAPHIC].
+                        add(Ints.consts.get(PropNames.SCALING_METHOD));
+        foPropertyLists[FObjectNames.EXTERNAL_GRAPHIC].
+                        add(Ints.consts.get(PropNames.SRC));
+        foPropertyLists[FObjectNames.EXTERNAL_GRAPHIC].
+                        add(Ints.consts.get(PropNames.TEXT_ALIGN));
+        foPropertyLists[FObjectNames.EXTERNAL_GRAPHIC].
+                        add(Ints.consts.get(PropNames.WIDTH));
+
+        //float
+        foPropertyLists[FObjectNames.FLOAT] = new HashSet(2);
+        foPropertyLists[FObjectNames.FLOAT].
+                        add(Ints.consts.get(PropNames.CLEAR));
+        foPropertyLists[FObjectNames.FLOAT].
+                        add(Ints.consts.get(PropNames.FLOAT));
+
+        //flow
+        foPropertyLists[FObjectNames.FLOW] = new HashSet(1);
+        foPropertyLists[FObjectNames.FLOW].
+                        add(Ints.consts.get(PropNames.FLOW_NAME));
+
+        //footnote
+        foPropertyLists[FObjectNames.FOOTNOTE] = new HashSet(
+                                PropertySets.accessibilityPropsSize);
+        foPropertyLists[FObjectNames.FOOTNOTE].
+                            addAll(PropertySets.accessibilitySet);
+
+        //footnote-body
+        foPropertyLists[FObjectNames.FOOTNOTE_BODY] = new HashSet(
+                                PropertySets.accessibilityPropsSize);
+        foPropertyLists[FObjectNames.FOOTNOTE_BODY].
+                            addAll(PropertySets.accessibilitySet);
+
+        //initial-property-set
+        foPropertyLists[FObjectNames.INITIAL_PROPERTY_SET] = new HashSet(
+                                PropertySets.accessibilityPropsSize +
+                                PropertySets.auralPropsSize +
+                                PropertySets.backgroundPropsSize +
+                                PropertySets.borderPropsSize +
+                                PropertySets.fontPropsSize +
+                                PropertySets.paddingPropsSize +
+                                PropertySets.relativePositionPropsSize +
+                                1);
+        foPropertyLists[FObjectNames.INITIAL_PROPERTY_SET].
+                            addAll(PropertySets.accessibilitySet);
+        foPropertyLists[FObjectNames.INITIAL_PROPERTY_SET].
+                            addAll(PropertySets.auralSet);
+        foPropertyLists[FObjectNames.INITIAL_PROPERTY_SET].
+                            addAll(PropertySets.backgroundSet);
+        foPropertyLists[FObjectNames.INITIAL_PROPERTY_SET].
+                            addAll(PropertySets.borderSet);
+        foPropertyLists[FObjectNames.INITIAL_PROPERTY_SET].
+                            addAll(PropertySets.fontSet);
+        foPropertyLists[FObjectNames.INITIAL_PROPERTY_SET].
+                            addAll(PropertySets.paddingSet);
+        foPropertyLists[FObjectNames.INITIAL_PROPERTY_SET].
+                            addAll(PropertySets.relativePositionSet);
+        foPropertyLists[FObjectNames.INITIAL_PROPERTY_SET].
+                        add(Ints.consts.get(PropNames.COLOR));
+        foPropertyLists[FObjectNames.INITIAL_PROPERTY_SET].
+                        add(Ints.consts.get(PropNames.ID));
+        foPropertyLists[FObjectNames.INITIAL_PROPERTY_SET].
+                        add(Ints.consts.get(PropNames.LETTER_SPACING));
+        foPropertyLists[FObjectNames.INITIAL_PROPERTY_SET].
+                        add(Ints.consts.get(PropNames.LINE_HEIGHT));
+        foPropertyLists[FObjectNames.INITIAL_PROPERTY_SET].
+                        add(Ints.consts.get(PropNames.SCORE_SPACES));
+        foPropertyLists[FObjectNames.INITIAL_PROPERTY_SET].
+                        add(Ints.consts.get(PropNames.TEXT_DECORATION));
+        foPropertyLists[FObjectNames.INITIAL_PROPERTY_SET].
+                        add(Ints.consts.get(PropNames.TEXT_SHADOW));
+        foPropertyLists[FObjectNames.INITIAL_PROPERTY_SET].
+                        add(Ints.consts.get(PropNames.TEXT_TRANSFORM));
+        foPropertyLists[FObjectNames.INITIAL_PROPERTY_SET].
+                        add(Ints.consts.get(PropNames.WORD_SPACING));
+
+        //inline
+        foPropertyLists[FObjectNames.INLINE] = new HashSet(
+                                PropertySets.accessibilityPropsSize +
+                                PropertySets.auralPropsSize +
+                                PropertySets.backgroundPropsSize +
+                                PropertySets.borderPropsSize +
+                                PropertySets.fontPropsSize +
+                                PropertySets.marginInlinePropsSize +
+                                PropertySets.paddingPropsSize +
+                                PropertySets.relativePositionPropsSize +
+                                17);
+        foPropertyLists[FObjectNames.INLINE].
+                            addAll(PropertySets.accessibilitySet);
+        foPropertyLists[FObjectNames.INLINE].
+                            addAll(PropertySets.auralSet);
+        foPropertyLists[FObjectNames.INLINE].
+                            addAll(PropertySets.backgroundSet);
+        foPropertyLists[FObjectNames.INLINE].
+                            addAll(PropertySets.borderSet);
+        foPropertyLists[FObjectNames.INLINE].
+                            addAll(PropertySets.fontSet);
+        foPropertyLists[FObjectNames.INLINE].
+                            addAll(PropertySets.marginInlineSet);
+        foPropertyLists[FObjectNames.INLINE].
+                            addAll(PropertySets.paddingSet);
+        foPropertyLists[FObjectNames.INLINE].
+                            addAll(PropertySets.relativePositionSet);
+        foPropertyLists[FObjectNames.INLINE].
+                        add(Ints.consts.get(PropNames.ALIGNMENT_ADJUST));
+        foPropertyLists[FObjectNames.INLINE].
+                        add(Ints.consts.get(PropNames.ALIGNMENT_BASELINE));
+        foPropertyLists[FObjectNames.INLINE].
+                        add(Ints.consts.get(PropNames.BASELINE_SHIFT));
+        foPropertyLists[FObjectNames.INLINE].
+                    add(Ints.consts.get(PropNames.BLOCK_PROGRESSION_DIMENSION));
+        foPropertyLists[FObjectNames.INLINE].
+                        add(Ints.consts.get(PropNames.COLOR));
+        foPropertyLists[FObjectNames.INLINE].
+                        add(Ints.consts.get(PropNames.DOMINANT_BASELINE));
+        foPropertyLists[FObjectNames.INLINE].
+                        add(Ints.consts.get(PropNames.HEIGHT));
+        foPropertyLists[FObjectNames.INLINE].
+                        add(Ints.consts.get(PropNames.ID));
+        foPropertyLists[FObjectNames.INLINE].
+                    add(Ints.consts.get(PropNames.INLINE_PROGRESSION_DIMENSION));
+        foPropertyLists[FObjectNames.INLINE].
+                        add(Ints.consts.get(PropNames.KEEP_TOGETHER));
+        foPropertyLists[FObjectNames.INLINE].
+                        add(Ints.consts.get(PropNames.KEEP_WITH_NEXT));
+        foPropertyLists[FObjectNames.INLINE].
+                        add(Ints.consts.get(PropNames.KEEP_WITH_PREVIOUS));
+        foPropertyLists[FObjectNames.INLINE].
+                        add(Ints.consts.get(PropNames.LINE_HEIGHT));
+        foPropertyLists[FObjectNames.INLINE].
+                        add(Ints.consts.get(PropNames.TEXT_DECORATION));
+        foPropertyLists[FObjectNames.INLINE].
+                        add(Ints.consts.get(PropNames.VISIBILITY));
+        foPropertyLists[FObjectNames.INLINE].
+                        add(Ints.consts.get(PropNames.WIDTH));
+        foPropertyLists[FObjectNames.INLINE].
+                        add(Ints.consts.get(PropNames.WRAP_OPTION));
+
+        //inline-container
+        foPropertyLists[FObjectNames.INLINE_CONTAINER] = new HashSet(
+                                PropertySets.backgroundPropsSize +
+                                PropertySets.borderPropsSize +
+                                PropertySets.marginInlinePropsSize +
+                                PropertySets.paddingPropsSize +
+                                PropertySets.relativePositionPropsSize +
+                                18);
+        foPropertyLists[FObjectNames.INLINE_CONTAINER].
+                            addAll(PropertySets.backgroundSet);
+        foPropertyLists[FObjectNames.INLINE_CONTAINER].
+                            addAll(PropertySets.borderSet);
+        foPropertyLists[FObjectNames.INLINE_CONTAINER].
+                            addAll(PropertySets.marginInlineSet);
+        foPropertyLists[FObjectNames.INLINE_CONTAINER].
+                            addAll(PropertySets.paddingSet);
+        foPropertyLists[FObjectNames.INLINE_CONTAINER].
+                            addAll(PropertySets.relativePositionSet);
+        foPropertyLists[FObjectNames.INLINE_CONTAINER].
+                        add(Ints.consts.get(PropNames.ALIGNMENT_ADJUST));
+        foPropertyLists[FObjectNames.INLINE_CONTAINER].
+                        add(Ints.consts.get(PropNames.ALIGNMENT_BASELINE));
+        foPropertyLists[FObjectNames.INLINE_CONTAINER].
+                        add(Ints.consts.get(PropNames.BASELINE_SHIFT));
+        foPropertyLists[FObjectNames.INLINE_CONTAINER].
+                    add(Ints.consts.get(PropNames.BLOCK_PROGRESSION_DIMENSION));
+        foPropertyLists[FObjectNames.INLINE_CONTAINER].
+                        add(Ints.consts.get(PropNames.CLIP));
+        foPropertyLists[FObjectNames.INLINE_CONTAINER].
+                        add(Ints.consts.get(PropNames.DISPLAY_ALIGN));
+        foPropertyLists[FObjectNames.INLINE_CONTAINER].
+                        add(Ints.consts.get(PropNames.DOMINANT_BASELINE));
+        foPropertyLists[FObjectNames.INLINE_CONTAINER].
+                        add(Ints.consts.get(PropNames.HEIGHT));
+        foPropertyLists[FObjectNames.INLINE_CONTAINER].
+                        add(Ints.consts.get(PropNames.ID));
+        foPropertyLists[FObjectNames.INLINE_CONTAINER].
+                    add(Ints.consts.get(PropNames.INLINE_PROGRESSION_DIMENSION));
+        foPropertyLists[FObjectNames.INLINE_CONTAINER].
+                        add(Ints.consts.get(PropNames.KEEP_TOGETHER));
+        foPropertyLists[FObjectNames.INLINE_CONTAINER].
+                        add(Ints.consts.get(PropNames.KEEP_WITH_NEXT));
+        foPropertyLists[FObjectNames.INLINE_CONTAINER].
+                        add(Ints.consts.get(PropNames.KEEP_WITH_PREVIOUS));
+        foPropertyLists[FObjectNames.INLINE_CONTAINER].
+                        add(Ints.consts.get(PropNames.LINE_HEIGHT));
+        foPropertyLists[FObjectNames.INLINE_CONTAINER].
+                        add(Ints.consts.get(PropNames.OVERFLOW));
+        foPropertyLists[FObjectNames.INLINE_CONTAINER].
+                        add(Ints.consts.get(PropNames.REFERENCE_ORIENTATION));
+        foPropertyLists[FObjectNames.INLINE_CONTAINER].
+                        add(Ints.consts.get(PropNames.WIDTH));
+        foPropertyLists[FObjectNames.INLINE_CONTAINER].
+                        add(Ints.consts.get(PropNames.WRITING_MODE));
+
+
+        //instream-foreign-object
+        foPropertyLists[FObjectNames.INSTREAM_FOREIGN_OBJECT] = new HashSet(
+                                PropertySets.accessibilityPropsSize +
+                                PropertySets.auralPropsSize +
+                                PropertySets.backgroundPropsSize +
+                                PropertySets.borderPropsSize +
+                                PropertySets.marginInlinePropsSize +
+                                PropertySets.paddingPropsSize +
+                                PropertySets.relativePositionPropsSize +
+                                21);
+        foPropertyLists[FObjectNames.INSTREAM_FOREIGN_OBJECT].
+                            addAll(PropertySets.accessibilitySet);
+        foPropertyLists[FObjectNames.INSTREAM_FOREIGN_OBJECT].
+                            addAll(PropertySets.auralSet);
+        foPropertyLists[FObjectNames.INSTREAM_FOREIGN_OBJECT].
+                            addAll(PropertySets.backgroundSet);
+        foPropertyLists[FObjectNames.INSTREAM_FOREIGN_OBJECT].
+                            addAll(PropertySets.borderSet);
+        foPropertyLists[FObjectNames.INSTREAM_FOREIGN_OBJECT].
+                            addAll(PropertySets.marginInlineSet);
+        foPropertyLists[FObjectNames.INSTREAM_FOREIGN_OBJECT].
+                            addAll(PropertySets.paddingSet);
+        foPropertyLists[FObjectNames.INSTREAM_FOREIGN_OBJECT].
+                            addAll(PropertySets.relativePositionSet);
+        foPropertyLists[FObjectNames.INSTREAM_FOREIGN_OBJECT].
+                        add(Ints.consts.get(PropNames.ALIGNMENT_ADJUST));
+        foPropertyLists[FObjectNames.INSTREAM_FOREIGN_OBJECT].
+                        add(Ints.consts.get(PropNames.ALIGNMENT_BASELINE));
+        foPropertyLists[FObjectNames.INSTREAM_FOREIGN_OBJECT].
+                        add(Ints.consts.get(PropNames.BASELINE_SHIFT));
+        foPropertyLists[FObjectNames.INSTREAM_FOREIGN_OBJECT].
+                    add(Ints.consts.get(PropNames.BLOCK_PROGRESSION_DIMENSION));
+        foPropertyLists[FObjectNames.INSTREAM_FOREIGN_OBJECT].
+                        add(Ints.consts.get(PropNames.CLIP));
+        foPropertyLists[FObjectNames.INSTREAM_FOREIGN_OBJECT].
+                        add(Ints.consts.get(PropNames.CONTENT_HEIGHT));
+        foPropertyLists[FObjectNames.INSTREAM_FOREIGN_OBJECT].
+                        add(Ints.consts.get(PropNames.CONTENT_TYPE));
+        foPropertyLists[FObjectNames.INSTREAM_FOREIGN_OBJECT].
+                        add(Ints.consts.get(PropNames.CONTENT_WIDTH));
+        foPropertyLists[FObjectNames.INSTREAM_FOREIGN_OBJECT].
+                        add(Ints.consts.get(PropNames.DISPLAY_ALIGN));
+        foPropertyLists[FObjectNames.INSTREAM_FOREIGN_OBJECT].
+                        add(Ints.consts.get(PropNames.DOMINANT_BASELINE));
+        foPropertyLists[FObjectNames.INSTREAM_FOREIGN_OBJECT].
+                        add(Ints.consts.get(PropNames.HEIGHT));
+        foPropertyLists[FObjectNames.INSTREAM_FOREIGN_OBJECT].
+                        add(Ints.consts.get(PropNames.ID));
+        foPropertyLists[FObjectNames.INSTREAM_FOREIGN_OBJECT].
+                    add(Ints.consts.get(PropNames.INLINE_PROGRESSION_DIMENSION));
+        foPropertyLists[FObjectNames.INSTREAM_FOREIGN_OBJECT].
+                        add(Ints.consts.get(PropNames.KEEP_WITH_NEXT));
+        foPropertyLists[FObjectNames.INSTREAM_FOREIGN_OBJECT].
+                        add(Ints.consts.get(PropNames.KEEP_WITH_PREVIOUS));
+        foPropertyLists[FObjectNames.INSTREAM_FOREIGN_OBJECT].
+                        add(Ints.consts.get(PropNames.LINE_HEIGHT));
+        foPropertyLists[FObjectNames.INSTREAM_FOREIGN_OBJECT].
+                        add(Ints.consts.get(PropNames.OVERFLOW));
+        foPropertyLists[FObjectNames.INSTREAM_FOREIGN_OBJECT].
+                        add(Ints.consts.get(PropNames.SCALING));
+        foPropertyLists[FObjectNames.INSTREAM_FOREIGN_OBJECT].
+                        add(Ints.consts.get(PropNames.SCALING_METHOD));
+        foPropertyLists[FObjectNames.INSTREAM_FOREIGN_OBJECT].
+                        add(Ints.consts.get(PropNames.TEXT_ALIGN));
+        foPropertyLists[FObjectNames.INSTREAM_FOREIGN_OBJECT].
+                        add(Ints.consts.get(PropNames.WIDTH));
+
+        //layout-master-set
+        foPropertyLists[FObjectNames.LAYOUT_MASTER_SET] = null;
+
+        //leader
+        foPropertyLists[FObjectNames.LEADER] = new HashSet(
+                                PropertySets.accessibilityPropsSize +
+                                PropertySets.auralPropsSize +
+                                PropertySets.backgroundPropsSize +
+                                PropertySets.borderPropsSize +
+                                PropertySets.fontPropsSize +
+                                PropertySets.marginInlinePropsSize +
+                                PropertySets.paddingPropsSize +
+                                PropertySets.relativePositionPropsSize +
+                                21);
+        foPropertyLists[FObjectNames.LEADER].
+                            addAll(PropertySets.accessibilitySet);
+        foPropertyLists[FObjectNames.LEADER].
+                            addAll(PropertySets.auralSet);
+        foPropertyLists[FObjectNames.LEADER].
+                            addAll(PropertySets.backgroundSet);
+        foPropertyLists[FObjectNames.LEADER].
+                            addAll(PropertySets.borderSet);
+        foPropertyLists[FObjectNames.LEADER].
+                            addAll(PropertySets.fontSet);
+        foPropertyLists[FObjectNames.LEADER].
+                            addAll(PropertySets.marginInlineSet);
+        foPropertyLists[FObjectNames.LEADER].
+                            addAll(PropertySets.paddingSet);
+        foPropertyLists[FObjectNames.LEADER].
+                            addAll(PropertySets.relativePositionSet);
+        foPropertyLists[FObjectNames.LEADER].
+                        add(Ints.consts.get(PropNames.ALIGNMENT_ADJUST));
+        foPropertyLists[FObjectNames.LEADER].
+                        add(Ints.consts.get(PropNames.ALIGNMENT_BASELINE));
+        foPropertyLists[FObjectNames.LEADER].
+                        add(Ints.consts.get(PropNames.BASELINE_SHIFT));
+        foPropertyLists[FObjectNames.LEADER].
+                        add(Ints.consts.get(PropNames.COLOR));
+        foPropertyLists[FObjectNames.LEADER].
+                        add(Ints.consts.get(PropNames.DOMINANT_BASELINE));
+        foPropertyLists[FObjectNames.LEADER].
+                        add(Ints.consts.get(PropNames.TEXT_DEPTH));
+        foPropertyLists[FObjectNames.LEADER].
+                        add(Ints.consts.get(PropNames.TEXT_ALTITUDE));
+        foPropertyLists[FObjectNames.LEADER].
+                        add(Ints.consts.get(PropNames.ID));
+        foPropertyLists[FObjectNames.LEADER].
+                        add(Ints.consts.get(PropNames.KEEP_WITH_NEXT));
+        foPropertyLists[FObjectNames.LEADER].
+                        add(Ints.consts.get(PropNames.KEEP_WITH_PREVIOUS));
+        foPropertyLists[FObjectNames.LEADER].
+                        add(Ints.consts.get(PropNames.LEADER_ALIGNMENT));
+        foPropertyLists[FObjectNames.LEADER].
+                        add(Ints.consts.get(PropNames.LEADER_LENGTH));
+        foPropertyLists[FObjectNames.LEADER].
+                        add(Ints.consts.get(PropNames.LEADER_PATTERN));
+        foPropertyLists[FObjectNames.LEADER].
+                        add(Ints.consts.get(PropNames.LEADER_PATTERN_WIDTH));
+        foPropertyLists[FObjectNames.LEADER].
+                        add(Ints.consts.get(PropNames.RULE_STYLE));
+        foPropertyLists[FObjectNames.LEADER].
+                        add(Ints.consts.get(PropNames.RULE_THICKNESS));
+        foPropertyLists[FObjectNames.LEADER].
+                        add(Ints.consts.get(PropNames.LETTER_SPACING));
+        foPropertyLists[FObjectNames.LEADER].
+                        add(Ints.consts.get(PropNames.LINE_HEIGHT));
+        foPropertyLists[FObjectNames.LEADER].
+                        add(Ints.consts.get(PropNames.TEXT_SHADOW));
+        foPropertyLists[FObjectNames.LEADER].
+                        add(Ints.consts.get(PropNames.VISIBILITY));
+        foPropertyLists[FObjectNames.LEADER].
+                        add(Ints.consts.get(PropNames.WORD_SPACING));
+
+        //list-block
+        foPropertyLists[FObjectNames.LIST_BLOCK] = new HashSet(
+                                PropertySets.accessibilityPropsSize +
+                                PropertySets.auralPropsSize +
+                                PropertySets.backgroundPropsSize +
+                                PropertySets.borderPropsSize +
+                                PropertySets.marginBlockPropsSize +
+                                PropertySets.paddingPropsSize +
+                                PropertySets.relativePositionPropsSize +
+                                9);
+        foPropertyLists[FObjectNames.LIST_BLOCK].
+                            addAll(PropertySets.accessibilitySet);
+        foPropertyLists[FObjectNames.LIST_BLOCK].
+                            addAll(PropertySets.auralSet);
+        foPropertyLists[FObjectNames.LIST_BLOCK].
+                            addAll(PropertySets.backgroundSet);
+        foPropertyLists[FObjectNames.LIST_BLOCK].
+                            addAll(PropertySets.borderSet);
+        foPropertyLists[FObjectNames.LIST_BLOCK].
+                            addAll(PropertySets.marginBlockSet);
+        foPropertyLists[FObjectNames.LIST_BLOCK].
+                            addAll(PropertySets.paddingSet);
+        foPropertyLists[FObjectNames.LIST_BLOCK].
+                            addAll(PropertySets.relativePositionSet);
+        foPropertyLists[FObjectNames.LIST_BLOCK].
+                        add(Ints.consts.get(PropNames.BREAK_AFTER));
+        foPropertyLists[FObjectNames.LIST_BLOCK].
+                        add(Ints.consts.get(PropNames.BREAK_BEFORE));
+        foPropertyLists[FObjectNames.LIST_BLOCK].
+                        add(Ints.consts.get(PropNames.ID));
+        foPropertyLists[FObjectNames.LIST_BLOCK].
+                        add(Ints.consts.get(PropNames.INTRUSION_DISPLACE));
+        foPropertyLists[FObjectNames.LIST_BLOCK].
+                        add(Ints.consts.get(PropNames.KEEP_TOGETHER));
+        foPropertyLists[FObjectNames.LIST_BLOCK].
+                        add(Ints.consts.get(PropNames.KEEP_WITH_NEXT));
+        foPropertyLists[FObjectNames.LIST_BLOCK].
+                        add(Ints.consts.get(PropNames.KEEP_WITH_PREVIOUS));
+        foPropertyLists[FObjectNames.LIST_BLOCK].
+            add(Ints.consts.get(PropNames.PROVISIONAL_DISTANCE_BETWEEN_STARTS));
+        foPropertyLists[FObjectNames.LIST_BLOCK].
+                    add(Ints.consts.get(PropNames.PROVISIONAL_LABEL_SEPARATION));
+
+        //list-item
+        foPropertyLists[FObjectNames.LIST_ITEM] = new HashSet(
+                                PropertySets.accessibilityPropsSize +
+                                PropertySets.auralPropsSize +
+                                PropertySets.backgroundPropsSize +
+                                PropertySets.borderPropsSize +
+                                PropertySets.marginBlockPropsSize +
+                                PropertySets.paddingPropsSize +
+                                PropertySets.relativePositionPropsSize +
+                                8);
+        foPropertyLists[FObjectNames.LIST_ITEM].
+                            addAll(PropertySets.accessibilitySet);
+        foPropertyLists[FObjectNames.LIST_ITEM].
+                            addAll(PropertySets.auralSet);
+        foPropertyLists[FObjectNames.LIST_ITEM].
+                            addAll(PropertySets.backgroundSet);
+        foPropertyLists[FObjectNames.LIST_ITEM].
+                            addAll(PropertySets.borderSet);
+        foPropertyLists[FObjectNames.LIST_ITEM].
+                            addAll(PropertySets.marginBlockSet);
+        foPropertyLists[FObjectNames.LIST_ITEM].
+                            addAll(PropertySets.paddingSet);
+        foPropertyLists[FObjectNames.LIST_ITEM].
+                            addAll(PropertySets.relativePositionSet);
+        foPropertyLists[FObjectNames.LIST_ITEM].
+                        add(Ints.consts.get(PropNames.BREAK_AFTER));
+        foPropertyLists[FObjectNames.LIST_ITEM].
+                        add(Ints.consts.get(PropNames.BREAK_BEFORE));
+        foPropertyLists[FObjectNames.LIST_ITEM].
+                        add(Ints.consts.get(PropNames.ID));
+        foPropertyLists[FObjectNames.LIST_ITEM].
+                        add(Ints.consts.get(PropNames.INTRUSION_DISPLACE));
+        foPropertyLists[FObjectNames.LIST_ITEM].
+                        add(Ints.consts.get(PropNames.KEEP_TOGETHER));
+        foPropertyLists[FObjectNames.LIST_ITEM].
+                        add(Ints.consts.get(PropNames.KEEP_WITH_NEXT));
+        foPropertyLists[FObjectNames.LIST_ITEM].
+                        add(Ints.consts.get(PropNames.KEEP_WITH_PREVIOUS));
+        foPropertyLists[FObjectNames.LIST_ITEM].
+                        add(Ints.consts.get(PropNames.RELATIVE_ALIGN));
+
+        //list-item-body
+        foPropertyLists[FObjectNames.LIST_ITEM_BODY] = new HashSet(
+                                PropertySets.accessibilityPropsSize +
+                                2);
+        foPropertyLists[FObjectNames.LIST_ITEM_BODY].
+                            addAll(PropertySets.accessibilitySet);
+        foPropertyLists[FObjectNames.LIST_ITEM_BODY].
+                        add(Ints.consts.get(PropNames.ID));
+        foPropertyLists[FObjectNames.LIST_ITEM_BODY].
+                        add(Ints.consts.get(PropNames.KEEP_TOGETHER));
+
+        //list-item-label
+        foPropertyLists[FObjectNames.LIST_ITEM_LABEL] = new HashSet(
+                                PropertySets.accessibilityPropsSize +
+                                2);
+        foPropertyLists[FObjectNames.LIST_ITEM_LABEL].
+                            addAll(PropertySets.accessibilitySet);
+        foPropertyLists[FObjectNames.LIST_ITEM_LABEL].
+                        add(Ints.consts.get(PropNames.ID));
+        foPropertyLists[FObjectNames.LIST_ITEM_LABEL].
+                        add(Ints.consts.get(PropNames.KEEP_TOGETHER));
+
+        //marker
+        foPropertyLists[FObjectNames.MARKER] = new HashSet(1);
+        foPropertyLists[FObjectNames.MARKER].
+                        add(Ints.consts.get(PropNames.MARKER_CLASS_NAME));
+
+        //multi-case
+        foPropertyLists[FObjectNames.MULTI_CASE] = new HashSet(
+                                PropertySets.accessibilityPropsSize +
+                                4);
+        foPropertyLists[FObjectNames.MULTI_CASE].
+                            addAll(PropertySets.accessibilitySet);
+        foPropertyLists[FObjectNames.MULTI_CASE].
+                        add(Ints.consts.get(PropNames.CASE_NAME));
+        foPropertyLists[FObjectNames.MULTI_CASE].
+                        add(Ints.consts.get(PropNames.CASE_TITLE));
+        foPropertyLists[FObjectNames.MULTI_CASE].
+                        add(Ints.consts.get(PropNames.ID));
+        foPropertyLists[FObjectNames.MULTI_CASE].
+                        add(Ints.consts.get(PropNames.STARTING_STATE));
+
+        //multi-properties
+        foPropertyLists[FObjectNames.MULTI_PROPERTIES]
+                = new HashSet(FObjectNames.LAST_FO + 1);
+        foPropertyLists[FObjectNames.MULTI_PROPERTIES] = new HashSet(
+                                PropertySets.accessibilityPropsSize +
+                                1);
+        foPropertyLists[FObjectNames.MULTI_PROPERTIES].
+                            addAll(PropertySets.accessibilitySet);
+        foPropertyLists[FObjectNames.MULTI_PROPERTIES].
+                        add(Ints.consts.get(PropNames.ID));
+
+        //multi-property-set
+        foPropertyLists[FObjectNames.MULTI_PROPERTY_SET] = new HashSet(2);
+        foPropertyLists[FObjectNames.MULTI_PROPERTIES].
+                        add(Ints.consts.get(PropNames.ACTIVE_STATE));
+        foPropertyLists[FObjectNames.MULTI_PROPERTIES].
+                        add(Ints.consts.get(PropNames.ID));
+
+        //multi-switch
+        foPropertyLists[FObjectNames.MULTI_SWITCH] = new HashSet(
+                                PropertySets.accessibilityPropsSize +
+                                2);
+        foPropertyLists[FObjectNames.MULTI_SWITCH].
+                            addAll(PropertySets.accessibilitySet);
+        foPropertyLists[FObjectNames.MULTI_SWITCH].
+                        add(Ints.consts.get(PropNames.AUTO_RESTORE));
+        foPropertyLists[FObjectNames.MULTI_SWITCH].
+                        add(Ints.consts.get(PropNames.ID));
+
+        //multi-toggle
+        foPropertyLists[FObjectNames.MULTI_TOGGLE] = new HashSet(
+                                PropertySets.accessibilityPropsSize +
+                                2);
+        foPropertyLists[FObjectNames.MULTI_TOGGLE].
+                            addAll(PropertySets.accessibilitySet);
+        foPropertyLists[FObjectNames.MULTI_TOGGLE].
+                        add(Ints.consts.get(PropNames.ID));
+        foPropertyLists[FObjectNames.MULTI_TOGGLE].
+                        add(Ints.consts.get(PropNames.SWITCH_TO));
+
+        //page-number
+        foPropertyLists[FObjectNames.PAGE_NUMBER] = new HashSet(
+                                PropertySets.accessibilityPropsSize +
+                                PropertySets.auralPropsSize +
+                                PropertySets.backgroundPropsSize +
+                                PropertySets.borderPropsSize +
+                                PropertySets.fontPropsSize +
+                                PropertySets.marginInlinePropsSize +
+                                PropertySets.paddingPropsSize +
+                                PropertySets.relativePositionPropsSize +
+                                18);
+        foPropertyLists[FObjectNames.PAGE_NUMBER].
+                            addAll(PropertySets.accessibilitySet);
+        foPropertyLists[FObjectNames.PAGE_NUMBER].
+                            addAll(PropertySets.auralSet);
+        foPropertyLists[FObjectNames.PAGE_NUMBER].
+                            addAll(PropertySets.backgroundSet);
+        foPropertyLists[FObjectNames.PAGE_NUMBER].
+                            addAll(PropertySets.borderSet);
+        foPropertyLists[FObjectNames.PAGE_NUMBER].
+                            addAll(PropertySets.fontSet);
+        foPropertyLists[FObjectNames.PAGE_NUMBER].
+                            addAll(PropertySets.marginInlineSet);
+        foPropertyLists[FObjectNames.PAGE_NUMBER].
+                            addAll(PropertySets.paddingSet);
+        foPropertyLists[FObjectNames.PAGE_NUMBER].
+                            addAll(PropertySets.relativePositionSet);
+        foPropertyLists[FObjectNames.PAGE_NUMBER].
+                        add(Ints.consts.get(PropNames.ALIGNMENT_ADJUST));
+        foPropertyLists[FObjectNames.PAGE_NUMBER].
+                        add(Ints.consts.get(PropNames.ALIGNMENT_BASELINE));
+        foPropertyLists[FObjectNames.PAGE_NUMBER].
+                        add(Ints.consts.get(PropNames.BASELINE_SHIFT));
+        foPropertyLists[FObjectNames.PAGE_NUMBER].
+                        add(Ints.consts.get(PropNames.DOMINANT_BASELINE));
+        foPropertyLists[FObjectNames.PAGE_NUMBER].
+                        add(Ints.consts.get(PropNames.ID));
+        foPropertyLists[FObjectNames.PAGE_NUMBER].
+                        add(Ints.consts.get(PropNames.KEEP_WITH_NEXT));
+        foPropertyLists[FObjectNames.PAGE_NUMBER].
+                        add(Ints.consts.get(PropNames.KEEP_WITH_PREVIOUS));
+        foPropertyLists[FObjectNames.PAGE_NUMBER].
+                        add(Ints.consts.get(PropNames.LETTER_SPACING));
+        foPropertyLists[FObjectNames.PAGE_NUMBER].
+                        add(Ints.consts.get(PropNames.LINE_HEIGHT));
+        foPropertyLists[FObjectNames.PAGE_NUMBER].
+                        add(Ints.consts.get(PropNames.SCORE_SPACES));
+        foPropertyLists[FObjectNames.PAGE_NUMBER].
+                        add(Ints.consts.get(PropNames.TEXT_ALTITUDE));
+        foPropertyLists[FObjectNames.PAGE_NUMBER].
+                        add(Ints.consts.get(PropNames.TEXT_DECORATION));
+        foPropertyLists[FObjectNames.PAGE_NUMBER].
+                        add(Ints.consts.get(PropNames.TEXT_DEPTH));
+        foPropertyLists[FObjectNames.PAGE_NUMBER].
+                        add(Ints.consts.get(PropNames.TEXT_SHADOW));
+        foPropertyLists[FObjectNames.PAGE_NUMBER].
+                        add(Ints.consts.get(PropNames.TEXT_TRANSFORM));
+        foPropertyLists[FObjectNames.PAGE_NUMBER].
+                        add(Ints.consts.get(PropNames.VISIBILITY));
+        foPropertyLists[FObjectNames.PAGE_NUMBER].
+                        add(Ints.consts.get(PropNames.WORD_SPACING));
+        foPropertyLists[FObjectNames.PAGE_NUMBER].
+                        add(Ints.consts.get(PropNames.WRAP_OPTION));
+
+        //page-number-citation
+        foPropertyLists[FObjectNames.PAGE_NUMBER_CITATION] = new HashSet(
+                                PropertySets.accessibilityPropsSize +
+                                PropertySets.auralPropsSize +
+                                PropertySets.backgroundPropsSize +
+                                PropertySets.borderPropsSize +
+                                PropertySets.fontPropsSize +
+                                PropertySets.marginInlinePropsSize +
+                                PropertySets.paddingPropsSize +
+                                PropertySets.relativePositionPropsSize +
+                                19);
+        foPropertyLists[FObjectNames.PAGE_NUMBER_CITATION].
+                            addAll(PropertySets.accessibilitySet);
+        foPropertyLists[FObjectNames.PAGE_NUMBER_CITATION].
+                            addAll(PropertySets.auralSet);
+        foPropertyLists[FObjectNames.PAGE_NUMBER_CITATION].
+                            addAll(PropertySets.backgroundSet);
+        foPropertyLists[FObjectNames.PAGE_NUMBER_CITATION].
+                            addAll(PropertySets.borderSet);
+        foPropertyLists[FObjectNames.PAGE_NUMBER_CITATION].
+                            addAll(PropertySets.fontSet);
+        foPropertyLists[FObjectNames.PAGE_NUMBER_CITATION].
+                            addAll(PropertySets.marginInlineSet);
+        foPropertyLists[FObjectNames.PAGE_NUMBER_CITATION].
+                            addAll(PropertySets.paddingSet);
+        foPropertyLists[FObjectNames.PAGE_NUMBER_CITATION].
+                            addAll(PropertySets.relativePositionSet);
+        foPropertyLists[FObjectNames.PAGE_NUMBER_CITATION].
+                        add(Ints.consts.get(PropNames.ALIGNMENT_ADJUST));
+        foPropertyLists[FObjectNames.PAGE_NUMBER_CITATION].
+                        add(Ints.consts.get(PropNames.ALIGNMENT_BASELINE));
+        foPropertyLists[FObjectNames.PAGE_NUMBER_CITATION].
+                        add(Ints.consts.get(PropNames.BASELINE_SHIFT));
+        foPropertyLists[FObjectNames.PAGE_NUMBER_CITATION].
+                        add(Ints.consts.get(PropNames.DOMINANT_BASELINE));
+        foPropertyLists[FObjectNames.PAGE_NUMBER_CITATION].
+                        add(Ints.consts.get(PropNames.ID));
+        foPropertyLists[FObjectNames.PAGE_NUMBER_CITATION].
+                        add(Ints.consts.get(PropNames.KEEP_WITH_NEXT));
+        foPropertyLists[FObjectNames.PAGE_NUMBER_CITATION].
+                        add(Ints.consts.get(PropNames.KEEP_WITH_PREVIOUS));
+        foPropertyLists[FObjectNames.PAGE_NUMBER_CITATION].
+                        add(Ints.consts.get(PropNames.LETTER_SPACING));
+        foPropertyLists[FObjectNames.PAGE_NUMBER_CITATION].
+                        add(Ints.consts.get(PropNames.LINE_HEIGHT));
+        foPropertyLists[FObjectNames.PAGE_NUMBER_CITATION].
+                        add(Ints.consts.get(PropNames.REF_ID));
+        foPropertyLists[FObjectNames.PAGE_NUMBER_CITATION].
+                        add(Ints.consts.get(PropNames.SCORE_SPACES));
+        foPropertyLists[FObjectNames.PAGE_NUMBER_CITATION].
+                        add(Ints.consts.get(PropNames.TEXT_ALTITUDE));
+        foPropertyLists[FObjectNames.PAGE_NUMBER_CITATION].
+                        add(Ints.consts.get(PropNames.TEXT_DECORATION));
+        foPropertyLists[FObjectNames.PAGE_NUMBER_CITATION].
+                        add(Ints.consts.get(PropNames.TEXT_DEPTH));
+        foPropertyLists[FObjectNames.PAGE_NUMBER_CITATION].
+                        add(Ints.consts.get(PropNames.TEXT_SHADOW));
+        foPropertyLists[FObjectNames.PAGE_NUMBER_CITATION].
+                        add(Ints.consts.get(PropNames.TEXT_TRANSFORM));
+        foPropertyLists[FObjectNames.PAGE_NUMBER_CITATION].
+                        add(Ints.consts.get(PropNames.VISIBILITY));
+        foPropertyLists[FObjectNames.PAGE_NUMBER_CITATION].
+                        add(Ints.consts.get(PropNames.WORD_SPACING));
+        foPropertyLists[FObjectNames.PAGE_NUMBER_CITATION].
+                        add(Ints.consts.get(PropNames.WRAP_OPTION));
+
+        //page-sequence
+        foPropertyLists[FObjectNames.PAGE_SEQUENCE] = new HashSet(10);
+        foPropertyLists[FObjectNames.PAGE_SEQUENCE].
+                        add(Ints.consts.get(PropNames.COUNTRY));
+        foPropertyLists[FObjectNames.PAGE_SEQUENCE].
+                        add(Ints.consts.get(PropNames.FORMAT));
+        foPropertyLists[FObjectNames.PAGE_SEQUENCE].
+                        add(Ints.consts.get(PropNames.LANGUAGE));
+        foPropertyLists[FObjectNames.PAGE_SEQUENCE].
+                        add(Ints.consts.get(PropNames.LETTER_VALUE));
+        foPropertyLists[FObjectNames.PAGE_SEQUENCE].
+                        add(Ints.consts.get(PropNames.GROUPING_SEPARATOR));
+        foPropertyLists[FObjectNames.PAGE_SEQUENCE].
+                        add(Ints.consts.get(PropNames.GROUPING_SIZE));
+        foPropertyLists[FObjectNames.PAGE_SEQUENCE].
+                        add(Ints.consts.get(PropNames.ID));
+        foPropertyLists[FObjectNames.PAGE_SEQUENCE].
+                        add(Ints.consts.get(PropNames.INITIAL_PAGE_NUMBER));
+        foPropertyLists[FObjectNames.PAGE_SEQUENCE].
+                        add(Ints.consts.get(PropNames.FORCE_PAGE_COUNT));
+        foPropertyLists[FObjectNames.PAGE_SEQUENCE].
+                        add(Ints.consts.get(PropNames.MASTER_REFERENCE));
+
+        //page-sequence-master
+        foPropertyLists[FObjectNames.PAGE_SEQUENCE_MASTER] = new HashSet(1);
+        foPropertyLists[FObjectNames.PAGE_SEQUENCE_MASTER].
+                        add(Ints.consts.get(PropNames.MASTER_NAME));
+        
+        //region-after
+        foPropertyLists[FObjectNames.REGION_AFTER] = new HashSet(
+                                PropertySets.backgroundPropsSize +
+                                PropertySets.borderPropsSize +
+                                PropertySets.paddingPropsSize +
+                                8);
+        foPropertyLists[FObjectNames.REGION_AFTER].
+                            addAll(PropertySets.backgroundSet);
+        foPropertyLists[FObjectNames.REGION_AFTER].
+                            addAll(PropertySets.borderSet);
+        foPropertyLists[FObjectNames.REGION_AFTER].
+                            addAll(PropertySets.paddingSet);
+        foPropertyLists[FObjectNames.REGION_AFTER].
+                        add(Ints.consts.get(PropNames.CLIP));
+        foPropertyLists[FObjectNames.REGION_AFTER].
+                        add(Ints.consts.get(PropNames.DISPLAY_ALIGN));
+        foPropertyLists[FObjectNames.REGION_AFTER].
+                        add(Ints.consts.get(PropNames.EXTENT));
+        foPropertyLists[FObjectNames.REGION_AFTER].
+                        add(Ints.consts.get(PropNames.OVERFLOW));
+        foPropertyLists[FObjectNames.REGION_AFTER].
+                        add(Ints.consts.get(PropNames.PRECEDENCE));
+        foPropertyLists[FObjectNames.REGION_AFTER].
+                        add(Ints.consts.get(PropNames.REGION_NAME));
+        foPropertyLists[FObjectNames.REGION_AFTER].
+                        add(Ints.consts.get(PropNames.REFERENCE_ORIENTATION));
+        foPropertyLists[FObjectNames.REGION_AFTER].
+                        add(Ints.consts.get(PropNames.WRITING_MODE));
+
+        //region-before
+        foPropertyLists[FObjectNames.REGION_BEFORE] = new HashSet(
+                                PropertySets.backgroundPropsSize +
+                                PropertySets.borderPropsSize +
+                                PropertySets.paddingPropsSize +
+                                8);
+        foPropertyLists[FObjectNames.REGION_BEFORE].
+                            addAll(PropertySets.backgroundSet);
+        foPropertyLists[FObjectNames.REGION_BEFORE].
+                            addAll(PropertySets.borderSet);
+        foPropertyLists[FObjectNames.REGION_BEFORE].
+                            addAll(PropertySets.paddingSet);
+        foPropertyLists[FObjectNames.REGION_BEFORE].
+                        add(Ints.consts.get(PropNames.CLIP));
+        foPropertyLists[FObjectNames.REGION_BEFORE].
+                        add(Ints.consts.get(PropNames.DISPLAY_ALIGN));
+        foPropertyLists[FObjectNames.REGION_BEFORE].
+                        add(Ints.consts.get(PropNames.EXTENT));
+        foPropertyLists[FObjectNames.REGION_BEFORE].
+                        add(Ints.consts.get(PropNames.OVERFLOW));
+        foPropertyLists[FObjectNames.REGION_BEFORE].
+                        add(Ints.consts.get(PropNames.PRECEDENCE));
+        foPropertyLists[FObjectNames.REGION_BEFORE].
+                        add(Ints.consts.get(PropNames.REGION_NAME));
+        foPropertyLists[FObjectNames.REGION_BEFORE].
+                        add(Ints.consts.get(PropNames.REFERENCE_ORIENTATION));
+        foPropertyLists[FObjectNames.REGION_BEFORE].
+                        add(Ints.consts.get(PropNames.WRITING_MODE));
+
+        //region-body
+        foPropertyLists[FObjectNames.REGION_BODY] = new HashSet(
+                                PropertySets.backgroundPropsSize +
+                                PropertySets.borderPropsSize +
+                                PropertySets.paddingPropsSize +
+                                PropertySets.marginBlockPropsSize +
+                                8);
+        foPropertyLists[FObjectNames.REGION_BODY].
+                            addAll(PropertySets.backgroundSet);
+        foPropertyLists[FObjectNames.REGION_BODY].
+                            addAll(PropertySets.borderSet);
+        foPropertyLists[FObjectNames.REGION_BODY].
+                            addAll(PropertySets.paddingSet);
+        foPropertyLists[FObjectNames.REGION_BODY].
+                            addAll(PropertySets.marginBlockSet);
+        foPropertyLists[FObjectNames.REGION_BODY].
+                        add(Ints.consts.get(PropNames.CLIP));
+        foPropertyLists[FObjectNames.REGION_BODY].
+                        add(Ints.consts.get(PropNames.COLUMN_COUNT));
+        foPropertyLists[FObjectNames.REGION_BODY].
+                        add(Ints.consts.get(PropNames.COLUMN_GAP));
+        foPropertyLists[FObjectNames.REGION_BODY].
+                        add(Ints.consts.get(PropNames.DISPLAY_ALIGN));
+        foPropertyLists[FObjectNames.REGION_BODY].
+                        add(Ints.consts.get(PropNames.OVERFLOW));
+        foPropertyLists[FObjectNames.REGION_BODY].
+                        add(Ints.consts.get(PropNames.REGION_NAME));
+        foPropertyLists[FObjectNames.REGION_BODY].
+                        add(Ints.consts.get(PropNames.REFERENCE_ORIENTATION));
+        foPropertyLists[FObjectNames.REGION_BODY].
+                        add(Ints.consts.get(PropNames.WRITING_MODE));
+
+        //region-end
+        foPropertyLists[FObjectNames.REGION_END] = new HashSet(
+                                PropertySets.backgroundPropsSize +
+                                PropertySets.borderPropsSize +
+                                PropertySets.paddingPropsSize +
+                                7);
+        foPropertyLists[FObjectNames.REGION_END].
+                            addAll(PropertySets.backgroundSet);
+        foPropertyLists[FObjectNames.REGION_END].
+                            addAll(PropertySets.borderSet);
+        foPropertyLists[FObjectNames.REGION_END].
+                            addAll(PropertySets.paddingSet);
+        foPropertyLists[FObjectNames.REGION_END].
+                        add(Ints.consts.get(PropNames.CLIP));
+        foPropertyLists[FObjectNames.REGION_END].
+                        add(Ints.consts.get(PropNames.DISPLAY_ALIGN));
+        foPropertyLists[FObjectNames.REGION_END].
+                        add(Ints.consts.get(PropNames.EXTENT));
+        foPropertyLists[FObjectNames.REGION_END].
+                        add(Ints.consts.get(PropNames.OVERFLOW));
+        foPropertyLists[FObjectNames.REGION_END].
+                        add(Ints.consts.get(PropNames.REGION_NAME));
+        foPropertyLists[FObjectNames.REGION_END].
+                        add(Ints.consts.get(PropNames.REFERENCE_ORIENTATION));
+        foPropertyLists[FObjectNames.REGION_END].
+                        add(Ints.consts.get(PropNames.WRITING_MODE));
+
+        //region-start
+        foPropertyLists[FObjectNames.REGION_START] = new HashSet(
+                                PropertySets.backgroundPropsSize +
+                                PropertySets.borderPropsSize +
+                                PropertySets.paddingPropsSize +
+                                7);
+        foPropertyLists[FObjectNames.REGION_START].
+                            addAll(PropertySets.backgroundSet);
+        foPropertyLists[FObjectNames.REGION_START].
+                            addAll(PropertySets.borderSet);
+        foPropertyLists[FObjectNames.REGION_START].
+                            addAll(PropertySets.paddingSet);
+        foPropertyLists[FObjectNames.REGION_START].
+                        add(Ints.consts.get(PropNames.CLIP));
+        foPropertyLists[FObjectNames.REGION_START].
+                        add(Ints.consts.get(PropNames.DISPLAY_ALIGN));
+        foPropertyLists[FObjectNames.REGION_START].
+                        add(Ints.consts.get(PropNames.EXTENT));
+        foPropertyLists[FObjectNames.REGION_START].
+                        add(Ints.consts.get(PropNames.OVERFLOW));
+        foPropertyLists[FObjectNames.REGION_START].
+                        add(Ints.consts.get(PropNames.REGION_NAME));
+        foPropertyLists[FObjectNames.REGION_START].
+                        add(Ints.consts.get(PropNames.REFERENCE_ORIENTATION));
+        foPropertyLists[FObjectNames.REGION_START].
+                        add(Ints.consts.get(PropNames.WRITING_MODE));
+
+        //repeatable-page-master-alternatives
+        foPropertyLists[FObjectNames.REPEATABLE_PAGE_MASTER_ALTERNATIVES]
+                = new HashSet(1);
+        foPropertyLists[FObjectNames.REPEATABLE_PAGE_MASTER_ALTERNATIVES].
+                        add(Ints.consts.get(PropNames.MAXIMUM_REPEATS));
+        
+        //repeatable-page-master-reference
+        foPropertyLists[FObjectNames.REPEATABLE_PAGE_MASTER_REFERENCE]
+                = new HashSet(2);
+        foPropertyLists[FObjectNames.REPEATABLE_PAGE_MASTER_REFERENCE].
+                        add(Ints.consts.get(PropNames.MASTER_REFERENCE));
+        foPropertyLists[FObjectNames.REPEATABLE_PAGE_MASTER_REFERENCE].
+                        add(Ints.consts.get(PropNames.MAXIMUM_REPEATS));
+
+        //retrieve-marker
+        foPropertyLists[FObjectNames.RETRIEVE_MARKER] = new HashSet(3);
+        foPropertyLists[FObjectNames.RETRIEVE_MARKER].
+                        add(Ints.consts.get(PropNames.RETRIEVE_BOUNDARY));
+        foPropertyLists[FObjectNames.RETRIEVE_MARKER].
+                        add(Ints.consts.get(PropNames.RETRIEVE_CLASS_NAME));
+        foPropertyLists[FObjectNames.RETRIEVE_MARKER].
+                        add(Ints.consts.get(PropNames.RETRIEVE_POSITION));
+
+        //root
+        foPropertyLists[FObjectNames.ROOT] = new HashSet(1);
+        foPropertyLists[FObjectNames.ROOT].
+                        add(Ints.consts.get(PropNames.MEDIA_USAGE));
+
+        //simple-page-master
+        foPropertyLists[FObjectNames.SIMPLE_PAGE_MASTER] = new HashSet(
+                                PropertySets.marginBlockPropsSize +
+                                5);
+        foPropertyLists[FObjectNames.SIMPLE_PAGE_MASTER].
+                            addAll(PropertySets.marginBlockSet);
+        foPropertyLists[FObjectNames.SIMPLE_PAGE_MASTER].
+                        add(Ints.consts.get(PropNames.MASTER_NAME));
+        foPropertyLists[FObjectNames.SIMPLE_PAGE_MASTER].
+                        add(Ints.consts.get(PropNames.PAGE_HEIGHT));
+        foPropertyLists[FObjectNames.SIMPLE_PAGE_MASTER].
+                        add(Ints.consts.get(PropNames.PAGE_WIDTH));
+        foPropertyLists[FObjectNames.SIMPLE_PAGE_MASTER].
+                        add(Ints.consts.get(PropNames.REFERENCE_ORIENTATION));
+        foPropertyLists[FObjectNames.SIMPLE_PAGE_MASTER].
+                        add(Ints.consts.get(PropNames.WRITING_MODE));
+        
+        //single-page-master-reference
+        foPropertyLists[FObjectNames.SINGLE_PAGE_MASTER_REFERENCE]
+                = new HashSet(1);
+        foPropertyLists[FObjectNames.SINGLE_PAGE_MASTER_REFERENCE].
+                        add(Ints.consts.get(PropNames.MASTER_REFERENCE));
+
+        //static-content
+        foPropertyLists[FObjectNames.STATIC_CONTENT] = new HashSet(1);
+        foPropertyLists[FObjectNames.STATIC_CONTENT].
+                        add(Ints.consts.get(PropNames.FLOW_NAME));
+
+        //table
+        foPropertyLists[FObjectNames.TABLE] = new HashSet(
+                                PropertySets.accessibilityPropsSize +
+                                PropertySets.auralPropsSize +
+                                PropertySets.backgroundPropsSize +
+                                PropertySets.borderPropsSize +
+                                PropertySets.marginBlockPropsSize +
+                                PropertySets.paddingPropsSize +
+                                PropertySets.relativePositionPropsSize +
+                                21);
+        foPropertyLists[FObjectNames.TABLE].
+                            addAll(PropertySets.accessibilitySet);
+        foPropertyLists[FObjectNames.TABLE].
+                            addAll(PropertySets.auralSet);
+        foPropertyLists[FObjectNames.TABLE].
+                            addAll(PropertySets.backgroundSet);
+        foPropertyLists[FObjectNames.TABLE].
+                            addAll(PropertySets.borderSet);
+        foPropertyLists[FObjectNames.TABLE].
+                            addAll(PropertySets.marginBlockSet);
+        foPropertyLists[FObjectNames.TABLE].
+                            addAll(PropertySets.paddingSet);
+        foPropertyLists[FObjectNames.TABLE].
+                            addAll(PropertySets.relativePositionSet);
+        foPropertyLists[FObjectNames.TABLE].
+                add(Ints.consts.get(PropNames.BLOCK_PROGRESSION_DIMENSION));
+        foPropertyLists[FObjectNames.TABLE].
+                    add(Ints.consts.get(PropNames.BORDER_AFTER_PRECEDENCE));
+        foPropertyLists[FObjectNames.TABLE].
+                    add(Ints.consts.get(PropNames.BORDER_BEFORE_PRECEDENCE));
+        foPropertyLists[FObjectNames.TABLE].
+                        add(Ints.consts.get(PropNames.BORDER_COLLAPSE));
+        foPropertyLists[FObjectNames.TABLE].
+                        add(Ints.consts.get(PropNames.BORDER_END_PRECEDENCE));
+        foPropertyLists[FObjectNames.TABLE].
+                        add(Ints.consts.get(PropNames.BORDER_SEPARATION));
+        foPropertyLists[FObjectNames.TABLE].
+                    add(Ints.consts.get(PropNames.BORDER_START_PRECEDENCE));
+        foPropertyLists[FObjectNames.TABLE].
+                        add(Ints.consts.get(PropNames.BREAK_AFTER));
+        foPropertyLists[FObjectNames.TABLE].
+                        add(Ints.consts.get(PropNames.BREAK_BEFORE));
+        foPropertyLists[FObjectNames.TABLE].
+                        add(Ints.consts.get(PropNames.ID));
+        foPropertyLists[FObjectNames.TABLE].
+                add(Ints.consts.get(PropNames.INLINE_PROGRESSION_DIMENSION));
+        foPropertyLists[FObjectNames.TABLE].
+                        add(Ints.consts.get(PropNames.INTRUSION_DISPLACE));
+        foPropertyLists[FObjectNames.TABLE].
+                        add(Ints.consts.get(PropNames.HEIGHT));
+        foPropertyLists[FObjectNames.TABLE].
+                        add(Ints.consts.get(PropNames.KEEP_TOGETHER));
+        foPropertyLists[FObjectNames.TABLE].
+                        add(Ints.consts.get(PropNames.KEEP_WITH_NEXT));
+        foPropertyLists[FObjectNames.TABLE].
+                        add(Ints.consts.get(PropNames.KEEP_WITH_PREVIOUS));
+        foPropertyLists[FObjectNames.TABLE].
+                        add(Ints.consts.get(PropNames.TABLE_LAYOUT));
+        foPropertyLists[FObjectNames.TABLE].
+                    add(Ints.consts.get(PropNames.TABLE_OMIT_FOOTER_AT_BREAK));
+        foPropertyLists[FObjectNames.TABLE].
+                    add(Ints.consts.get(PropNames.TABLE_OMIT_HEADER_AT_BREAK));
+        foPropertyLists[FObjectNames.TABLE].
+                        add(Ints.consts.get(PropNames.WIDTH));
+        foPropertyLists[FObjectNames.TABLE].
+                        add(Ints.consts.get(PropNames.WRITING_MODE));
+
+        //table-and-caption
+        foPropertyLists[FObjectNames.TABLE_AND_CAPTION] = new HashSet(
+                                PropertySets.accessibilityPropsSize +
+                                PropertySets.auralPropsSize +
+                                PropertySets.backgroundPropsSize +
+                                PropertySets.borderPropsSize +
+                                PropertySets.marginBlockPropsSize +
+                                PropertySets.paddingPropsSize +
+                                PropertySets.relativePositionPropsSize +
+                                9);
+        foPropertyLists[FObjectNames.TABLE_AND_CAPTION].
+                            addAll(PropertySets.accessibilitySet);
+        foPropertyLists[FObjectNames.TABLE_AND_CAPTION].
+                            addAll(PropertySets.auralSet);
+        foPropertyLists[FObjectNames.TABLE_AND_CAPTION].
+                            addAll(PropertySets.backgroundSet);
+        foPropertyLists[FObjectNames.TABLE_AND_CAPTION].
+                            addAll(PropertySets.borderSet);
+        foPropertyLists[FObjectNames.TABLE_AND_CAPTION].
+                            addAll(PropertySets.marginBlockSet);
+        foPropertyLists[FObjectNames.TABLE_AND_CAPTION].
+                            addAll(PropertySets.paddingSet);
+        foPropertyLists[FObjectNames.TABLE_AND_CAPTION].
+                            addAll(PropertySets.relativePositionSet);
+        foPropertyLists[FObjectNames.TABLE_AND_CAPTION].
+                        add(Ints.consts.get(PropNames.BREAK_AFTER));
+        foPropertyLists[FObjectNames.TABLE_AND_CAPTION].
+                        add(Ints.consts.get(PropNames.BREAK_BEFORE));
+        foPropertyLists[FObjectNames.TABLE_AND_CAPTION].
+                        add(Ints.consts.get(PropNames.CAPTION_SIDE));
+        foPropertyLists[FObjectNames.TABLE_AND_CAPTION].
+                        add(Ints.consts.get(PropNames.ID));
+        foPropertyLists[FObjectNames.TABLE_AND_CAPTION].
+                        add(Ints.consts.get(PropNames.INTRUSION_DISPLACE));
+        foPropertyLists[FObjectNames.TABLE_AND_CAPTION].
+                        add(Ints.consts.get(PropNames.KEEP_TOGETHER));
+        foPropertyLists[FObjectNames.TABLE_AND_CAPTION].
+                        add(Ints.consts.get(PropNames.KEEP_WITH_NEXT));
+        foPropertyLists[FObjectNames.TABLE_AND_CAPTION].
+                        add(Ints.consts.get(PropNames.KEEP_WITH_PREVIOUS));
+        foPropertyLists[FObjectNames.TABLE_AND_CAPTION].
+                        add(Ints.consts.get(PropNames.TEXT_ALIGN));
+
+        //table-body
+        foPropertyLists[FObjectNames.TABLE_BODY] = new HashSet(
+                                PropertySets.accessibilityPropsSize +
+                                PropertySets.auralPropsSize +
+                                PropertySets.backgroundPropsSize +
+                                PropertySets.borderPropsSize +
+                                PropertySets.relativePositionPropsSize +
+                                6);
+        foPropertyLists[FObjectNames.TABLE_BODY].
+                            addAll(PropertySets.accessibilitySet);
+        foPropertyLists[FObjectNames.TABLE_BODY].
+                            addAll(PropertySets.auralSet);
+        foPropertyLists[FObjectNames.TABLE_BODY].
+                            addAll(PropertySets.backgroundSet);
+        foPropertyLists[FObjectNames.TABLE_BODY].
+                            addAll(PropertySets.borderSet);
+        foPropertyLists[FObjectNames.TABLE_BODY].
+                            addAll(PropertySets.relativePositionSet);
+        foPropertyLists[FObjectNames.TABLE_BODY].
+                    add(Ints.consts.get(PropNames.BORDER_AFTER_PRECEDENCE));
+        foPropertyLists[FObjectNames.TABLE_BODY].
+                    add(Ints.consts.get(PropNames.BORDER_BEFORE_PRECEDENCE));
+        foPropertyLists[FObjectNames.TABLE_BODY].
+                        add(Ints.consts.get(PropNames.BORDER_END_PRECEDENCE));
+        foPropertyLists[FObjectNames.TABLE_BODY].
+                    add(Ints.consts.get(PropNames.BORDER_START_PRECEDENCE));
+        foPropertyLists[FObjectNames.TABLE_BODY].
+                        add(Ints.consts.get(PropNames.ID));
+        foPropertyLists[FObjectNames.TABLE_BODY].
+                        add(Ints.consts.get(PropNames.VISIBILITY));
+
+        //table-caption
+        foPropertyLists[FObjectNames.TABLE_CAPTION] = new HashSet(
+                                PropertySets.accessibilityPropsSize +
+                                PropertySets.auralPropsSize +
+                                PropertySets.backgroundPropsSize +
+                                PropertySets.borderPropsSize +
+                                PropertySets.paddingPropsSize +
+                                PropertySets.relativePositionPropsSize +
+                                7);
+        foPropertyLists[FObjectNames.TABLE_CAPTION].
+                            addAll(PropertySets.accessibilitySet);
+        foPropertyLists[FObjectNames.TABLE_CAPTION].
+                            addAll(PropertySets.auralSet);
+        foPropertyLists[FObjectNames.TABLE_CAPTION].
+                            addAll(PropertySets.backgroundSet);
+        foPropertyLists[FObjectNames.TABLE_CAPTION].
+                            addAll(PropertySets.borderSet);
+        foPropertyLists[FObjectNames.TABLE_CAPTION].
+                            addAll(PropertySets.paddingSet);
+        foPropertyLists[FObjectNames.TABLE_CAPTION].
+                            addAll(PropertySets.relativePositionSet);
+        foPropertyLists[FObjectNames.TABLE_CAPTION].
+                add(Ints.consts.get(PropNames.BLOCK_PROGRESSION_DIMENSION));
+        foPropertyLists[FObjectNames.TABLE_CAPTION].
+                        add(Ints.consts.get(PropNames.HEIGHT));
+        foPropertyLists[FObjectNames.TABLE_CAPTION].
+                        add(Ints.consts.get(PropNames.ID));
+        foPropertyLists[FObjectNames.TABLE_CAPTION].
+                add(Ints.consts.get(PropNames.INLINE_PROGRESSION_DIMENSION));
+        foPropertyLists[FObjectNames.TABLE_CAPTION].
+                        add(Ints.consts.get(PropNames.INTRUSION_DISPLACE));
+        foPropertyLists[FObjectNames.TABLE_CAPTION].
+                        add(Ints.consts.get(PropNames.KEEP_TOGETHER));
+        foPropertyLists[FObjectNames.TABLE_CAPTION].
+                        add(Ints.consts.get(PropNames.WIDTH));
+
+        //table-cell
+        foPropertyLists[FObjectNames.TABLE_CELL]
+                = new HashSet(FObjectNames.LAST_FO + 1);
+        foPropertyLists[FObjectNames.TABLE_CELL] = new HashSet(
+                                PropertySets.accessibilityPropsSize +
+                                PropertySets.auralPropsSize +
+                                PropertySets.backgroundPropsSize +
+                                PropertySets.borderPropsSize +
+                                PropertySets.paddingPropsSize +
+                                PropertySets.relativePositionPropsSize +
+                                17);
+        foPropertyLists[FObjectNames.TABLE_CELL].
+                            addAll(PropertySets.accessibilitySet);
+        foPropertyLists[FObjectNames.TABLE_CELL].
+                            addAll(PropertySets.auralSet);
+        foPropertyLists[FObjectNames.TABLE_CELL].
+                            addAll(PropertySets.backgroundSet);
+        foPropertyLists[FObjectNames.TABLE_CELL].
+                            addAll(PropertySets.borderSet);
+        foPropertyLists[FObjectNames.TABLE_CELL].
+                            addAll(PropertySets.paddingSet);
+        foPropertyLists[FObjectNames.TABLE_CELL].
+                            addAll(PropertySets.relativePositionSet);
+        foPropertyLists[FObjectNames.TABLE_CELL].
+                    add(Ints.consts.get(PropNames.BORDER_AFTER_PRECEDENCE));
+        foPropertyLists[FObjectNames.TABLE_CELL].
+                    add(Ints.consts.get(PropNames.BORDER_BEFORE_PRECEDENCE));
+        foPropertyLists[FObjectNames.TABLE_CELL].
+                        add(Ints.consts.get(PropNames.BORDER_END_PRECEDENCE));
+        foPropertyLists[FObjectNames.TABLE_CELL].
+                    add(Ints.consts.get(PropNames.BORDER_START_PRECEDENCE));
+        foPropertyLists[FObjectNames.TABLE_CELL].
+                add(Ints.consts.get(PropNames.BLOCK_PROGRESSION_DIMENSION));
+        foPropertyLists[FObjectNames.TABLE_CELL].
+                        add(Ints.consts.get(PropNames.COLUMN_NUMBER));
+        foPropertyLists[FObjectNames.TABLE_CELL].
+                        add(Ints.consts.get(PropNames.DISPLAY_ALIGN));
+        foPropertyLists[FObjectNames.TABLE_CELL].
+                        add(Ints.consts.get(PropNames.RELATIVE_ALIGN));
+        foPropertyLists[FObjectNames.TABLE_CELL].
+                        add(Ints.consts.get(PropNames.EMPTY_CELLS));
+        foPropertyLists[FObjectNames.TABLE_CELL].
+                        add(Ints.consts.get(PropNames.ENDS_ROW));
+        foPropertyLists[FObjectNames.TABLE_CELL].
+                        add(Ints.consts.get(PropNames.HEIGHT));
+        foPropertyLists[FObjectNames.TABLE_CELL].
+                        add(Ints.consts.get(PropNames.ID));
+        foPropertyLists[FObjectNames.TABLE_CELL].
+                add(Ints.consts.get(PropNames.INLINE_PROGRESSION_DIMENSION));
+        foPropertyLists[FObjectNames.TABLE_CELL].
+                    add(Ints.consts.get(PropNames.NUMBER_COLUMNS_SPANNED));
+        foPropertyLists[FObjectNames.TABLE_CELL].
+                        add(Ints.consts.get(PropNames.NUMBER_ROWS_SPANNED));
+        foPropertyLists[FObjectNames.TABLE_CELL].
+                        add(Ints.consts.get(PropNames.STARTS_ROW));
+        foPropertyLists[FObjectNames.TABLE_CELL].
+                        add(Ints.consts.get(PropNames.WIDTH));
+
+        //table-column
+        foPropertyLists[FObjectNames.TABLE_COLUMN] = new HashSet(
+                                PropertySets.backgroundPropsSize +
+                                PropertySets.borderPropsSize +
+                                9);
+        foPropertyLists[FObjectNames.TABLE_COLUMN].
+                            addAll(PropertySets.backgroundSet);
+        foPropertyLists[FObjectNames.TABLE_COLUMN].
+                            addAll(PropertySets.borderSet);
+        foPropertyLists[FObjectNames.TABLE_COLUMN].
+                    add(Ints.consts.get(PropNames.BORDER_AFTER_PRECEDENCE));
+        foPropertyLists[FObjectNames.TABLE_COLUMN].
+                    add(Ints.consts.get(PropNames.BORDER_BEFORE_PRECEDENCE));
+        foPropertyLists[FObjectNames.TABLE_COLUMN].
+                        add(Ints.consts.get(PropNames.BORDER_END_PRECEDENCE));
+        foPropertyLists[FObjectNames.TABLE_COLUMN].
+                    add(Ints.consts.get(PropNames.BORDER_START_PRECEDENCE));
+        foPropertyLists[FObjectNames.TABLE_COLUMN].
+                        add(Ints.consts.get(PropNames.COLUMN_NUMBER));
+        foPropertyLists[FObjectNames.TABLE_COLUMN].
+                        add(Ints.consts.get(PropNames.COLUMN_WIDTH));
+        foPropertyLists[FObjectNames.TABLE_COLUMN].
+                    add(Ints.consts.get(PropNames.NUMBER_COLUMNS_REPEATED));
+        foPropertyLists[FObjectNames.TABLE_COLUMN].
+                    add(Ints.consts.get(PropNames.NUMBER_COLUMNS_SPANNED));
+        foPropertyLists[FObjectNames.TABLE_COLUMN].
+                        add(Ints.consts.get(PropNames.VISIBILITY));
+
+        //table-footer
+        foPropertyLists[FObjectNames.TABLE_FOOTER] = new HashSet(
+                                PropertySets.accessibilityPropsSize +
+                                PropertySets.auralPropsSize +
+                                PropertySets.backgroundPropsSize +
+                                PropertySets.borderPropsSize +
+                                PropertySets.relativePositionPropsSize +
+                                6);
+        foPropertyLists[FObjectNames.TABLE_FOOTER].
+                            addAll(PropertySets.accessibilitySet);
+        foPropertyLists[FObjectNames.TABLE_FOOTER].
+                            addAll(PropertySets.auralSet);
+        foPropertyLists[FObjectNames.TABLE_FOOTER].
+                            addAll(PropertySets.backgroundSet);
+        foPropertyLists[FObjectNames.TABLE_FOOTER].
+                            addAll(PropertySets.borderSet);
+        foPropertyLists[FObjectNames.TABLE_FOOTER].
+                            addAll(PropertySets.relativePositionSet);
+        foPropertyLists[FObjectNames.TABLE_FOOTER].
+                    add(Ints.consts.get(PropNames.BORDER_AFTER_PRECEDENCE));
+        foPropertyLists[FObjectNames.TABLE_FOOTER].
+                    add(Ints.consts.get(PropNames.BORDER_BEFORE_PRECEDENCE));
+        foPropertyLists[FObjectNames.TABLE_FOOTER].
+                        add(Ints.consts.get(PropNames.BORDER_END_PRECEDENCE));
+        foPropertyLists[FObjectNames.TABLE_FOOTER].
+                    add(Ints.consts.get(PropNames.BORDER_START_PRECEDENCE));
+        foPropertyLists[FObjectNames.TABLE_FOOTER].
+                        add(Ints.consts.get(PropNames.ID));
+        foPropertyLists[FObjectNames.TABLE_FOOTER].
+                        add(Ints.consts.get(PropNames.VISIBILITY));
+
+        //table-header
+        foPropertyLists[FObjectNames.TABLE_HEADER] = new HashSet(
+                                PropertySets.accessibilityPropsSize +
+                                PropertySets.auralPropsSize +
+                                PropertySets.backgroundPropsSize +
+                                PropertySets.borderPropsSize +
+                                PropertySets.relativePositionPropsSize +
+                                6);
+        foPropertyLists[FObjectNames.TABLE_HEADER].
+                            addAll(PropertySets.accessibilitySet);
+        foPropertyLists[FObjectNames.TABLE_HEADER].
+                            addAll(PropertySets.auralSet);
+        foPropertyLists[FObjectNames.TABLE_HEADER].
+                            addAll(PropertySets.backgroundSet);
+        foPropertyLists[FObjectNames.TABLE_HEADER].
+                            addAll(PropertySets.borderSet);
+        foPropertyLists[FObjectNames.TABLE_HEADER].
+                            addAll(PropertySets.relativePositionSet);
+        foPropertyLists[FObjectNames.TABLE_HEADER].
+                    add(Ints.consts.get(PropNames.BORDER_AFTER_PRECEDENCE));
+        foPropertyLists[FObjectNames.TABLE_HEADER].
+                    add(Ints.consts.get(PropNames.BORDER_BEFORE_PRECEDENCE));
+        foPropertyLists[FObjectNames.TABLE_HEADER].
+                        add(Ints.consts.get(PropNames.BORDER_END_PRECEDENCE));
+        foPropertyLists[FObjectNames.TABLE_HEADER].
+                    add(Ints.consts.get(PropNames.BORDER_START_PRECEDENCE));
+        foPropertyLists[FObjectNames.TABLE_HEADER].
+                        add(Ints.consts.get(PropNames.ID));
+        foPropertyLists[FObjectNames.TABLE_HEADER].
+                        add(Ints.consts.get(PropNames.VISIBILITY));
+
+        //table-row
+        foPropertyLists[FObjectNames.TABLE_ROW] = new HashSet(
+                                PropertySets.accessibilityPropsSize +
+                                PropertySets.auralPropsSize +
+                                PropertySets.backgroundPropsSize +
+                                PropertySets.borderPropsSize +
+                                PropertySets.relativePositionPropsSize +
+                                13);
+        foPropertyLists[FObjectNames.TABLE_ROW].
+                            addAll(PropertySets.accessibilitySet);
+        foPropertyLists[FObjectNames.TABLE_ROW].
+                            addAll(PropertySets.auralSet);
+        foPropertyLists[FObjectNames.TABLE_ROW].
+                            addAll(PropertySets.backgroundSet);
+        foPropertyLists[FObjectNames.TABLE_ROW].
+                            addAll(PropertySets.borderSet);
+        foPropertyLists[FObjectNames.TABLE_ROW].
+                            addAll(PropertySets.relativePositionSet);
+        foPropertyLists[FObjectNames.TABLE_ROW].
+                add(Ints.consts.get(PropNames.BLOCK_PROGRESSION_DIMENSION));
+        foPropertyLists[FObjectNames.TABLE_ROW].
+                    add(Ints.consts.get(PropNames.BORDER_AFTER_PRECEDENCE));
+        foPropertyLists[FObjectNames.TABLE_ROW].
+                    add(Ints.consts.get(PropNames.BORDER_BEFORE_PRECEDENCE));
+        foPropertyLists[FObjectNames.TABLE_ROW].
+                        add(Ints.consts.get(PropNames.BORDER_END_PRECEDENCE));
+        foPropertyLists[FObjectNames.TABLE_ROW].
+                    add(Ints.consts.get(PropNames.BORDER_START_PRECEDENCE));
+        foPropertyLists[FObjectNames.TABLE_ROW].
+                        add(Ints.consts.get(PropNames.BREAK_AFTER));
+        foPropertyLists[FObjectNames.TABLE_ROW].
+                        add(Ints.consts.get(PropNames.BREAK_BEFORE));
+        foPropertyLists[FObjectNames.TABLE_ROW].
+                        add(Ints.consts.get(PropNames.ID));
+        foPropertyLists[FObjectNames.TABLE_ROW].
+                        add(Ints.consts.get(PropNames.HEIGHT));
+        foPropertyLists[FObjectNames.TABLE_ROW].
+                        add(Ints.consts.get(PropNames.KEEP_TOGETHER));
+        foPropertyLists[FObjectNames.TABLE_ROW].
+                        add(Ints.consts.get(PropNames.KEEP_WITH_NEXT));
+        foPropertyLists[FObjectNames.TABLE_ROW].
+                        add(Ints.consts.get(PropNames.KEEP_WITH_PREVIOUS));
+        foPropertyLists[FObjectNames.TABLE_ROW].
+                        add(Ints.consts.get(PropNames.VISIBILITY));
+
+        //title
+        foPropertyLists[FObjectNames.TITLE] = new HashSet(
+                                PropertySets.accessibilityPropsSize +
+                                PropertySets.auralPropsSize +
+                                PropertySets.backgroundPropsSize +
+                                PropertySets.borderPropsSize +
+                                PropertySets.paddingPropsSize +
+                                PropertySets.fontPropsSize +
+                                PropertySets.marginInlinePropsSize +
+                                3);
+        foPropertyLists[FObjectNames.TITLE].
+                            addAll(PropertySets.accessibilitySet);
+        foPropertyLists[FObjectNames.TITLE].
+                            addAll(PropertySets.auralSet);
+        foPropertyLists[FObjectNames.TITLE].
+                            addAll(PropertySets.backgroundSet);
+        foPropertyLists[FObjectNames.TITLE].
+                            addAll(PropertySets.borderSet);
+        foPropertyLists[FObjectNames.TITLE].
+                            addAll(PropertySets.paddingSet);
+        foPropertyLists[FObjectNames.TITLE].
+                            addAll(PropertySets.fontSet);
+        foPropertyLists[FObjectNames.TITLE].
+                            addAll(PropertySets.marginInlineSet);
+        foPropertyLists[FObjectNames.TITLE].
+                        add(Ints.consts.get(PropNames.COLOR));
+        foPropertyLists[FObjectNames.TITLE].
+                        add(Ints.consts.get(PropNames.LINE_HEIGHT));
+        foPropertyLists[FObjectNames.TITLE].
+                        add(Ints.consts.get(PropNames.VISIBILITY));
+
+        //wrapper
+        foPropertyLists[FObjectNames.WRAPPER] = new HashSet(1);
+        foPropertyLists[FObjectNames.WRAPPER].
+                        add(Ints.consts.get(PropNames.ID));
+
+    }
+
+    // Following are the sets of properties which apply to particular
+    // subtrees of the FO Tree.  This whole section is probably redundant.
+    // If it is restored to full functioning, the public BitSet objects
+    // must be replaced with unmodifiableSets.
+
+    private static final BitSet allProps;
+
+    /**
+     * root only set of properties - properties for exclusive use on the
+     * root element.  These properties make no sense anywhere below the
+     * root element.
+     */
+    private static final BitSet rootOnly;
+
+    /**
+     * declarations only set of properties - properties for exclusive
+     * use within the declarations subtree.  These properties make no
+     * sense in or under layout-master-set or page-sequences.
+     */
+    private static final BitSet declarationsOnly;
+
+    /**
+     * set of all declarations properties - properties which are
+     * usable within the declarations subtree.
+     */
+    private static final BitSet declarationsAll;
+
+    /**
+     * layout-master-set only set of properties - properties for exclusive
+     * use within the layout-master-set subtree.  These properties make no
+     * sense in or under declarations or page-sequences.
+     */
+    private static final BitSet layoutMasterOnly;
+
+    /**
+     * set of all layout-master-set properties - properties which are
+     * usable within the layout-master-set subtree.
+     */
+    private static final BitSet layoutMasterSet;
+
+    /**
+     * set of all page flow subtree properties - properties which are
+     * usable within the page flow subtree.
+     */
+    private static final BitSet pageFlowSet;
+
+    static {
+
+        // Iterator for the PropertySets defined in PropertySets
+        Iterator propertySet;
+        // fill the BitSet of all properties
+        allProps = new BitSet(PropNames.LAST_PROPERTY_INDEX + 1);
+        for (int i = 0; i <= PropNames.LAST_PROPERTY_INDEX; i++) {
+            allProps.set(i);
+        }
+        allProps.clear(PropNames.NO_PROPERTY);
+
+        //root only set of properties - properties for exclusive use on the
+        // root element
+        rootOnly = new BitSet(1);
+        rootOnly.set(PropNames.MEDIA_USAGE);
+
+        //declarations only set of properties - properties for exclusive use
+        // in the declarations SUBTREE
+        declarationsOnly = new BitSet(2);
+        declarationsOnly.set(PropNames.COLOR_PROFILE_NAME);
+        declarationsOnly.set(PropNames.RENDERING_INTENT);
+
+        // set of all declarations properties - properties which may be
+        // used in the declarations SUBTREE
+        declarationsAll = new BitSet(3);
+        declarationsAll.set(PropNames.SRC);
+        declarationsAll.or(declarationsOnly);
+
+        //layout-master-set only set of properties - properties for exclusive
+        // use within the layout-master-set SUBTREE
+        layoutMasterOnly = new BitSet();
+        layoutMasterOnly.set(PropNames.MASTER_NAME);
+        layoutMasterOnly.set(PropNames.MASTER_REFERENCE);
+        layoutMasterOnly.set(PropNames.MAXIMUM_REPEATS);
+        layoutMasterOnly.set(PropNames.PAGE_POSITION);
+        layoutMasterOnly.set(PropNames.ODD_OR_EVEN);
+        layoutMasterOnly.set(PropNames.BLANK_OR_NOT_BLANK);
+        layoutMasterOnly.set(PropNames.PAGE_HEIGHT);
+        layoutMasterOnly.set(PropNames.PAGE_WIDTH);
+        layoutMasterOnly.set(PropNames.COLUMN_COUNT);
+        layoutMasterOnly.set(PropNames.COLUMN_GAP);
+        layoutMasterOnly.set(PropNames.REGION_NAME);
+        layoutMasterOnly.set(PropNames.EXTENT);
+        layoutMasterOnly.set(PropNames.PRECEDENCE);
+
+        // set of all layout-master-set properties - properties which may be
+        // used in the layout-master-set SUBTREE
+        layoutMasterSet = new BitSet();
+
+        // Add the laoyout-master-set exclusive properties
+        layoutMasterSet.or(layoutMasterOnly);
+
+        layoutMasterSet.set(PropNames.REFERENCE_ORIENTATION);
+        layoutMasterSet.set(PropNames.WRITING_MODE);
+        layoutMasterSet.set(PropNames.CLIP);
+        layoutMasterSet.set(PropNames.DISPLAY_ALIGN);
+        layoutMasterSet.set(PropNames.OVERFLOW);
+
+        // Add the common margin properties - block
+        propertySet = PropertySets.marginBlockSet.iterator();
+        while (propertySet.hasNext()) {
+            layoutMasterSet.set(((Integer)propertySet.next()).intValue());
+        }
+        // Add the common border properties
+        propertySet = PropertySets.borderSet.iterator();
+        while (propertySet.hasNext()) {
+            layoutMasterSet.set(((Integer)propertySet.next()).intValue());
+        }
+        // Add the common padding properties
+        propertySet = PropertySets.paddingSet.iterator();
+        while (propertySet.hasNext()) {
+            layoutMasterSet.set(((Integer)propertySet.next()).intValue());
+        }
+        // Add the common background properties
+        propertySet = PropertySets.backgroundSet.iterator();
+        while (propertySet.hasNext()) {
+            layoutMasterSet.set(((Integer)propertySet.next()).intValue());
+        }
+        pageFlowSet = new BitSet(PropNames.LAST_PROPERTY_INDEX + 1);
+        pageFlowSet.or(allProps);
+        pageFlowSet.andNot(rootOnly);
+        pageFlowSet.andNot(declarationsOnly);
+        pageFlowSet.andNot(layoutMasterOnly);
+
+    }
+
+    static {
+        String prefix = fobsPackageName + ".";
+        String foPrefix = "Fo";
+
+        foClassNames    = new String[FObjectNames.foLocalNames.length];
+        foClasses       = new Class[FObjectNames.foLocalNames.length];
+        foToIndex       = new HashMap(FObjectNames.foLocalNames.length);
+        foClassToIndex  = new HashMap(FObjectNames.foLocalNames.length);
+
+        for (int i = 1;i < FObjectNames.foLocalNames.length; i++) {
+            String cname = foPrefix;
+            StringTokenizer stoke =
+                    new StringTokenizer(FObjectNames.foLocalNames[i], "-");
+            while (stoke.hasMoreTokens()) {
+                String token = stoke.nextToken();
+                String pname = new Character(
+                                    Character.toUpperCase(token.charAt(0))
+                                ).toString() + token.substring(1);
+                cname = cname + pname;
+            }
+            foClassNames[i] = cname;
+
+            // Set up the array of Class objects, indexed by the fo
+            // constants.
+            String name = prefix + cname;
+            try {
+                foClasses[i] = Class.forName(name);
+            } catch (ClassNotFoundException e) {}
+
+            // Set up the foToIndex Hashmap with the name of the
+            // flow object as a key, and the integer index as a value
+            if (foToIndex.put((Object) FObjectNames.foLocalNames[i],
+                                        Ints.consts.get(i)) != null) {
+                throw new RuntimeException(
+                    "Duplicate values in propertyToIndex for key " +
+                    FObjectNames.foLocalNames[i]);
+            }
+
+            // Set up the foClassToIndex Hashmap with the name of the
+            // fo class as a key, and the integer index as a value
+            
+            if (foClassToIndex.put((Object) foClassNames[i],
+                                    Ints.consts.get(i)) != null) {
+                throw new RuntimeException(
+                    "Duplicate values in foClassToIndex for key " +
+                    foClassNames[i]);
+            }
+
+        }
+    }
+
+}
+
diff --git a/src/org/apache/fop/fo/FoRoot.java b/src/org/apache/fop/fo/FoRoot.java
new file mode 100644 (file)
index 0000000..d7ff2dc
--- /dev/null
@@ -0,0 +1,119 @@
+/**
+ * $Id$
+ * <br/>Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
+ * <br/>For details on use and redistribution please refer to the
+ * <br/>LICENSE file included with these sources.
+ *
+ * @author <a href="mailto:pbwest@powerup.com.au">Peter B. West</a>
+ * @version $Revision$ $Name$
+ */
+
+package org.apache.fop.fo;
+
+import org.apache.fop.apps.FOPException;
+import org.apache.fop.fo.FObjects;
+import org.apache.fop.datastructs.SyncedCircularBuffer;
+import org.apache.fop.datastructs.Tree;
+import org.apache.fop.fo.FOTree;
+import org.apache.fop.fo.FONode;
+import org.apache.fop.fo.expr.PropertyException;
+import org.apache.fop.fo.pagination.FoLayoutMasterSet;
+import org.apache.fop.xml.XMLEvent;
+
+import org.xml.sax.Attributes;
+
+import java.util.NoSuchElementException;
+
+/** <p>
+ * <tt>FoRoot</tt> is the class which processes the fo:root start element
+ * XML event.
+ * </p><p>
+ * The building of all of the fo tree, and the forwarding of FO tree events
+ * on to further stages of processing, will all take place within the
+ * <tt>buildFoTree()</tt> method of this class instance.
+ * </p>
+ */
+
+public class FoRoot extends FONode {
+
+    private FoLayoutMasterSet layoutMasters;
+
+    /**
+     * @param foTree the FO tree being built
+     * @param event the <tt>XMLEvent</tt> that triggered the creation of this
+     * node
+     */
+    public FoRoot
+        (FOTree foTree, XMLEvent event)
+        throws Tree.TreeException, FOPException, PropertyException
+    {
+        // This is the root node of the tree; hence the null argument
+        super(foTree, null, event, FONode.ROOT);
+    }
+
+    /** <p>
+     * Process the FO tree, starting with this fo:root element.
+     * N.B. the FO tree is not really a tree.
+     * Trees only occur with fo:flow and fo:static-content.  These will
+     * be built at the appropriate places as part of the FO tree processing.
+     * Terminates at the completion of FO tree processing.
+     * </p><p>
+     * <tt>fo:root</tt> contents are <br/>
+     * (layout-master-set,declarations?,page-sequence+)
+     * </p><p>
+     * I.e. the <fo:root> element is the parent of a two-element sequence:
+     * (layout-master-set-declarations),(page-sequence-sequence)
+     * </p><p>
+     * 'layout-master-set-declarations' is logically an unordered set of
+     * (layout-master-set,declarations?), although this definition
+     * determines an order of occurrence in the input tree.  It is 
+     * unordered in the sense that there is no logical precedence in the
+     * set.  However, there is a logical precedence of the set with respect
+     * to the page-sequences.
+     * </p><p>
+     * The contents of declarations must be available to all FO tree
+     * processing; the contents of the layout-master-set must be available
+     * during the page setup phase of the processing of each page-sequence
+     * in the page-sequence-sequence.
+     */
+    public void buildFoTree() throws FOPException{
+        XMLEvent ev;
+        //System.out.println("buildFoTree: " + event);
+        // Look for layout-master-set
+        try {
+            ev = XMLEvent.expectStartElement
+                    (foTree.xmlevents, XMLEvent.XSLNSpaceIndex,
+                     "layout-master-set");
+        } catch (NoSuchElementException e) {
+            throw new FOPException(e.getMessage());
+        }
+        // Process the layout-master-set
+        try {
+            layoutMasters = new FoLayoutMasterSet(foTree, this, ev);
+        } catch(Tree.TreeException e) {
+            throw new FOPException("TreeException: " + e.getMessage());
+        } catch(PropertyException e) {
+            throw new FOPException("PropertyException: " + e.getMessage());
+        }
+        layoutMasters.setupPageMasters();
+        // Stub - flush the layout masters
+        ev = XMLEvent.getEndElement
+                (foTree.xmlevents, XMLEvent.XSLNSpaceIndex,
+                 "layout-master-set");
+        // Look for optional declarations
+        try {
+            XMLEvent.expectStartElement
+                    (foTree.xmlevents, XMLEvent.XSLNSpaceIndex,
+                     "declarations");
+            // process the declarations
+            XMLEvent.getEndElement
+                    (foTree.xmlevents, XMLEvent.XSLNSpaceIndex,
+                     "declarations");
+        } catch (NoSuchElementException e) {
+            // Take no notice - declarations is optional
+        }
+        
+    }
+}
+
+
diff --git a/src/org/apache/fop/fo/PropNames.java b/src/org/apache/fop/fo/PropNames.java
new file mode 100644 (file)
index 0000000..b7d48bb
--- /dev/null
@@ -0,0 +1,686 @@
+/*
+ * $Id$
+ * Copyright (C) 2001-2002 The Apache Software Foundation. All rights reserved.
+ * For details on use and redistribution please refer to the
+ * LICENSE file included with these sources.
+ * @author <a href="mailto:pbwest@powerup.com.au">Peter B. West</a>
+ * @version $Revision$ $Name$
+ */
+
+package org.apache.fop.fo;
+
+import org.apache.fop.fo.expr.PropertyException;
+
+/**
+ * A class of constants; an array of all property names and the constants
+ * by which to refer to them.
+ */
+
+public class PropNames {
+
+    /*
+     * The list of property constants can be regenerated in XEmacs by setting
+     * the region on the list of constants. (C-Space at the beginning,
+     * move to last line, C-x C-x to exchange mark and point.)  Then run
+     * a shell command on the region with replacement (M-1 M-|).  Use
+     * the perl command:
+     * perl -p -e 'BEGIN{$n=0};$n++ if s/= [0-9]+,/= $n,/'
+     * Alternatively, start at a given point in the list by setting the
+     * appropriate start value for $n.
+     *
+     * in vi, set mark `a' at the last line and
+     * !'aperl... etc
+     */
+     /** Constant for matching property defined in <i>XSLFO</i>. */
+
+    public static final int
+                                    NO_PROPERTY = 0,
+                              ABSOLUTE_POSITION = 1,
+                                   ACTIVE_STATE = 2,
+                               ALIGNMENT_ADJUST = 3,
+                             ALIGNMENT_BASELINE = 4,
+                                   AUTO_RESTORE = 5,
+                                        AZIMUTH = 6,
+                                     BACKGROUND = 7,
+                          BACKGROUND_ATTACHMENT = 8,
+                               BACKGROUND_COLOR = 9,
+                               BACKGROUND_IMAGE = 10,
+                            BACKGROUND_POSITION = 11,
+                 BACKGROUND_POSITION_HORIZONTAL = 12,
+                   BACKGROUND_POSITION_VERTICAL = 13,
+                              BACKGROUND_REPEAT = 14,
+                                 BASELINE_SHIFT = 15,
+                             BLANK_OR_NOT_BLANK = 16,
+                    BLOCK_PROGRESSION_DIMENSION = 17,
+            BLOCK_PROGRESSION_DIMENSION_MINIMUM = 18,
+            BLOCK_PROGRESSION_DIMENSION_OPTIMUM = 19,
+            BLOCK_PROGRESSION_DIMENSION_MAXIMUM = 20,
+                                         BORDER = 21,
+                             BORDER_AFTER_COLOR = 22,
+                        BORDER_AFTER_PRECEDENCE = 23,
+                             BORDER_AFTER_STYLE = 24,
+                             BORDER_AFTER_WIDTH = 25,
+                      BORDER_AFTER_WIDTH_LENGTH = 26,
+              BORDER_AFTER_WIDTH_CONDITIONALITY = 27,
+                            BORDER_BEFORE_COLOR = 28,
+                       BORDER_BEFORE_PRECEDENCE = 29,
+                            BORDER_BEFORE_STYLE = 30,
+                            BORDER_BEFORE_WIDTH = 31,
+                     BORDER_BEFORE_WIDTH_LENGTH = 32,
+             BORDER_BEFORE_WIDTH_CONDITIONALITY = 33,
+                                  BORDER_BOTTOM = 34,
+                            BORDER_BOTTOM_COLOR = 35,
+                            BORDER_BOTTOM_STYLE = 36,
+                            BORDER_BOTTOM_WIDTH = 37,
+                                BORDER_COLLAPSE = 38,
+                                   BORDER_COLOR = 39,
+                               BORDER_END_COLOR = 40,
+                          BORDER_END_PRECEDENCE = 41,
+                               BORDER_END_STYLE = 42,
+                               BORDER_END_WIDTH = 43,
+                        BORDER_END_WIDTH_LENGTH = 44,
+                BORDER_END_WIDTH_CONDITIONALITY = 45,
+                                    BORDER_LEFT = 46,
+                              BORDER_LEFT_COLOR = 47,
+                              BORDER_LEFT_STYLE = 48,
+                              BORDER_LEFT_WIDTH = 49,
+                                   BORDER_RIGHT = 50,
+                             BORDER_RIGHT_COLOR = 51,
+                             BORDER_RIGHT_STYLE = 52,
+                             BORDER_RIGHT_WIDTH = 53,
+                              BORDER_SEPARATION = 54,
+  BORDER_SEPARATION_BLOCK_PROGRESSION_DIRECTION = 55,
+ BORDER_SEPARATION_INLINE_PROGRESSION_DIRECTION = 56,
+                                 BORDER_SPACING = 57,
+                             BORDER_START_COLOR = 58,
+                        BORDER_START_PRECEDENCE = 59,
+                             BORDER_START_STYLE = 60,
+                             BORDER_START_WIDTH = 61,
+                      BORDER_START_WIDTH_LENGTH = 62,
+              BORDER_START_WIDTH_CONDITIONALITY = 63,
+                                   BORDER_STYLE = 64,
+                                     BORDER_TOP = 65,
+                               BORDER_TOP_COLOR = 66,
+                               BORDER_TOP_STYLE = 67,
+                               BORDER_TOP_WIDTH = 68,
+                                   BORDER_WIDTH = 69,
+                                         BOTTOM = 70,
+                                    BREAK_AFTER = 71,
+                                   BREAK_BEFORE = 72,
+                                   CAPTION_SIDE = 73,
+                                      CASE_NAME = 74,
+                                     CASE_TITLE = 75,
+                                      CHARACTER = 76,
+                                          CLEAR = 77,
+                                           CLIP = 78,
+                                          COLOR = 79,
+                             COLOR_PROFILE_NAME = 80,
+                                   COLUMN_COUNT = 81,
+                                     COLUMN_GAP = 82,
+                                  COLUMN_NUMBER = 83,
+                                   COLUMN_WIDTH = 84,
+                                 CONTENT_HEIGHT = 85,
+                                   CONTENT_TYPE = 86,
+                                  CONTENT_WIDTH = 87,
+                                        COUNTRY = 88,
+                                            CUE = 89,
+                                      CUE_AFTER = 90,
+                                     CUE_BEFORE = 91,
+                   DESTINATION_PLACEMENT_OFFSET = 92,
+                                      DIRECTION = 93,
+                                  DISPLAY_ALIGN = 94,
+                              DOMINANT_BASELINE = 95,
+                                      ELEVATION = 96,
+                                    EMPTY_CELLS = 97,
+                                     END_INDENT = 98,
+                                       ENDS_ROW = 99,
+                                         EXTENT = 100,
+                           EXTERNAL_DESTINATION = 101,
+                                          FLOAT = 102,
+                                      FLOW_NAME = 103,
+                                           FONT = 104,
+                                    FONT_FAMILY = 105,
+                        FONT_SELECTION_STRATEGY = 106,
+                                      FONT_SIZE = 107,
+                               FONT_SIZE_ADJUST = 108,
+                                   FONT_STRETCH = 109,
+                                     FONT_STYLE = 110,
+                                   FONT_VARIANT = 111,
+                                    FONT_WEIGHT = 112,
+                               FORCE_PAGE_COUNT = 113,
+                                         FORMAT = 114,
+                   GLYPH_ORIENTATION_HORIZONTAL = 115,
+                     GLYPH_ORIENTATION_VERTICAL = 116,
+                             GROUPING_SEPARATOR = 117,
+                                  GROUPING_SIZE = 118,
+                                         HEIGHT = 119,
+                                      HYPHENATE = 120,
+                          HYPHENATION_CHARACTER = 121,
+                               HYPHENATION_KEEP = 122,
+                       HYPHENATION_LADDER_COUNT = 123,
+               HYPHENATION_PUSH_CHARACTER_COUNT = 124,
+             HYPHENATION_REMAIN_CHARACTER_COUNT = 125,
+                                             ID = 126,
+                           INDICATE_DESTINATION = 127,
+                            INITIAL_PAGE_NUMBER = 128,
+                   INLINE_PROGRESSION_DIMENSION = 129,
+           INLINE_PROGRESSION_DIMENSION_MINIMUM = 130,
+           INLINE_PROGRESSION_DIMENSION_OPTIMUM = 131,
+           INLINE_PROGRESSION_DIMENSION_MAXIMUM = 132,
+                           INTERNAL_DESTINATION = 133,
+                             INTRUSION_DISPLACE = 134,
+                                  KEEP_TOGETHER = 135,
+                      KEEP_TOGETHER_WITHIN_LINE = 136,
+                      KEEP_TOGETHER_WITHIN_PAGE = 137,
+                    KEEP_TOGETHER_WITHIN_COLUMN = 138,
+                                 KEEP_WITH_NEXT = 139,
+                     KEEP_WITH_NEXT_WITHIN_LINE = 140,
+                     KEEP_WITH_NEXT_WITHIN_PAGE = 141,
+                   KEEP_WITH_NEXT_WITHIN_COLUMN = 142,
+                             KEEP_WITH_PREVIOUS = 143,
+                 KEEP_WITH_PREVIOUS_WITHIN_LINE = 144,
+                 KEEP_WITH_PREVIOUS_WITHIN_PAGE = 145,
+               KEEP_WITH_PREVIOUS_WITHIN_COLUMN = 146,
+                                       LANGUAGE = 147,
+                           LAST_LINE_END_INDENT = 148,
+                               LEADER_ALIGNMENT = 149,
+                                  LEADER_LENGTH = 150,
+                          LEADER_LENGTH_MINIMUM = 151,
+                          LEADER_LENGTH_OPTIMUM = 152,
+                          LEADER_LENGTH_MAXIMUM = 153,
+                                 LEADER_PATTERN = 154,
+                           LEADER_PATTERN_WIDTH = 155,
+                                           LEFT = 156,
+                                 LETTER_SPACING = 157,
+                                   LETTER_VALUE = 158,
+                             LINEFEED_TREATMENT = 159,
+                                    LINE_HEIGHT = 160,
+                            LINE_HEIGHT_MINIMUM = 161,
+                            LINE_HEIGHT_OPTIMUM = 162,
+                            LINE_HEIGHT_MAXIMUM = 163,
+                     LINE_HEIGHT_CONDITIONALITY = 164,
+                         LINE_HEIGHT_PRECEDENCE = 165,
+                   LINE_HEIGHT_SHIFT_ADJUSTMENT = 166,
+                         LINE_STACKING_STRATEGY = 167,
+                                         MARGIN = 168,
+                                  MARGIN_BOTTOM = 169,
+                                    MARGIN_LEFT = 170,
+                                   MARGIN_RIGHT = 171,
+                                     MARGIN_TOP = 172,
+                              MARKER_CLASS_NAME = 173,
+                                    MASTER_NAME = 174,
+                               MASTER_REFERENCE = 175,
+                                     MAX_HEIGHT = 176,
+                                MAXIMUM_REPEATS = 177,
+                                      MAX_WIDTH = 178,
+                                    MEDIA_USAGE = 179,
+                                     MIN_HEIGHT = 180,
+                                      MIN_WIDTH = 181,
+                        NUMBER_COLUMNS_REPEATED = 182,
+                         NUMBER_COLUMNS_SPANNED = 183,
+                            NUMBER_ROWS_SPANNED = 184,
+                                    ODD_OR_EVEN = 185,
+                                        ORPHANS = 186,
+                                       OVERFLOW = 187,
+                                        PADDING = 188,
+                                  PADDING_AFTER = 189,
+                           PADDING_AFTER_LENGTH = 190,
+                   PADDING_AFTER_CONDITIONALITY = 191,
+                                 PADDING_BEFORE = 192,
+                          PADDING_BEFORE_LENGTH = 193,
+                  PADDING_BEFORE_CONDITIONALITY = 194,
+                                 PADDING_BOTTOM = 195,
+                                    PADDING_END = 196,
+                             PADDING_END_LENGTH = 197,
+                     PADDING_END_CONDITIONALITY = 198,
+                                   PADDING_LEFT = 199,
+                                  PADDING_RIGHT = 200,
+                                  PADDING_START = 201,
+                           PADDING_START_LENGTH = 202,
+                   PADDING_START_CONDITIONALITY = 203,
+                                    PADDING_TOP = 204,
+                               PAGE_BREAK_AFTER = 205,
+                              PAGE_BREAK_BEFORE = 206,
+                              PAGE_BREAK_INSIDE = 207,
+                                    PAGE_HEIGHT = 208,
+                                  PAGE_POSITION = 209,
+                                     PAGE_WIDTH = 210,
+                                          PAUSE = 211,
+                                    PAUSE_AFTER = 212,
+                                   PAUSE_BEFORE = 213,
+                                          PITCH = 214,
+                                    PITCH_RANGE = 215,
+                                    PLAY_DURING = 216,
+                                       POSITION = 217,
+                                     PRECEDENCE = 218,
+            PROVISIONAL_DISTANCE_BETWEEN_STARTS = 219,
+                   PROVISIONAL_LABEL_SEPARATION = 220,
+                          REFERENCE_ORIENTATION = 221,
+                                         REF_ID = 222,
+                                    REGION_NAME = 223,
+                                 RELATIVE_ALIGN = 224,
+                              RELATIVE_POSITION = 225,
+                               RENDERING_INTENT = 226,
+                              RETRIEVE_BOUNDARY = 227,
+                            RETRIEVE_CLASS_NAME = 228,
+                              RETRIEVE_POSITION = 229,
+                                       RICHNESS = 230,
+                                          RIGHT = 231,
+                                           ROLE = 232,
+                                     RULE_STYLE = 233,
+                                 RULE_THICKNESS = 234,
+                                        SCALING = 235,
+                                 SCALING_METHOD = 236,
+                                   SCORE_SPACES = 237,
+                                         SCRIPT = 238,
+                               SHOW_DESTINATION = 239,
+                                           SIZE = 240,
+                                SOURCE_DOCUMENT = 241,
+                                    SPACE_AFTER = 242,
+                            SPACE_AFTER_MINIMUM = 243,
+                            SPACE_AFTER_OPTIMUM = 244,
+                            SPACE_AFTER_MAXIMUM = 245,
+                     SPACE_AFTER_CONDITIONALITY = 246,
+                         SPACE_AFTER_PRECEDENCE = 247,
+                                   SPACE_BEFORE = 248,
+                           SPACE_BEFORE_MINIMUM = 249,
+                           SPACE_BEFORE_OPTIMUM = 250,
+                           SPACE_BEFORE_MAXIMUM = 251,
+                    SPACE_BEFORE_CONDITIONALITY = 252,
+                        SPACE_BEFORE_PRECEDENCE = 253,
+                                      SPACE_END = 254,
+                              SPACE_END_MINIMUM = 255,
+                              SPACE_END_OPTIMUM = 256,
+                              SPACE_END_MAXIMUM = 257,
+                       SPACE_END_CONDITIONALITY = 258,
+                           SPACE_END_PRECEDENCE = 259,
+                                    SPACE_START = 260,
+                            SPACE_START_MINIMUM = 261,
+                            SPACE_START_OPTIMUM = 262,
+                            SPACE_START_MAXIMUM = 263,
+                     SPACE_START_CONDITIONALITY = 264,
+                         SPACE_START_PRECEDENCE = 265,
+                                           SPAN = 266,
+                                          SPEAK = 267,
+                                   SPEAK_HEADER = 268,
+                                  SPEAK_NUMERAL = 269,
+                              SPEAK_PUNCTUATION = 270,
+                                    SPEECH_RATE = 271,
+                                            SRC = 272,
+                                   START_INDENT = 273,
+                                 STARTING_STATE = 274,
+                                     STARTS_ROW = 275,
+                                         STRESS = 276,
+                         SUPPRESS_AT_LINE_BREAK = 277,
+                                      SWITCH_TO = 278,
+                                   TABLE_LAYOUT = 279,
+                     TABLE_OMIT_FOOTER_AT_BREAK = 280,
+                     TABLE_OMIT_HEADER_AT_BREAK = 281,
+                    TARGET_PRESENTATION_CONTEXT = 282,
+                      TARGET_PROCESSING_CONTEXT = 283,
+                              TARGET_STYLESHEET = 284,
+                                     TEXT_ALIGN = 285,
+                                TEXT_ALIGN_LAST = 286,
+                                  TEXT_ALTITUDE = 287,
+                                TEXT_DECORATION = 288,
+                                     TEXT_DEPTH = 289,
+                                    TEXT_INDENT = 290,
+                                    TEXT_SHADOW = 291,
+                                 TEXT_TRANSFORM = 292,
+                                            TOP = 293,
+                            TREAT_AS_WORD_SPACE = 294,
+                                   UNICODE_BIDI = 295,
+                                 VERTICAL_ALIGN = 296,
+                                     VISIBILITY = 297,
+                                   VOICE_FAMILY = 298,
+                                         VOLUME = 299,
+                                    WHITE_SPACE = 300,
+                           WHITE_SPACE_COLLAPSE = 301,
+                          WHITE_SPACE_TREATMENT = 302,
+                                         WIDOWS = 303,
+                                          WIDTH = 304,
+                                   WORD_SPACING = 305,
+                                    WRAP_OPTION = 306,
+                                   WRITING_MODE = 307,
+                                       XML_LANG = 308,
+                                        Z_INDEX = 309,
+        
+                            LAST_PROPERTY_INDEX = Z_INDEX;
+
+
+    /**
+     * A String[] array containing the names of all of the FO properties.
+     * The array is effectively 1-based, as the first element is null.
+     * The list of int constants referring to the properties must be manually
+     * kept in sync with the names in this array, as the constants can be
+     * used to index into this, and the other property arrays.
+     */
+
+    private static final String[] propertyNames = {
+        "no-property",
+        "absolute-position",
+        "active-state",
+        "alignment-adjust",
+        "alignment-baseline",
+        "auto-restore",
+        "azimuth",
+        "background",
+        "background-attachment",
+        "background-color",
+        "background-image",
+        "background-position",
+        "background-position-horizontal",
+        "background-position-vertical",
+        "background-repeat",
+        "baseline-shift",
+        "blank-or-not-blank",
+        "block-progression-dimension",
+        "block-progression-dimension.minimum",
+        "block-progression-dimension.optimum",
+        "block-progression-dimension.maximum",
+        "border",
+        "border-after-color",
+        "border-after-precedence",
+        "border-after-style",
+        "border-after-width",
+        "border-after-width.length",
+        "border-after-width.conditionality",
+        "border-before-color",
+        "border-before-precedence",
+        "border-before-style",
+        "border-before-width",
+        "border-before-width.length",
+        "border-before-width.conditionality",
+        "border-bottom",
+        "border-bottom-color",
+        "border-bottom-style",
+        "border-bottom-width",
+        "border-collapse",
+        "border-color",
+        "border-end-color",
+        "border-end-precedence",
+        "border-end-style",
+        "border-end-width",
+        "border-end-width.length",
+        "border-end-width.conditionality",
+        "border-left",
+        "border-left-color",
+        "border-left-style",
+        "border-left-width",
+        "border-right",
+        "border-right-color",
+        "border-right-style",
+        "border-right-width",
+        "border-separation",
+        "border-separation.block-progression-direction",
+        "border-separation.inline-progression-direction",
+        "border-spacing",
+        "border-start-color",
+        "border-start-precedence",
+        "border-start-style",
+        "border-start-width",
+        "border-start-width.length",
+        "border-start-width.conditionality",
+        "border-style",
+        "border-top",
+        "border-top-color",
+        "border-top-style",
+        "border-top-width",
+        "border-width",
+        "bottom",
+        "break-after",
+        "break-before",
+        "caption-side",
+        "case-name",
+        "case-title",
+        "character",
+        "clear",
+        "clip",
+        "color",
+        "color-profile-name",
+        "column-count",
+        "column-gap",
+        "column-number",
+        "column-width",
+        "content-height",
+        "content-type",
+        "content-width",
+        "country",
+        "cue",
+        "cue-after",
+        "cue-before",
+        "destination-placement-offset",
+        "direction",
+        "display-align",
+        "dominant-baseline",
+        "elevation",
+        "empty-cells",
+        "end-indent",
+        "ends-row",
+        "extent",
+        "external-destination",
+        "float",
+        "flow-name",
+        "font",
+        "font-family",
+        "font-selection-strategy",
+        "font-size",
+        "font-size-adjust",
+        "font-stretch",
+        "font-style",
+        "font-variant",
+        "font-weight",
+        "force-page-count",
+        "format",
+        "glyph-orientation-horizontal",
+        "glyph-orientation-vertical",
+        "grouping-separator",
+        "grouping-size",
+        "height",
+        "hyphenate",
+        "hyphenation-character",
+        "hyphenation-keep",
+        "hyphenation-ladder-count",
+        "hyphenation-push-character-count",
+        "hyphenation-remain-character-count",
+        "id",
+        "indicate-destination",
+        "initial-page-number",
+        "inline-progression-dimension",
+        "inline-progression-dimension.minimum",
+        "inline-progression-dimension.optimum",
+        "inline-progression-dimension.maximum",
+        "internal-destination",
+        "intrusion-displace",
+        "keep-together",
+        "keep-together.within-line",
+        "keep-together.within-column",
+        "keep-together.within-page",
+        "keep-with-next",
+        "keep-with-next.within-line",
+        "keep-with-next.within-column",
+        "keep-with-next.within-page",
+        "keep-with-previous",
+        "keep-with-previous.within-line",
+        "keep-with-previous.within-column",
+        "keep-with-previous.within-page",
+        "language",
+        "last-line-end-indent",
+        "leader-alignment",
+        "leader-length",
+        "leader-length.minimum",
+        "leader-length.optimum",
+        "leader-length.maximum",
+        "leader-pattern",
+        "leader-pattern-width",
+        "left",
+        "letter-spacing",
+        "letter-value",
+        "linefeed-treatment",
+        "line-height",
+        "line-height.minimum",
+        "line-height.optimum",
+        "line-height.maximum",
+        "line-height.conditionality",
+        "line-height.precedence",
+        "line-height-shift-adjustment",
+        "line-stacking-strategy",
+        "margin",
+        "margin-bottom",
+        "margin-left",
+        "margin-right",
+        "margin-top",
+        "marker-class-name",
+        "master-name",
+        "master-reference",
+        "max-height",
+        "maximum-repeats",
+        "max-width",
+        "media-usage",
+        "min-height",
+        "min-width",
+        "number-columns-repeated",
+        "number-columns-spanned",
+        "number-rows-spanned",
+        "odd-or-even",
+        "orphans",
+        "overflow",
+        "padding",
+        "padding-after",
+        "padding-after.length",
+        "padding-after.conditionality",
+        "padding-before",
+        "padding-before.length",
+        "padding-before.conditionality",
+        "padding-bottom",
+        "padding-end",
+        "padding-end.length",
+        "padding-end.conditionality",
+        "padding-left",
+        "padding-right",
+        "padding-start",
+        "padding-start.length",
+        "padding-start.conditionality",
+        "padding-top",
+        "page-break-after",
+        "page-break-before",
+        "page-break-inside",
+        "page-height",
+        "page-position",
+        "page-width",
+        "pause",
+        "pause-after",
+        "pause-before",
+        "pitch",
+        "pitch-range",
+        "play-during",
+        "position",
+        "precedence",
+        "provisional-distance-between-starts",
+        "provisional-label-separation",
+        "reference-orientation",
+        "ref-id",
+        "region-name",
+        "relative-align",
+        "relative-position",
+        "rendering-intent",
+        "retrieve-boundary",
+        "retrieve-class-name",
+        "retrieve-position",
+        "richness",
+        "right",
+        "role",
+        "rule-style",
+        "rule-thickness",
+        "scaling",
+        "scaling-method",
+        "score-spaces",
+        "script",
+        "show-destination",
+        "size",
+        "source-document",
+        "space-after",
+        "space-after.minimum",
+        "space-after.optimum",
+        "space-after.maximum",
+        "space-after.conditionality",
+        "space-after.precedence",
+        "space-before",
+        "space-before.minimum",
+        "space-before.optimum",
+        "space-before.maximum",
+        "space-before.conditionality",
+        "space-before.precedence",
+        "space-end",
+        "space-end.minimum",
+        "space-end.optimum",
+        "space-end.maximum",
+        "space-end.conditionality",
+        "space-end.precedence",
+        "space-start",
+        "space-start.minimum",
+        "space-start.optimum",
+        "space-start.maximum",
+        "space-start.conditionality",
+        "space-start.precedence",
+        "span",
+        "speak",
+        "speak-header",
+        "speak-numeral",
+        "speak-punctuation",
+        "speech-rate",
+        "src",
+        "start-indent",
+        "starting-state",
+        "starts-row",
+        "stress",
+        "suppress-at-line-break",
+        "switch-to",
+        "table-layout",
+        "table-omit-footer-at-break",
+        "table-omit-header-at-break",
+        "target-presentation-context",
+        "target-processing-context",
+        "target-stylesheet",
+        "text-align",
+        "text-align-last",
+        "text-altitude",
+        "text-decoration",
+        "text-depth",
+        "text-indent",
+        "text-shadow",
+        "text-transform",
+        "top",
+        "treat-as-word-space",
+        "unicode-bidi",
+        "vertical-align",
+        "visibility",
+        "voice-family",
+        "volume",
+        "white-space",
+        "white-space-collapse",
+        "white-space-treatment",
+        "widows",
+        "width",
+        "word-spacing",
+        "wrap-option",
+        "writing-mode",
+        "xml:lang",
+        "z-index"
+    };
+
+    /**
+     * @param propindex <tt>int</tt> index of the FO property.
+     * @return <tt>String</tt> name of the indexd FO property.
+     * @exception PropertyException if the property index is invalid.
+     */
+    public static String getPropertyName(int propindex)
+                throws PropertyException
+    {
+        if (propindex < 0 || propindex > LAST_PROPERTY_INDEX)
+                throw new PropertyException
+                        ("getPropertyName: index is invalid: " + propindex);
+        return propertyNames[propindex];
+    }
+
+}
diff --git a/src/org/apache/fop/fo/Properties.java b/src/org/apache/fop/fo/Properties.java
new file mode 100644 (file)
index 0000000..f217c62
--- /dev/null
@@ -0,0 +1,6138 @@
+/*
+ * $Id$
+ * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
+ * For details on use and redistribution please refer to the
+ * LICENSE file included with these sources.
+ *
+ * @author <a href="mailto:pbwest@powerup.com.au">Peter B. West</a>
+ * @version $Revision$ $Name$
+ */
+
+package org.apache.fop.fo;
+
+import java.lang.Class;
+import java.util.Iterator;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.LinkedList;
+import java.util.Collections;
+import org.apache.fop.fo.PropertyConsts;
+import org.apache.fop.fo.FOTree;
+import org.apache.fop.fo.FObjects;
+import org.apache.fop.fo.expr.PropertyValue;
+import org.apache.fop.fo.expr.PropertyValueList;
+import org.apache.fop.fo.expr.PropertyException;
+import org.apache.fop.datastructs.ROStringArray;
+import org.apache.fop.datastructs.ROIntArray;
+import org.apache.fop.datatypes.Ints;
+import org.apache.fop.datatypes.StringType;
+import org.apache.fop.datatypes.NCName;
+import org.apache.fop.datatypes.UriType;
+import org.apache.fop.datatypes.Length;
+import org.apache.fop.datatypes.Percentage;
+import org.apache.fop.datatypes.Angle;
+import org.apache.fop.datatypes.EnumType;
+import org.apache.fop.datatypes.IntegerType;
+import org.apache.fop.datatypes.Numeric;
+import org.apache.fop.datatypes.Bool;
+import org.apache.fop.datatypes.Literal;
+import org.apache.fop.datatypes.Auto;
+import org.apache.fop.datatypes.Inherit;
+import org.apache.fop.datatypes.ColorType;
+import org.apache.fop.datatypes.FontFamilySet;
+import org.apache.fop.datatypes.TextDecorations;
+import org.apache.fop.datatypes.TextDecorator;
+import org.apache.fop.datatypes.ShadowEffect;
+
+/**
+ * Parent class for all of the individual property classes.  It also contains
+ * sets of integer constants for various types of data.
+ */
+
+public abstract class Properties {
+    /*
+     * The list of property data types.  These are used to form a bitmap of
+     * the property data types that are valid for values of each of the
+     * properties.
+     *
+     * Maintain the following list by
+     * in XEmacs:
+     *  set the region to cover the list, EXCLUDING the final (-ve) value
+     *  M-1 M-| followed by the command
+     * perl -p -e 'BEGIN{$n=0;$n2=0};$n2=2**$n,$n++ if s/= [0-9]+/= $n2/'
+     * in vi:
+     *  set a mark (ma) at the end of the list but one.
+     * Go to the beginning and
+     *  !'aperl -p -e ... etc
+     *
+     * N.B. The maximum value that can be handled in this way is
+     * 2^30 or 1073741824.  The -ve value is the equivalent of 2^31.
+     */
+    /**
+     * Constant specifying a property data type or types.
+     */
+
+    public static final int
+                         NOTYPE = 0
+                       ,INTEGER = 1
+                         ,FLOAT = 2
+                        ,LENGTH = 4
+                         ,ANGLE = 8
+                    ,PERCENTAGE = 16
+                   ,CHARACTER_T = 32
+                       ,LITERAL = 64
+                          ,NAME = 128
+                       ,COLOR_T = 256
+                     ,COUNTRY_T = 512
+                    ,LANGUAGE_T = 1024
+                      ,SCRIPT_T = 2048
+                          ,ID_T = 4096
+                         ,IDREF = 8192
+             ,URI_SPECIFICATION = 16384
+                          ,TIME = 32768
+                     ,FREQUENCY = 65536
+    // Pseudotypes
+                          ,BOOL = 131072
+                       ,INHERIT = 262144
+                          ,ENUM = 524288
+                   ,MAPPED_ENUM = 1048576
+                     ,SHORTHAND = 2097152
+                       ,COMPLEX = 4194304
+                          ,AUTO = 8388608
+                          ,NONE = 16777216
+                         ,AURAL = 33554432
+    // Color plus transparent
+                   ,COLOR_TRANS = 67108864
+                      ,MIMETYPE = 134217728
+                       ,FONTSET = 268435456
+    //                   ,SPARE = 536870912
+    //                   ,SPARE = 1073741824
+    //                   ,SPARE = -2147483648
+
+                        ,NUMBER = FLOAT | INTEGER
+                     ,ENUM_TYPE = ENUM | MAPPED_ENUM
+                        ,STRING = LITERAL | ENUM_TYPE
+                     ,HYPH_TYPE = COUNTRY_T | LANGUAGE_T | SCRIPT_T
+                       ,ID_TYPE = ID_T | IDREF
+                        ,NCNAME = NAME | ID_TYPE | HYPH_TYPE | ENUM_TYPE
+                   ,STRING_TYPE = STRING | NCNAME
+                      ,ANY_TYPE = ~0
+                                ;
+
+    /**
+     * @param datatypes <tt>int</tt> bitmap of datatype(s).
+     * @return <tt>String</tt> containing a list of text names of datatypes
+     * found in the bitmap.  Individual names are enclosed in angle brackets
+     * and separated by a vertical bar.  Psuedo-datatypes are in upper case.
+     * @exception PropertyException if no matches are found:
+     */
+    public static String listDataTypes(int datatypes) throws PropertyException
+    {
+        String typeNames = "";
+        if ((datatypes & ANY_TYPE) == ANY_TYPE) return "<ALL-TYPES>";
+        if ((datatypes & INTEGER) != 0) typeNames += "<integer>|";
+        if ((datatypes & NUMBER) != 0) typeNames += "<number>|";
+        if ((datatypes & LENGTH) != 0) typeNames += "<length>|";
+        if ((datatypes & ANGLE) != 0) typeNames += "<angle>|";
+        if ((datatypes & PERCENTAGE) != 0) typeNames += "<percentage>|";
+        if ((datatypes & CHARACTER_T) != 0) typeNames += "<character>|";
+        if ((datatypes & STRING) != 0) typeNames += "<string>|";
+        if ((datatypes & NAME) != 0) typeNames += "<name>|";
+        if ((datatypes & COLOR_T) != 0) typeNames += "<color>|";
+        if ((datatypes & COUNTRY_T) != 0) typeNames += "<country>|";
+        if ((datatypes & LANGUAGE_T) != 0) typeNames += "<language>|";
+        if ((datatypes & SCRIPT_T) != 0) typeNames += "<script>|";
+        if ((datatypes & ID_T) != 0) typeNames += "<id>|";
+        if ((datatypes & IDREF) != 0) typeNames += "<idref>|";
+        if ((datatypes & URI_SPECIFICATION) != 0) typeNames
+                                                    += "<uri-specification>|";
+        if ((datatypes & TIME) != 0) typeNames += "<time>|";
+        if ((datatypes & FREQUENCY) != 0) typeNames += "<frequency>|";
+        if ((datatypes & BOOL) != 0) typeNames += "<BOOL>|";
+        if ((datatypes & INHERIT) != 0) typeNames += "<INHERIT>|";
+        if ((datatypes & ENUM) != 0) typeNames += "<ENUM>|";
+        if ((datatypes & MAPPED_ENUM) != 0) typeNames += "<MAPPED_ENUM>|";
+        if ((datatypes & SHORTHAND) != 0) typeNames += "<SHORTHAND>|";
+        if ((datatypes & COMPLEX) != 0) typeNames += "<COMPLEX>|";
+        if ((datatypes & AUTO) != 0) typeNames += "<AUTO>|";
+        if ((datatypes & NONE) != 0) typeNames += "<NONE>|";
+        if ((datatypes & AURAL) != 0) typeNames += "<AURAL>|";
+        if ((datatypes & COLOR_TRANS) != 0) typeNames += "<COLOR_TRANS>|";
+        if ((datatypes & MIMETYPE) != 0) typeNames += "<MIMETYPE>|";
+        if ((datatypes & FONTSET) != 0) typeNames += "<FONTSET>|";
+
+        if (typeNames == "") throw new PropertyException
+                            ("No valid data type in " + datatypes);
+        return typeNames.substring(0, typeNames.length() - 1);
+    }
+
+    /**
+     * Constant specifying an initial data type or types.
+     */
+    public static final int
+                      NOTYPE_IT = 0
+                    ,INTEGER_IT = 1
+                     ,NUMBER_IT = 2
+                     ,LENGTH_IT = 4
+                      ,ANGLE_IT = 8
+                 ,PERCENTAGE_IT = 16
+                  ,CHARACTER_IT = 32
+                    ,LITERAL_IT = 64
+                       ,NAME_IT = 128
+                      ,COLOR_IT = 256
+                    ,COUNTRY_IT = 512
+          ,URI_SPECIFICATION_IT = 1024
+                       ,BOOL_IT = 2048
+                       ,ENUM_IT = 4096
+                       ,AUTO_IT = 8192
+                       ,NONE_IT = 16384
+                      ,AURAL_IT = 32768
+                    ,FONTSET_IT = 65536
+            ,TEXT_DECORATION_IT = 131072
+
+           ,USE_SET_FUNCTION_IT = ENUM_IT | BOOL_IT | INTEGER_IT
+                                    | NUMBER_IT | LENGTH_IT | ANGLE_IT
+                                    | PERCENTAGE_IT | CHARACTER_IT
+                                    | LITERAL_IT | NAME_IT
+                                    | URI_SPECIFICATION_IT | COLOR_IT
+                                    | TEXT_DECORATION_IT
+                              ;
+
+    /**
+     * Constant specifying mapping(s) of property to trait.
+     */
+    public static final int
+                       NO_TRAIT = 0
+                     ,RENDERING = 1
+                    ,DISAPPEARS = 2
+                 ,SHORTHAND_MAP = 4
+                        ,REFINE = 8
+                    ,FORMATTING = 16
+                 ,SPECIFICATION = 32
+                     ,NEW_TRAIT = 64
+                ,FONT_SELECTION = 128
+                  ,VALUE_CHANGE = 256
+                     ,REFERENCE = 512
+                        ,ACTION = 1024
+                         ,MAGIC = 2048
+                              ;
+
+    /**
+     * Constant specifying inheritance type.
+     */
+    public static final int
+                             NO = 0
+                      ,COMPUTED = 1
+                     ,SPECIFIED = 2
+                      ,COMPOUND = 3
+                ,VALUE_SPECIFIC = 4
+                              ;
+
+
+    /**
+     * Pseudo-property class for common border style values occurring in a
+     * number of classes.
+     */
+    public static class BorderCommonStyle extends Properties {
+        public static final int HIDDEN = 1;
+        public static final int DOTTED = 2;
+        public static final int DASHED = 3;
+        public static final int SOLID = 4;
+        public static final int DOUBLE = 5;
+        public static final int GROOVE = 6;
+        public static final int RIDGE = 7;
+        public static final int INSET = 8;
+        public static final int OUTSET = 9;
+
+        private static final String[] rwEnums = {
+            null
+            ,"hidden"
+            ,"dotted"
+            ,"dashed"
+            ,"solid"
+            ,"double"
+            ,"groove"
+            ,"ridge"
+            ,"inset"
+            ,"outset"
+        };
+        public static final ROStringArray enums = new ROStringArray(rwEnums);
+
+        private static final HashMap rwEnumValues;
+        public static final Map enumValues;
+        static {
+            rwEnumValues = new HashMap(rwEnums.length);
+            for (int i = 1; i < rwEnums.length; i++ ) {
+                rwEnumValues.put((Object)rwEnums[i],
+                                    (Object) Ints.consts.get(i));
+            }
+            enumValues =
+                Collections.unmodifiableMap((Map)rwEnumValues);
+        }
+    }
+
+    /**
+     * Pseudo-property class for common border width values occurring in a
+     * number of classes.
+     */
+    public static class BorderCommonWidth extends Properties {
+        public static final int THIN = 1;
+        public static final int MEDIUM = 2;
+        public static final int THICK = 3;
+
+        private static final String[] rwEnums = {
+            null
+            ,"thin"
+            ,"medium"
+            ,"thick"
+        };
+        public static final ROStringArray enums = new ROStringArray(rwEnums);
+
+        public static final ROStringArray enumValues = enums;
+
+        // N.B. If these values change, all initial values expressed in these
+        // terms must be manually changed.
+        private static final String[] rwEnumMappings = {
+            null
+            ,"0.5pt"
+            ,"1pt"
+            ,"2pt"
+        };
+
+        public static final ROStringArray enumMappings
+                                        = new ROStringArray(rwEnumMappings);
+    }
+
+    /**
+     * Pseudo-property class for common color values occurring in a
+     * number of classes.
+     */
+    public static class ColorCommon extends Properties {
+        public static final int AQUA = 1;
+        public static final int BLACK = 2;
+        public static final int BLUE = 3;
+        public static final int FUSCHIA = 4;
+        public static final int GRAY = 5;
+        public static final int GREEN = 6;
+        public static final int LIME = 7;
+        public static final int MAROON = 8;
+        public static final int NAVY = 9;
+        public static final int OLIVE = 10;
+        public static final int PURPLE = 11;
+        public static final int RED = 12;
+        public static final int SILVER = 13;
+        public static final int TEAL = 14;
+        public static final int WHITE = 15;
+        public static final int YELLOW = 16;
+        public static final int TRANSPARENT = 17;
+
+        private static final String[] rwEnums = {
+            null
+            ,"aqua"
+            ,"black"
+            ,"blue"
+            ,"fuschia"
+            ,"gray"
+            ,"green"
+            ,"lime"
+            ,"maroon"
+            ,"navy"
+            ,"olive"
+            ,"purple"
+            ,"red"
+            ,"silver"
+            ,"teal"
+            ,"white"
+            ,"yellow"
+            ,"transparent"
+        };
+        public static final ROStringArray enums = new ROStringArray(rwEnums);
+
+        private static final HashMap rwColorEnums;
+        static {
+            rwColorEnums = new HashMap(rwEnums.length);
+            for (int i = 1; i < rwEnums.length - 1; i++ ) {
+                rwColorEnums.put((Object)rwEnums[i],
+                                    (Object) Ints.consts.get(i));
+            }
+        }
+        /**
+         * <tt>colorEnums</tt> exclude "transparent"
+         */
+        public static final Map colorEnums =
+                Collections.unmodifiableMap((Map)rwColorEnums);
+
+
+        private static final HashMap rwColorTransEnums;
+        static {
+            int i = rwEnums.length - 1;
+            rwColorTransEnums = new HashMap(rwColorEnums);
+            rwColorTransEnums.put((Object)rwEnums[i],
+                                    (Object) Ints.consts.get(i));
+        }
+        /**
+         * <tt>colorTransEnums</tt> include <tt>colorEnums</tt> and
+         * "transparent".
+         */
+        public static final Map colorTransEnums =
+            Collections.unmodifiableMap((Map)rwColorTransEnums);
+    }
+
+
+    public static class NoProperty extends Properties {
+        // dataTypes was set to ANY_TYPE.  This meant that any property
+        // type would be valid with NoProperty.  It caused problems with
+        // initialization looking for complex().  I cannot now see the
+        // rationale for such a setting.  Resetting to NOTYPE.
+        // pbw 23/01/02
+        public static final int dataTypes = NOTYPE;
+        public static final int traitMapping = NO_TRAIT;
+        public static final int initialValueType = NOTYPE_IT;
+
+        public static final int inherited = NO;
+
+        private static final String[] rwEnums = {
+            null
+            ,"-----NoEnum-----"
+        };
+        public static final ROStringArray enums = new ROStringArray(rwEnums);
+
+        public static final ROStringArray enumValues = enums;
+    }
+
+
+    public static class AbsolutePosition extends Properties {
+        public static final int dataTypes = AUTO | ENUM | INHERIT;
+        public static final int traitMapping = NEW_TRAIT;
+        public static final int initialValueType = AUTO_IT;
+        public static final int ABSOLUTE = 1;
+        public static final int FIXED = 2;
+
+        public static final int inherited = NO;
+
+        private static final String[] rwEnums = {
+            null
+            ,"absolute"
+            ,"fixed"
+        };
+        public static final ROStringArray enums = new ROStringArray(rwEnums);
+
+        public static final ROStringArray enumValues = enums;
+    }
+
+
+    public static class ActiveState extends Properties {
+        public static final int dataTypes = ENUM;
+        public static final int traitMapping = ACTION;
+        public static final int initialValueType = NOTYPE_IT;
+        public static final int LINK = 1;
+        public static final int VISITED = 2;
+        public static final int ACTIVE = 3;
+        public static final int HOVER = 4;
+        public static final int FOCUS = 5;
+
+        public static final int inherited = NO;
+
+        private static final String[] rwEnums = {
+            null
+            ,"link"
+            ,"visited"
+            ,"active"
+            ,"hover"
+            ,"focus"
+        };
+        public static final ROStringArray enums = new ROStringArray(rwEnums);
+
+        private static final HashMap rwEnumValues;
+        public static final Map enumValues;
+        static {
+            rwEnumValues = new HashMap(rwEnums.length);
+            for (int i = 1; i < rwEnums.length; i++ ) {
+                rwEnumValues.put((Object)rwEnums[i],
+                                    (Object) Ints.consts.get(i));
+            }
+            enumValues =
+                Collections.unmodifiableMap((Map)rwEnumValues);
+        }
+    }
+
+
+    public static class AlignmentAdjust extends Properties {
+        public static final int dataTypes =
+                                AUTO | ENUM | PERCENTAGE | LENGTH | INHERIT;
+        public static final int traitMapping = FORMATTING;
+        public static final int initialValueType = AUTO_IT;
+        public static final int BASELINE = 1;
+        public static final int BEFORE_EDGE = 2;
+        public static final int TEXT_BEFORE_EDGE = 3;
+        public static final int MIDDLE = 4;
+        public static final int CENTRAL = 5;
+        public static final int AFTER_EDGE = 6;
+        public static final int TEXT_AFTER_EDGE = 7;
+        public static final int IDEOGRAPHIC = 8;
+        public static final int ALPHABETIC = 9;
+        public static final int HANGING = 10;
+        public static final int MATHEMATICAL = 11;
+
+        public static final int inherited = NO;
+
+        private static final String[] rwEnums = {
+            null
+            ,"baseline"
+            ,"before-edge"
+            ,"text-before-edge"
+            ,"middle"
+            ,"central"
+            ,"after-edge"
+            ,"text-after-edge"
+            ,"ideographic"
+            ,"alphabetic"
+            ,"hanging"
+            ,"mathematical"
+        };
+        public static final ROStringArray enums = new ROStringArray(rwEnums);
+
+        private static final HashMap rwEnumValues;
+        public static final Map enumValues;
+        static {
+            rwEnumValues = new HashMap(rwEnums.length);
+            for (int i = 1; i < rwEnums.length; i++ ) {
+                rwEnumValues.put((Object)rwEnums[i],
+                                    (Object) Ints.consts.get(i));
+            }
+            enumValues =
+                Collections.unmodifiableMap((Map)rwEnumValues);
+        }
+    }
+
+
+    public static class AlignmentBaseline extends Properties {
+        public static final int dataTypes = AUTO | ENUM | INHERIT;
+        public static final int traitMapping = FORMATTING;
+        public static final int initialValueType = AUTO_IT;
+        public static final int BASELINE = 1;
+        public static final int BEFORE_EDGE = 2;
+        public static final int TEXT_BEFORE_EDGE = 3;
+        public static final int MIDDLE = 4;
+        public static final int CENTRAL = 5;
+        public static final int AFTER_EDGE = 6;
+        public static final int TEXT_AFTER_EDGE = 7;
+        public static final int IDEOGRAPHIC = 8;
+        public static final int ALPHABETIC = 9;
+        public static final int HANGING = 10;
+        public static final int MATHEMATICAL = 11;
+
+        public static final int inherited = NO;
+
+        private static final String[] rwEnums = {
+            null
+            ,"baseline"
+            ,"before-edge"
+            ,"text-before-edge"
+            ,"middle"
+            ,"central"
+            ,"after-edge"
+            ,"text-after-edge"
+            ,"ideographic"
+            ,"alphabetic"
+            ,"hanging"
+            ,"mathematical"
+        };
+        public static final ROStringArray enums = new ROStringArray(rwEnums);
+
+        private static final HashMap rwEnumValues;
+        public static final Map enumValues;
+        static {
+            rwEnumValues = new HashMap(rwEnums.length);
+            for (int i = 1; i < rwEnums.length; i++ ) {
+                rwEnumValues.put((Object)rwEnums[i],
+                                    (Object) Ints.consts.get(i));
+            }
+            enumValues =
+                Collections.unmodifiableMap((Map)rwEnumValues);
+        }
+    }
+
+    public static class AutoRestore extends Properties {
+        public static final int dataTypes = BOOL;
+        public static final int traitMapping = ACTION;
+        public static final int initialValueType = BOOL_IT;
+        protected static Bool initialValue;
+        public static void setInitialValue(FOTree foTree) {
+            try {
+                initialValue = new Bool(PropNames.AUTO_RESTORE, true);
+            } catch (PropertyException e) {
+                throw new RuntimeException
+                                    ("PropertyException: " + e.getMessage());
+            }
+        }
+        public static final int inherited = COMPUTED;
+    }
+
+    public static class Azimuth extends Properties {
+        public static final int dataTypes = AURAL;
+        public static final int traitMapping = RENDERING;
+        public static final int initialValueType = AURAL_IT;
+        public static final int inherited = COMPUTED;
+    }
+
+    public static class Background extends Properties {
+        public static final int dataTypes = SHORTHAND;
+        public static final int traitMapping = SHORTHAND_MAP;
+        public static final int initialValueType = NOTYPE_IT;
+        public static final int inherited = NO;
+    }
+
+    public static class BackgroundAttachment extends Properties {
+        public static final int dataTypes = ENUM | INHERIT;
+        public static final int traitMapping = RENDERING;
+        public static final int initialValueType = ENUM_IT;
+        public static final int SCROLL = 1;
+        public static final int FIXED = 2;
+        protected static EnumType initialValue;
+        public static void setInitialValue(FOTree foTree) {
+            try {
+                initialValue = new EnumType
+                            (PropNames.BACKGROUND_ATTACHMENT, SCROLL);
+            } catch (PropertyException e) {
+                System.out.println("EnumType exception: " + e.getMessage()); //DEBUG
+                throw new RuntimeException
+                                    ("PropertyException: " + e.getMessage());
+            }
+        }
+
+        public static final int inherited = NO;
+
+        private static final String[] rwEnums = {
+            null
+            ,"scroll"
+            ,"fixed"
+        };
+        public static final ROStringArray enums = new ROStringArray(rwEnums);
+
+        public static final ROStringArray enumValues = enums;
+    }
+
+    public static class BackgroundColor extends Properties {
+        public static final int dataTypes = COLOR_TRANS | INHERIT;
+        public static final int traitMapping = RENDERING;
+        public static final int initialValueType = COLOR_IT;
+        protected static ColorType initialValue;
+        public static void setInitialValue(FOTree foTree) {
+            try {
+                initialValue = new ColorType
+                        (PropNames.BACKGROUND_COLOR, "transparent");
+            } catch (PropertyException e) {
+                throw new RuntimeException
+                                    ("PropertyException: " + e.getMessage());
+            }
+        }
+
+        public static final int inherited = NO;
+
+        public static final ROStringArray enums = ColorCommon.enums;
+        public static final Map enumValues = ColorCommon.colorTransEnums;
+    }
+
+    public static class BackgroundImage extends Properties {
+        public static final int dataTypes = URI_SPECIFICATION | NONE | INHERIT;
+        public static final int traitMapping = RENDERING;
+        public static final int initialValueType = NONE_IT;
+
+        public static final int inherited = NO;
+    }
+
+    public static class BackgroundPosition extends Properties {
+        public static final int dataTypes = SHORTHAND;
+        public static final int traitMapping = SHORTHAND_MAP;
+        public static final int initialValueType = NOTYPE_IT;
+        public static final int inherited = NO;
+    }
+
+    public static class BackgroundPositionHorizontal extends Properties {
+        public static final int dataTypes =
+                                        PERCENTAGE | LENGTH | ENUM | INHERIT;
+        public static final int traitMapping = VALUE_CHANGE;
+        public static final int initialValueType = PERCENTAGE_IT;
+        public static final int LEFT = 1;
+        public static final int CENTER = 2;
+        public static final int RIGHT = 3;
+        protected static Numeric initialValue;
+        public static void setInitialValue(FOTree foTree) {
+            try {
+                initialValue = Percentage.makePercentage
+                            (PropNames.BACKGROUND_POSITION_HORIZONTAL, 0.0d);
+            } catch (PropertyException e) {
+                throw new RuntimeException
+                                    ("PropertyException: " + e.getMessage());
+            }
+        }
+        public static final int inherited = NO;
+
+        private static final String[] rwEnums = {
+            null
+            ,"left"
+            ,"center"
+            ,"right"
+        };
+        public static final ROStringArray enums = new ROStringArray(rwEnums);
+
+        public static final ROStringArray enumValues = enums;
+    }
+
+
+    public static class BackgroundPositionVertical extends Properties {
+        public static final int dataTypes =
+                                        PERCENTAGE | LENGTH | ENUM | INHERIT;
+        public static final int traitMapping = VALUE_CHANGE;
+        public static final int initialValueType = PERCENTAGE_IT;
+        public static final int TOP = 1;
+        public static final int CENTER = 2;
+        public static final int BOTTOM = 3;
+        protected static Numeric initialValue;
+        public static void setInitialValue(FOTree foTree) {
+            try {
+                initialValue = Percentage.makePercentage
+                            (PropNames.BACKGROUND_POSITION_VERTICAL, 0.0d);
+            } catch (PropertyException e) {
+                throw new RuntimeException
+                                    ("PropertyException: " + e.getMessage());
+            }
+        }
+        public static final int inherited = NO;
+
+        private static final String[] rwEnums = {
+            null
+            ,"top"
+            ,"center"
+            ,"bottom"
+        };
+        public static final ROStringArray enums = new ROStringArray(rwEnums);
+
+        public static final ROStringArray enumValues = enums;
+    }
+
+    public static class BackgroundRepeat extends Properties {
+        public static final int dataTypes = ENUM | INHERIT;
+        public static final int traitMapping = RENDERING;
+        public static final int initialValueType = ENUM_IT;
+        public static final int REPEAT = 1;
+        public static final int REPEAT_X = 2;
+        public static final int REPEAT_Y = 3;
+        public static final int NO_REPEAT = 4;
+        protected static EnumType initialValue;
+        public static void setInitialValue(FOTree foTree) {
+            try {
+                initialValue = new EnumType
+                                (PropNames.BACKGROUND_REPEAT, REPEAT);
+            } catch (PropertyException e) {
+                throw new RuntimeException
+                                    ("PropertyException: " + e.getMessage());
+            }
+        }
+
+        public static final int inherited = NO;
+
+        private static final String[] rwEnums = {
+            null
+            ,"repeat"
+            ,"repeat-x"
+            ,"repeat-y"
+            ,"no-repeat"
+        };
+        public static final ROStringArray enums = new ROStringArray(rwEnums);
+
+        public static final ROStringArray enumValues = enums;
+    }
+
+
+    public static class BaselineShift extends Properties {
+        public static final int dataTypes =
+                                        PERCENTAGE | LENGTH | ENUM | INHERIT;
+        public static final int traitMapping = FORMATTING;
+        public static final int initialValueType = ENUM_IT;
+        public static final int BASELINE = 1;
+        public static final int SUB = 2;
+        public static final int SUPER = 3;
+        protected static EnumType initialValue;
+        public static void setInitialValue(FOTree foTree) {
+            try {
+                initialValue = new EnumType
+                                (PropNames.BASELINE_SHIFT, BASELINE);
+            } catch (PropertyException e) {
+                throw new RuntimeException
+                                    ("PropertyException: " + e.getMessage());
+            }
+        }
+
+        public static final int inherited = NO;
+
+        private static final String[] rwEnums = {
+            null
+            ,"baseline"
+            ,"sub"
+            ,"super"
+        };
+        public static final ROStringArray enums = new ROStringArray(rwEnums);
+
+        public static final ROStringArray enumValues = enums;
+    }
+
+    public static class BlankOrNotBlank extends Properties {
+        public static final int dataTypes = ENUM | INHERIT;
+        public static final int traitMapping = SPECIFICATION;
+        public static final int initialValueType = ENUM_IT;
+        public static final int BLANK = 1;
+        public static final int NOT_BLANK = 2;
+        public static final int ANY = 3;
+        protected static EnumType initialValue;
+        public static void setInitialValue(FOTree foTree) {
+            try {
+                initialValue = new EnumType
+                                (PropNames.BLANK_OR_NOT_BLANK, ANY);
+            } catch (PropertyException e) {
+                throw new RuntimeException
+                                    ("PropertyException: " + e.getMessage());
+            }
+        }
+
+        public static final int inherited = NO;
+
+        private static final String[] rwEnums = {
+            null
+            ,"blank"
+            ,"not-blank"
+            ,"any"
+        };
+        public static final ROStringArray enums = new ROStringArray(rwEnums);
+
+        public static final ROStringArray enumValues = enums;
+    }
+
+    public static class BlockProgressionDimension extends Properties {
+        public static final int dataTypes =
+                                        PERCENTAGE | LENGTH | AUTO | INHERIT;
+        public static final int traitMapping = FORMATTING;
+        public static final int initialValueType = AUTO_IT;
+        public static final int inherited = NO;
+    }
+
+    public static class BlockProgressionDimensionMinimum extends Properties {
+        public static final int dataTypes = PERCENTAGE | LENGTH | AUTO;
+        public static final int traitMapping = FORMATTING;
+        public static final int initialValueType = AUTO_IT;
+        public static final int inherited = COMPOUND;
+    }
+
+    public static class BlockProgressionDimensionOptimum extends Properties {
+        public static final int dataTypes = PERCENTAGE | LENGTH | AUTO;
+        public static final int traitMapping = FORMATTING;
+        public static final int initialValueType = AUTO_IT;
+        public static final int inherited = COMPOUND;
+    }
+
+    public static class BlockProgressionDimensionMaximum extends Properties {
+        public static final int dataTypes = PERCENTAGE | LENGTH | AUTO;
+        public static final int traitMapping = FORMATTING;
+        public static final int initialValueType = AUTO_IT;
+        public static final int inherited = COMPOUND;
+    }
+
+    public static class Border extends Properties {
+        public static final int dataTypes = SHORTHAND;
+        public static final int traitMapping = SHORTHAND_MAP;
+        public static final int initialValueType = NOTYPE_IT;
+        public static final int inherited = NO;
+    }
+
+    public static class Conditionality extends Properties {
+        public static final int DISCARD = 1;
+        public static final int RETAIN = 2;
+
+        private static final String[] rwEnums = {
+            null
+            ,"discard"
+            ,"retain"
+        };
+        public static final ROStringArray enums = new ROStringArray(rwEnums);
+
+        public static final ROStringArray enumValues = enums;
+    }
+
+    public static class BorderAfterColor extends Properties {
+        public static final int dataTypes = COLOR_T | INHERIT;
+        public static final int traitMapping = RENDERING;
+        public static final int initialValueType = COLOR_IT;
+        public static final int inherited = NO;
+        protected static ColorType initialValue;
+        public static void setInitialValue(FOTree foTree) {
+            try {
+                initialValue = new ColorType
+                        (PropNames.BACKGROUND_COLOR, ColorCommon.BLACK);
+            } catch (PropertyException e) {
+                throw new RuntimeException
+                                    ("PropertyException: " + e.getMessage());
+            }
+        }
+
+        public static final ROStringArray enums = ColorCommon.enums;
+        private static final HashMap rwEnumValues = ColorCommon.rwColorEnums;
+    }
+
+    public static class BorderAfterPrecedence extends Properties {
+        public static final int dataTypes = INTEGER | ENUM | INHERIT;
+        public static final int traitMapping = FORMATTING;
+        public static final int initialValueType = NOTYPE_IT;
+        public static final int inherited = NO;
+
+        public static final ROStringArray enums = PrecedenceCommon.enums;
+        public static final ROStringArray enumValues
+                                            = PrecedenceCommon.enumValues;
+    }
+
+    public static class BorderAfterStyle extends Properties {
+        public static final int dataTypes = ENUM | INHERIT;
+        public static final int traitMapping = RENDERING;
+        public static final int initialValueType = NOTYPE_IT;
+        public static final String initialValue = "none";
+
+        public static final int inherited = NO;
+
+        public static final ROStringArray enums = BorderCommonStyle.enums;
+        private static final HashMap rwEnumValues
+                                            = BorderCommonStyle.rwEnumValues;
+    }
+
+    // Initial value for BorderAfterWidth is tne mapped enumerated value
+    // "medium".  This maps to 1pt.  There is no way at present to
+    // automatically update the following initial Length PropertyValue
+    // if the mapping changes.
+    public static class BorderAfterWidth extends Properties {
+        public static final int dataTypes = MAPPED_ENUM | LENGTH | INHERIT;
+        public static final int traitMapping = FORMATTING | RENDERING;
+        public static final int initialValueType = LENGTH_IT;
+        protected static Numeric initialValue;
+        public static void setInitialValue(FOTree foTree) {
+            try {
+                initialValue = Length.makeLength
+                                (PropNames.BORDER_AFTER_WIDTH, 1d, Length.PT);
+            } catch (PropertyException e) {
+                throw new RuntimeException
+                                    ("PropertyException: " + e.getMessage());
+            }
+        }
+
+        public static final int inherited = NO;
+
+        public static final ROStringArray enums = BorderCommonWidth.enums;
+        public static final ROStringArray enumValues
+                                            = BorderCommonWidth.enumValues;
+        public static final ROStringArray enumMappings
+                                            = BorderCommonWidth.enumMappings;
+    }
+
+    public static class BorderAfterWidthLength extends Properties {
+        public static final int dataTypes = LENGTH;
+        public static final int traitMapping = FORMATTING | RENDERING;
+        public static final int initialValueType = NOTYPE_IT;
+        public static final int inherited = COMPOUND;
+    }
+
+    public static class BorderAfterWidthConditionality extends Properties {
+        public static final int dataTypes = ENUM;
+        public static final int traitMapping = FORMATTING | RENDERING;
+        public static final int initialValueType = ENUM_IT;
+        protected static EnumType initialValue;
+        public static void setInitialValue(FOTree foTree) {
+            try {
+                initialValue =
+                    new EnumType(PropNames.BORDER_AFTER_WIDTH_CONDITIONALITY,
+                                            Conditionality.DISCARD);
+            } catch (PropertyException e) {
+                throw new RuntimeException
+                                    ("PropertyException: " + e.getMessage());
+            }
+        }
+        public static final int inherited = COMPOUND;
+
+        public static final ROStringArray enums = Conditionality.enums;
+        public static final ROStringArray enumValues
+                                            = Conditionality.enumValues;
+    }
+
+    public static class BorderBeforeColor extends Properties {
+        public static final int dataTypes = COLOR_T | INHERIT;
+        public static final int traitMapping = RENDERING;
+        public static final int initialValueType = COLOR_IT;
+        public static final int inherited = NO;
+        protected static ColorType initialValue;
+        public static void setInitialValue(FOTree foTree) {
+            try {
+                initialValue = new ColorType
+                        (PropNames.BACKGROUND_COLOR, ColorCommon.BLACK);
+            } catch (PropertyException e) {
+                throw new RuntimeException
+                                    ("PropertyException: " + e.getMessage());
+            }
+        }
+
+        public static final ROStringArray enums = ColorCommon.enums;
+        private static final HashMap rwEnumValues = ColorCommon.rwColorEnums;
+    }
+
+    public static class BorderBeforePrecedence extends Properties {
+        public static final int dataTypes = INTEGER | ENUM | INHERIT;
+        public static final int traitMapping = FORMATTING;
+        public static final int initialValueType = NOTYPE_IT;
+        public static final int inherited = NO;
+
+        public static final ROStringArray enums = PrecedenceCommon.enums;
+        public static final ROStringArray enumValues
+                                            = PrecedenceCommon.enumValues;
+    }
+
+    public static class BorderBeforeStyle extends Properties {
+        public static final int dataTypes = ENUM | NONE | INHERIT;
+        public static final int traitMapping = RENDERING;
+        public static final int initialValueType = NONE_IT;
+
+        public static final int inherited = NO;
+
+        public static final ROStringArray enums = BorderCommonStyle.enums;
+        private static final HashMap rwEnumValues
+                                            = BorderCommonStyle.rwEnumValues;
+    }
+
+    public static class BorderBeforeWidth extends Properties {
+        public static final int dataTypes = MAPPED_ENUM | LENGTH | INHERIT;
+        public static final int traitMapping = FORMATTING | RENDERING;
+        public static final int initialValueType = LENGTH_IT;
+        protected static Numeric initialValue;
+        public static void setInitialValue(FOTree foTree) {
+            try {
+                initialValue = Length.makeLength
+                                (PropNames.BORDER_BEFORE_WIDTH, 1d, Length.PT);
+            } catch (PropertyException e) {
+                throw new RuntimeException
+                                    ("PropertyException: " + e.getMessage());
+            }
+        }
+
+        public static final int inherited = NO;
+
+        public static final ROStringArray enums = BorderCommonWidth.enums;
+        public static final ROStringArray enumValues
+                                            = BorderCommonWidth.enumValues;
+        public static final ROStringArray enumMappings
+                                            = BorderCommonWidth.enumMappings;
+    }
+
+    public static class BorderBeforeWidthLength extends Properties {
+        public static final int dataTypes = LENGTH;
+        public static final int traitMapping = FORMATTING | RENDERING;
+        public static final int initialValueType = NOTYPE_IT;
+        public static final int inherited = COMPOUND;
+    }
+
+    public static class BorderBeforeWidthConditionality extends Properties {
+        public static final int dataTypes = ENUM;
+        public static final int traitMapping = FORMATTING | RENDERING;
+        public static final int initialValueType = ENUM_IT;
+        protected static EnumType initialValue;
+        public static void setInitialValue(FOTree foTree) {
+            try {
+                initialValue =
+                    new EnumType(PropNames.BORDER_BEFORE_WIDTH_CONDITIONALITY,
+                                            Conditionality.DISCARD);
+            } catch (PropertyException e) {
+                throw new RuntimeException
+                                    ("PropertyException: " + e.getMessage());
+            }
+        }
+        public static final int inherited = COMPOUND;
+
+        public static final ROStringArray enums = Conditionality.enums;
+        public static final ROStringArray enumValues
+                                            = Conditionality.enumValues;
+    }
+
+    public static class BorderBottom extends Properties {
+        public static final int dataTypes = SHORTHAND;
+        public static final int traitMapping = SHORTHAND_MAP;
+        public static final int initialValueType = NOTYPE_IT;
+        public static final int inherited = NO;
+    }
+
+    public static class BorderBottomColor extends Properties {
+        public static final int dataTypes = COLOR_T | INHERIT;
+        public static final int traitMapping = DISAPPEARS;
+        public static final int initialValueType = COLOR_IT;
+        public static final int inherited = NO;
+        protected static ColorType initialValue;
+        public static void setInitialValue(FOTree foTree) {
+            try {
+                initialValue = new ColorType
+                        (PropNames.BACKGROUND_COLOR, ColorCommon.BLACK);
+            } catch (PropertyException e) {
+                throw new RuntimeException
+                                    ("PropertyException: " + e.getMessage());
+            }
+        }
+
+        public static final ROStringArray enums = ColorCommon.enums;
+        private static final HashMap rwEnumValues = ColorCommon.rwColorEnums;
+    }
+
+    public static class BorderBottomStyle extends Properties {
+        public static final int dataTypes = ENUM | NONE | INHERIT;
+        public static final int traitMapping = DISAPPEARS;
+        public static final int initialValueType = NONE_IT;
+
+        public static final int inherited = NO;
+
+        public static final ROStringArray enums = BorderCommonStyle.enums;
+        private static final HashMap rwEnumValues
+                                            = BorderCommonStyle.rwEnumValues;
+    }
+
+    public static class BorderBottomWidth extends Properties {
+        public static final int dataTypes = MAPPED_ENUM | INHERIT;
+        public static final int traitMapping = DISAPPEARS;
+        public static final int initialValueType = LENGTH_IT;
+        protected static Numeric initialValue;
+        public static void setInitialValue(FOTree foTree) {
+            try {
+                initialValue = Length.makeLength
+                                (PropNames.BORDER_BOTTOM_WIDTH, 1d, Length.PT);
+            } catch (PropertyException e) {
+                throw new RuntimeException
+                                    ("PropertyException: " + e.getMessage());
+            }
+        }
+
+        public static final int inherited = NO;
+
+        public static final ROStringArray enums = BorderCommonWidth.enums;
+        public static final ROStringArray enumValues
+                                            = BorderCommonWidth.enumValues;
+        public static final ROStringArray enumMappings
+                                            = BorderCommonWidth.enumMappings;
+    }
+
+    public static class BorderCollapse extends Properties {
+        public static final int dataTypes = ENUM | INHERIT;
+        public static final int traitMapping = FORMATTING;
+        public static final int initialValueType = ENUM_IT;
+        public static final int COLLAPSE = 1;
+        public static final int SEPARATE = 2;
+        protected static EnumType initialValue;
+        public static void setInitialValue(FOTree foTree) {
+            try {
+                initialValue =
+                            new EnumType
+                                (PropNames.BORDER_COLLAPSE, COLLAPSE);
+            } catch (PropertyException e) {
+                throw new RuntimeException
+                                    ("PropertyException: " + e.getMessage());
+            }
+        }
+
+        public static final int inherited = COMPUTED;
+
+        private static final String[] rwEnums = {
+            null
+            ,"collapse"
+            ,"separate"
+        };
+        public static final ROStringArray enums = new ROStringArray(rwEnums);
+
+        public static final ROStringArray enumValues = enums;
+    }
+
+    public static class BorderColor extends Properties {
+        public static final int dataTypes = SHORTHAND;
+        public static final int traitMapping = SHORTHAND_MAP;
+        public static final int initialValueType = NOTYPE_IT;
+        public static final int inherited = NO;
+    }
+
+    public static class BorderEndColor extends Properties {
+        public static final int dataTypes = COLOR_T | INHERIT;
+        public static final int traitMapping = RENDERING;
+        public static final int initialValueType = COLOR_IT;
+        public static final int inherited = NO;
+        protected static ColorType initialValue;
+        public static void setInitialValue(FOTree foTree) {
+            try {
+                initialValue = new ColorType
+                        (PropNames.BACKGROUND_COLOR, ColorCommon.BLACK);
+            } catch (PropertyException e) {
+                throw new RuntimeException
+                                    ("PropertyException: " + e.getMessage());
+            }
+        }
+
+        public static final ROStringArray enums = ColorCommon.enums;
+        private static final HashMap rwEnumValues = ColorCommon.rwColorEnums;
+    }
+
+    public static class BorderEndPrecedence extends Properties {
+        public static final int dataTypes = INTEGER | ENUM | INHERIT;
+        public static final int traitMapping = FORMATTING;
+        public static final int initialValueType = NOTYPE_IT;
+        public static final int inherited = NO;
+
+        public static final ROStringArray enums = PrecedenceCommon.enums;
+        public static final ROStringArray enumValues
+                                            = PrecedenceCommon.enumValues;
+    }
+
+    public static class BorderEndStyle extends Properties {
+        public static final int dataTypes = ENUM | NONE | INHERIT;
+        public static final int traitMapping = RENDERING;
+        public static final int initialValueType = NONE_IT;
+
+        public static final int inherited = NO;
+
+        public static final ROStringArray enums = BorderCommonStyle.enums;
+        private static final HashMap rwEnumValues
+                                            = BorderCommonStyle.rwEnumValues;
+    }
+
+    public static class BorderEndWidth extends Properties {
+        public static final int dataTypes = MAPPED_ENUM | LENGTH | INHERIT;
+        public static final int traitMapping = FORMATTING | RENDERING;
+        public static final int initialValueType = LENGTH_IT;
+        protected static Numeric initialValue;
+        public static void setInitialValue(FOTree foTree) {
+            try {
+                initialValue = Length.makeLength
+                                (PropNames.BORDER_END_WIDTH, 1d, Length.PT);
+            } catch (PropertyException e) {
+                throw new RuntimeException
+                                    ("PropertyException: " + e.getMessage());
+            }
+        }
+
+        public static final int inherited = NO;
+
+        public static final ROStringArray enums = BorderCommonWidth.enums;
+        public static final ROStringArray enumValues
+                                            = BorderCommonWidth.enumValues;
+        public static final ROStringArray enumMappings
+                                            = BorderCommonWidth.enumMappings;
+    }
+
+    public static class BorderEndWidthLength extends Properties {
+        public static final int dataTypes = LENGTH;
+        public static final int traitMapping = FORMATTING | RENDERING;
+        public static final int initialValueType = NOTYPE_IT;
+        public static final int inherited = COMPOUND;
+    }
+
+    public static class BorderEndWidthConditionality extends Properties {
+        public static final int dataTypes = ENUM;
+        public static final int traitMapping = FORMATTING | RENDERING;
+        public static final int initialValueType = ENUM_IT;
+        protected static EnumType initialValue;
+        public static void setInitialValue(FOTree foTree) {
+            try {
+                initialValue =
+                    new EnumType(PropNames.BORDER_END_WIDTH_CONDITIONALITY,
+                                            Conditionality.DISCARD);
+            } catch (PropertyException e) {
+                throw new RuntimeException
+                                    ("PropertyException: " + e.getMessage());
+            }
+        }
+        public static final int inherited = COMPOUND;
+
+        public static final ROStringArray enums = Conditionality.enums;
+        public static final ROStringArray enumValues
+                                            = Conditionality.enumValues;
+    }
+
+    public static class BorderLeft extends Properties {
+        public static final int dataTypes = SHORTHAND;
+        public static final int traitMapping = SHORTHAND_MAP;
+        public static final int initialValueType = NOTYPE_IT;
+        public static final int inherited = NO;
+    }
+
+    public static class BorderLeftColor extends Properties {
+        public static final int dataTypes = COLOR_T | INHERIT;
+        public static final int traitMapping = DISAPPEARS;
+        public static final int initialValueType = COLOR_IT;
+        public static final int inherited = NO;
+        protected static ColorType initialValue;
+        public static void setInitialValue(FOTree foTree) {
+            try {
+                initialValue = new ColorType
+                        (PropNames.BACKGROUND_COLOR, ColorCommon.BLACK);
+            } catch (PropertyException e) {
+                throw new RuntimeException
+                                    ("PropertyException: " + e.getMessage());
+            }
+        }
+
+        public static final ROStringArray enums = ColorCommon.enums;
+        private static final HashMap rwEnumValues = ColorCommon.rwColorEnums;
+    }
+
+    public static class BorderLeftStyle extends Properties {
+        public static final int dataTypes = ENUM | NONE | INHERIT;
+        public static final int traitMapping = DISAPPEARS;
+        public static final int initialValueType = NONE_IT;
+
+        public static final int inherited = NO;
+
+        public static final ROStringArray enums = BorderCommonStyle.enums;
+        private static final HashMap rwEnumValues
+                                            = BorderCommonStyle.rwEnumValues;
+    }
+
+    public static class BorderLeftWidth extends Properties {
+        public static final int dataTypes = MAPPED_ENUM | INHERIT;
+        public static final int traitMapping = DISAPPEARS;
+        public static final int initialValueType = LENGTH_IT;
+        protected static Numeric initialValue;
+        public static void setInitialValue(FOTree foTree) {
+            try {
+                initialValue = Length.makeLength
+                                (PropNames.BORDER_LEFT_WIDTH, 1d, Length.PT);
+            } catch (PropertyException e) {
+                throw new RuntimeException
+                                    ("PropertyException: " + e.getMessage());
+            }
+        }
+
+        public static final int inherited = NO;
+
+        public static final ROStringArray enums = BorderCommonWidth.enums;
+        public static final ROStringArray enumValues
+                                            = BorderCommonWidth.enumValues;
+        public static final ROStringArray enumMappings
+                                            = BorderCommonWidth.enumMappings;
+    }
+
+    public static class BorderRight extends Properties {
+        public static final int dataTypes = SHORTHAND;
+        public static final int traitMapping = SHORTHAND_MAP;
+        public static final int initialValueType = NOTYPE_IT;
+        public static final int inherited = NO;
+    }
+
+    public static class BorderRightColor extends Properties {
+        public static final int dataTypes = COLOR_T | INHERIT;
+        public static final int traitMapping = DISAPPEARS;
+        public static final int initialValueType = COLOR_IT;
+        public static final int inherited = NO;
+        protected static ColorType initialValue;
+        public static void setInitialValue(FOTree foTree) {
+            try {
+                initialValue = new ColorType
+                        (PropNames.BACKGROUND_COLOR, ColorCommon.BLACK);
+            } catch (PropertyException e) {
+                throw new RuntimeException
+                                    ("PropertyException: " + e.getMessage());
+            }
+        }
+
+        public static final ROStringArray enums = ColorCommon.enums;
+        private static final HashMap rwEnumValues = ColorCommon.rwColorEnums;
+    }
+
+    public static class BorderRightStyle extends Properties {
+        public static final int dataTypes = ENUM | NONE | INHERIT;
+        public static final int traitMapping = DISAPPEARS;
+        public static final int initialValueType = NONE_IT;
+
+        public static final int inherited = NO;
+
+        public static final ROStringArray enums = BorderCommonStyle.enums;
+        private static final HashMap rwEnumValues
+                                            = BorderCommonStyle.rwEnumValues;
+    }
+
+    public static class BorderRightWidth extends Properties {
+        public static final int dataTypes = MAPPED_ENUM | INHERIT;
+        public static final int traitMapping = DISAPPEARS;
+        public static final int initialValueType = LENGTH_IT;
+        protected static Numeric initialValue;
+        public static void setInitialValue(FOTree foTree) {
+            try {
+                initialValue = Length.makeLength
+                                (PropNames.BORDER_RIGHT_WIDTH, 1d, Length.PT);
+            } catch (PropertyException e) {
+                throw new RuntimeException
+                                    ("PropertyException: " + e.getMessage());
+            }
+        }
+
+        public static final int inherited = NO;
+
+        public static final ROStringArray enums = BorderCommonWidth.enums;
+        public static final ROStringArray enumValues
+                                            = BorderCommonWidth.enumValues;
+        public static final ROStringArray enumMappings
+                                            = BorderCommonWidth.enumMappings;
+    }
+
+    public static class BorderSeparation extends Properties {
+        public static final int dataTypes = INHERIT;
+        public static final int traitMapping = FORMATTING;
+        public static final int initialValueType = NOTYPE_IT;
+        public static final int inherited = COMPUTED;
+    }
+
+    public static class BorderSeparationBlockProgressionDirection
+                                                        extends Properties {
+        public static final int dataTypes = LENGTH;
+        public static final int traitMapping = FORMATTING;
+        public static final int initialValueType = LENGTH_IT;
+        protected static Numeric initialValue;
+        public static void setInitialValue(FOTree foTree) {
+            try {
+                initialValue = Length.makeLength
+                    (PropNames.BORDER_SEPARATION_BLOCK_PROGRESSION_DIRECTION,
+                                                            0.0d, Length.PT);
+            } catch (PropertyException e) {
+                throw new RuntimeException
+                                    ("PropertyException: " + e.getMessage());
+            }
+        }
+        public static final int inherited = COMPOUND;
+    }
+
+    public static class BorderSeparationInlineProgressionDirection
+                                                        extends Properties {
+        public static final int dataTypes = LENGTH;
+        public static final int traitMapping = FORMATTING;
+        public static final int initialValueType = LENGTH_IT;
+        protected static Numeric initialValue;
+        public static void setInitialValue(FOTree foTree) {
+            try {
+                initialValue = Length.makeLength
+                    (PropNames.BORDER_SEPARATION_INLINE_PROGRESSION_DIRECTION,
+                    0.0d, Length.PT);
+            } catch (PropertyException e) {
+                throw new RuntimeException
+                                    ("PropertyException: " + e.getMessage());
+            }
+        }
+        public static final int inherited = COMPOUND;
+    }
+
+    public static class BorderSpacing extends Properties {
+        public static final int dataTypes = SHORTHAND;
+        public static final int traitMapping = SHORTHAND_MAP;
+        public static final int initialValueType = NOTYPE_IT;
+        public static final int inherited = COMPUTED;
+    }
+
+    public static class BorderStartColor extends Properties {
+        public static final int dataTypes = COLOR_T | INHERIT;
+        public static final int traitMapping = RENDERING;
+        public static final int initialValueType = COLOR_IT;
+        public static final int inherited = NO;
+        protected static ColorType initialValue;
+        public static void setInitialValue(FOTree foTree) {
+            try {
+                initialValue = new ColorType
+                        (PropNames.BACKGROUND_COLOR, ColorCommon.BLACK);
+            } catch (PropertyException e) {
+                throw new RuntimeException
+                                    ("PropertyException: " + e.getMessage());
+            }
+        }
+
+        public static final ROStringArray enums = ColorCommon.enums;
+        private static final HashMap rwEnumValues = ColorCommon.rwColorEnums;
+    }
+
+    public static class BorderStartPrecedence extends Properties {
+        public static final int dataTypes = INTEGER | ENUM | INHERIT;
+        public static final int traitMapping = FORMATTING;
+        public static final int initialValueType = NOTYPE_IT;
+        public static final int inherited = NO;
+
+        public static final ROStringArray enums = PrecedenceCommon.enums;
+        public static final ROStringArray enumValues
+                                                = PrecedenceCommon.enumValues;
+    }
+
+    public static class BorderStartStyle extends Properties {
+        public static final int dataTypes = ENUM | NONE | INHERIT;
+        public static final int traitMapping = RENDERING;
+        public static final int initialValueType = NONE_IT;
+
+        public static final int inherited = NO;
+
+        public static final ROStringArray enums = BorderCommonStyle.enums;
+        private static final HashMap rwEnumValues
+                                            = BorderCommonStyle.rwEnumValues;
+    }
+
+    public static class BorderStartWidth extends Properties {
+        public static final int dataTypes = MAPPED_ENUM | LENGTH | INHERIT;
+        public static final int traitMapping = FORMATTING | RENDERING;
+        public static final int initialValueType = LENGTH_IT;
+        protected static Numeric initialValue;
+        public static void setInitialValue(FOTree foTree) {
+            try {
+                initialValue = Length.makeLength
+                                (PropNames.BORDER_START_WIDTH, 1d, Length.PT);
+            } catch (PropertyException e) {
+                throw new RuntimeException
+                                    ("PropertyException: " + e.getMessage());
+            }
+        }
+
+        public static final int inherited = NO;
+
+        public static final ROStringArray enums = BorderCommonWidth.enums;
+        public static final ROStringArray enumValues
+                                            = BorderCommonWidth.enumValues;
+        public static final ROStringArray enumMappings
+                                            = BorderCommonWidth.enumMappings;
+    }
+
+    public static class BorderStartWidthLength extends Properties {
+        public static final int dataTypes = LENGTH;
+        public static final int traitMapping = FORMATTING | RENDERING;
+        public static final int initialValueType = NOTYPE_IT;
+        public static final int inherited = COMPOUND;
+    }
+
+    public static class BorderStartWidthConditionality extends Properties {
+        public static final int dataTypes = ENUM;
+        public static final int traitMapping = FORMATTING | RENDERING;
+        public static final int initialValueType = ENUM_IT;
+        protected static EnumType initialValue;
+        public static void setInitialValue(FOTree foTree) {
+            try {
+                initialValue =
+                    new EnumType(PropNames.BORDER_START_WIDTH_CONDITIONALITY,
+                                            Conditionality.DISCARD);
+            } catch (PropertyException e) {
+                throw new RuntimeException
+                                    ("PropertyException: " + e.getMessage());
+            }
+        }
+        public static final int inherited = COMPOUND;
+
+        public static final ROStringArray enums = Conditionality.enums;
+        public static final ROStringArray enumValues
+                                                = Conditionality.enumValues;
+    }
+
+    public static class BorderStyle extends Properties {
+        public static final int dataTypes = SHORTHAND;
+        public static final int traitMapping = SHORTHAND_MAP;
+        public static final int initialValueType = NOTYPE_IT;
+        public static final int inherited = NO;
+    }
+
+    public static class BorderTop extends Properties {
+        public static final int dataTypes = SHORTHAND;
+        public static final int traitMapping = SHORTHAND_MAP;
+        public static final int initialValueType = NOTYPE_IT;
+        public static final int inherited = NO;
+    }
+
+    public static class BorderTopColor extends Properties {
+        public static final int dataTypes = COLOR_T | INHERIT;
+        public static final int traitMapping = DISAPPEARS;
+        public static final int initialValueType = COLOR_IT;
+        public static final int inherited = NO;
+        protected static ColorType initialValue;
+        public static void setInitialValue(FOTree foTree) {
+            try {
+                initialValue = new ColorType
+                        (PropNames.BACKGROUND_COLOR, ColorCommon.BLACK);
+            } catch (PropertyException e) {
+                throw new RuntimeException
+                                    ("PropertyException: " + e.getMessage());
+            }
+        }
+
+        public static final ROStringArray enums = ColorCommon.enums;
+        private static final HashMap rwEnumValues = ColorCommon.rwColorEnums;
+    }
+
+    public static class BorderTopStyle extends Properties {
+        public static final int dataTypes = ENUM | NONE | INHERIT;
+        public static final int traitMapping = DISAPPEARS;
+        public static final int initialValueType = NONE_IT;
+
+        public static final int inherited = NO;
+
+        public static final ROStringArray enums = BorderCommonStyle.enums;
+        private static final HashMap rwEnumValues
+                                            = BorderCommonStyle.rwEnumValues;
+    }
+
+    public static class BorderTopWidth extends Properties {
+        public static final int dataTypes = MAPPED_ENUM | INHERIT;
+        public static final int traitMapping = DISAPPEARS;
+        public static final int initialValueType = LENGTH_IT;
+        protected static Numeric initialValue;
+        public static void setInitialValue(FOTree foTree) {
+            try {
+                initialValue = Length.makeLength
+                                (PropNames.BORDER_TOP_WIDTH, 1d, Length.PT);
+            } catch (PropertyException e) {
+                throw new RuntimeException
+                                    ("PropertyException: " + e.getMessage());
+            }
+        }
+
+        public static final int inherited = NO;
+
+        public static final ROStringArray enums = BorderCommonWidth.enums;
+        public static final ROStringArray enumValues
+                                            = BorderCommonWidth.enumValues;
+        public static final ROStringArray enumMappings
+                                            = BorderCommonWidth.enumMappings;
+    }
+
+    public static class BorderWidth extends Properties {
+        public static final int dataTypes = SHORTHAND;
+        public static final int traitMapping = SHORTHAND_MAP;
+        public static final int initialValueType = NOTYPE_IT;
+        public static final int inherited = NO;
+    }
+
+    public static class Bottom extends Properties {
+        public static final int dataTypes =
+                                        PERCENTAGE | LENGTH | AUTO | INHERIT;
+        public static final int traitMapping = FORMATTING;
+        public static final int initialValueType = AUTO_IT;
+        public static final int inherited = NO;
+    }
+
+    public static class BreakCommon extends Properties {
+        public static final int COLUMN = 1;
+        public static final int PAGE = 2;
+        public static final int EVEN_PAGE = 3;
+        public static final int ODD_PAGE = 4;
+
+        private static final String[] rwEnums = {
+            null
+            ,"column"
+            ,"page"
+            ,"even-page"
+            ,"odd-page"
+        };
+        public static final ROStringArray enums = new ROStringArray(rwEnums);
+
+        private static final HashMap rwEnumValues;
+        public static final Map enumValues;
+        static {
+            rwEnumValues = new HashMap(rwEnums.length);
+            for (int i = 1; i < rwEnums.length; i++ ) {
+                rwEnumValues.put((Object)rwEnums[i],
+                                    (Object) Ints.consts.get(i));
+            }
+            enumValues =
+                Collections.unmodifiableMap((Map)rwEnumValues);
+        }
+    }
+
+    public static class BreakAfter extends Properties {
+        public static final int dataTypes = AUTO | ENUM | INHERIT;
+        public static final int traitMapping = FORMATTING;
+        public static final int initialValueType = AUTO_IT;
+
+        public static final int inherited = NO;
+
+        public static final ROStringArray enums = BreakCommon.enums;
+        private static final HashMap rwEnumValues = BreakCommon.rwEnumValues;
+    }
+
+    public static class BreakBefore extends Properties {
+        public static final int dataTypes = AUTO | ENUM | INHERIT;
+        public static final int traitMapping = FORMATTING;
+        public static final int initialValueType = AUTO_IT;
+
+        public static final int inherited = NO;
+
+        public static final ROStringArray enums = BreakCommon.enums;
+        private static final HashMap rwEnumValues = BreakCommon.rwEnumValues;
+    }
+
+    public static class CaptionSide extends Properties {
+        public static final int dataTypes = ENUM | INHERIT;
+        public static final int traitMapping = FORMATTING;
+        public static final int initialValueType = ENUM_IT;
+        public static final int BEFORE = 1;
+        public static final int AFTER = 2;
+        public static final int START = 3;
+        public static final int END = 4;
+        public static final int TOP = 5;
+        public static final int BOTTOM = 6;
+        public static final int LEFT = 7;
+        public static final int RIGHT = 8;
+
+        protected static EnumType initialValue;
+        public static void setInitialValue(FOTree foTree) {
+            try {
+                initialValue = new EnumType
+                                (PropNames.CAPTION_SIDE, BEFORE);
+            } catch (PropertyException e) {
+                throw new RuntimeException
+                                    ("PropertyException: " + e.getMessage());
+            }
+        }
+
+        public static final int inherited = COMPUTED;
+
+        private static final String[] rwEnums = {
+            null
+            ,"before"
+            ,"after"
+            ,"start"
+            ,"end"
+            ,"top"
+            ,"bottom"
+            ,"left"
+            ,"right"
+        };
+        public static final ROStringArray enums = new ROStringArray(rwEnums);
+
+        private static final HashMap rwEnumValues;
+        public static final Map enumValues;
+        static {
+            rwEnumValues = new HashMap(rwEnums.length);
+            for (int i = 1; i < rwEnums.length; i++ ) {
+                rwEnumValues.put((Object)rwEnums[i],
+                                    (Object) Ints.consts.get(i));
+            }
+            enumValues =
+                Collections.unmodifiableMap((Map)rwEnumValues);
+        }
+    }
+
+    public static class CaseName extends Properties {
+        public static final int dataTypes = NAME;
+        public static final int traitMapping = ACTION;
+        public static final int initialValueType = NOTYPE_IT;
+        public static final int inherited = NO;
+    }
+
+    public static class CaseTitle extends Properties {
+        public static final int dataTypes = STRING;
+        public static final int traitMapping = ACTION;
+        public static final int initialValueType = NOTYPE_IT;
+        public static final int inherited = NO;
+    }
+
+    public static class Character extends Properties {
+        public static final int dataTypes = CHARACTER_T;
+        public static final int traitMapping = FORMATTING;
+        public static final int initialValueType = NOTYPE_IT;
+        public static final int inherited = NO;
+    }
+
+    public static class Clear extends Properties {
+        public static final int dataTypes = ENUM | NONE | INHERIT;
+        public static final int traitMapping = FORMATTING;
+        public static final int initialValueType = NONE_IT;
+        public static final int START = 1;
+        public static final int END = 2;
+        public static final int LEFT = 3;
+        public static final int RIGHT = 4;
+        public static final int BOTH = 5;
+
+        public static final int inherited = NO;
+
+        private static final String[] rwEnums = {
+            null
+            ,"start"
+            ,"end"
+            ,"left"
+            ,"right"
+            ,"both"
+        };
+        public static final ROStringArray enums = new ROStringArray(rwEnums);
+
+        private static final HashMap rwEnumValues;
+        public static final Map enumValues;
+        static {
+            rwEnumValues = new HashMap(rwEnums.length);
+            for (int i = 1; i < rwEnums.length; i++ ) {
+                rwEnumValues.put((Object)rwEnums[i],
+                                    (Object) Ints.consts.get(i));
+            }
+            enumValues =
+                Collections.unmodifiableMap((Map)rwEnumValues);
+        }
+    }
+
+    public static class Clip extends Properties {
+        public static final int dataTypes = AUTO | COMPLEX | INHERIT;
+        public static final int traitMapping = RENDERING;
+        public static final int initialValueType = AUTO_IT;
+        public static final int inherited = NO;
+
+        public static PropertyValue complex
+            (int property, PropertyValue value) throws PropertyException
+        {
+            // AUTO and INHERIT will have been normally processed
+            if (! (value instanceof PropertyValueList))
+                throw new PropertyException
+                    ("clip: <shape> requires 4 <length> or <auto> args");
+            PropertyValueList list = (PropertyValueList) value;
+            if (list.size() != 4) throw new PropertyException
+                    ("clip: <shape> requires 4 lengths");
+            Iterator iter = list.iterator();
+            while (iter.hasNext()) {
+                Object obj = iter.next();
+                if ( ! (obj instanceof Length || obj instanceof Auto))
+                    throw new PropertyException
+                        ("clip: <shape> requires 4 <length> or <auto> args");
+            }
+            return value;
+        }
+    }
+
+    public static class Color extends Properties {
+        public static final int dataTypes = COLOR_T | INHERIT;
+        public static final int traitMapping = RENDERING;
+        public static final int initialValueType = COLOR_IT;
+        public static final int inherited = COMPUTED;
+        protected static ColorType initialValue;
+        public static void setInitialValue(FOTree foTree) {
+            try {
+                initialValue = new ColorType
+                        (PropNames.BACKGROUND_COLOR, ColorCommon.BLACK);
+            } catch (PropertyException e) {
+                throw new RuntimeException
+                                    ("PropertyException: " + e.getMessage());
+            }
+        }
+
+        public static final ROStringArray enums = ColorCommon.enums;
+        private static final HashMap rwEnumValues = ColorCommon.rwColorEnums;
+    }
+
+    public static class ColorProfileName extends Properties {
+        public static final int dataTypes = NAME | INHERIT;
+        public static final int traitMapping = FORMATTING;
+        public static final int initialValueType = NOTYPE_IT;
+        public static final int inherited = NO;
+    }
+
+    public static class ColumnCount extends Properties {
+        public static final int dataTypes = NUMBER | INHERIT;
+        public static final int traitMapping = SPECIFICATION;
+        public static final int initialValueType = NUMBER_IT;
+        protected static Numeric initialValue;
+        public static void setInitialValue(FOTree foTree) {
+            try {
+                initialValue = new Numeric(PropNames.COLUMN_COUNT, 1d);
+            } catch (PropertyException e) {
+                throw new RuntimeException
+                                    ("PropertyException: " + e.getMessage());
+            }
+        }
+
+        public static final int inherited = NO;
+    }
+
+    public static class ColumnGap extends Properties {
+        public static final int dataTypes = PERCENTAGE | LENGTH | INHERIT;
+        public static final int traitMapping = SPECIFICATION;
+        public static final int initialValueType = LENGTH_IT;
+        protected static Numeric initialValue;
+        public static void setInitialValue(FOTree foTree) {
+            try {
+                initialValue = Length.makeLength
+                                    (PropNames.COLUMN_GAP, 12.0d, Length.PT);
+            } catch (PropertyException e) {
+                throw new RuntimeException
+                                    ("PropertyException: " + e.getMessage());
+            }
+        }
+        public static final int inherited = NO;
+    }
+
+    public static class ColumnNumber extends Properties {
+        public static final int dataTypes = NUMBER;
+        public static final int traitMapping = VALUE_CHANGE;
+        public static final int initialValueType = NOTYPE_IT;
+        public static final int inherited = NO;
+    }
+
+    public static class ColumnWidth extends Properties {
+        public static final int dataTypes = PERCENTAGE | LENGTH;
+        public static final int traitMapping = SPECIFICATION;
+        public static final int initialValueType = NOTYPE_IT;
+        public static final int inherited = NO;
+    }
+
+    public static class ContentDimension extends Properties {
+        public static final int SCALE_TO_FIT = 1;
+
+        private static final String[] rwEnums = {
+            null
+            ,"scale-to-fit"
+        };
+        public static final ROStringArray enums = new ROStringArray(rwEnums);
+
+        public static final ROStringArray enumValues = enums;
+    }
+
+    public static class ContentHeight extends Properties {
+        public static final int dataTypes =
+                                PERCENTAGE | LENGTH | AUTO | ENUM | INHERIT;
+        public static final int traitMapping = FORMATTING;
+        public static final int initialValueType = AUTO_IT;
+        public static final int inherited = NO;
+
+        public static final ROStringArray enums = ContentDimension.enums;
+        public static final ROStringArray enumValues
+                                            = ContentDimension.enumValues;
+    }
+
+    public static class ContentType extends Properties {
+        public static final int dataTypes = NAME | MIMETYPE | AUTO;
+        public static final int traitMapping = FORMATTING;
+        public static final int initialValueType = AUTO_IT;
+        public static final int inherited = NO;
+    }
+
+    public static class ContentWidth extends Properties {
+        public static final int dataTypes =
+                                PERCENTAGE | LENGTH | AUTO | ENUM | INHERIT;
+        public static final int traitMapping = FORMATTING;
+        public static final int initialValueType = AUTO_IT;
+        public static final int inherited = NO;
+
+        public static final ROStringArray enums = ContentDimension.enums;
+        public static final ROStringArray enumValues
+                                            = ContentDimension.enumValues;
+    }
+
+    public static class Country extends Properties {
+        public static final int dataTypes = COUNTRY_T | NONE | INHERIT;
+        public static final int traitMapping = FORMATTING;
+        public static final int initialValueType = NONE_IT;
+        public static final int inherited = COMPUTED;
+    }
+
+    public static class Cue extends Properties {
+        public static final int dataTypes = SHORTHAND;
+        public static final int traitMapping = SHORTHAND_MAP;
+        public static final int initialValueType = AURAL_IT;
+        public static final int inherited = NO;
+    }
+
+    public static class CueAfter extends Properties {
+        public static final int dataTypes = AURAL;
+        public static final int traitMapping = RENDERING;
+        public static final int initialValueType = AURAL_IT;
+        public static final int inherited = NO;
+    }
+
+    public static class CueBefore extends Properties {
+        public static final int dataTypes = AURAL;
+        public static final int traitMapping = RENDERING;
+        public static final int initialValueType = AURAL_IT;
+        public static final int inherited = NO;
+    }
+
+    public static class DestinationPlacementOffset extends Properties {
+        public static final int dataTypes = LENGTH;
+        public static final int traitMapping = ACTION;
+        public static final int initialValueType = LENGTH_IT;
+        protected static Numeric initialValue;
+        public static void setInitialValue(FOTree foTree) {
+            try {
+                initialValue = Length.makeLength
+                    (PropNames.DESTINATION_PLACEMENT_OFFSET, 0.0d, Length.PT);
+            } catch (PropertyException e) {
+                throw new RuntimeException
+                                    ("PropertyException: " + e.getMessage());
+            }
+        }
+        public static final int inherited = NO;
+    }
+
+    public static class Direction extends Properties {
+        public static final int dataTypes = ENUM | INHERIT;
+        public static final int traitMapping = NEW_TRAIT;
+        public static final int initialValueType = ENUM_IT;
+        public static final int LTR = 1;
+        public static final int RTL = 2;
+        protected static EnumType initialValue;
+        public static void setInitialValue(FOTree foTree) {
+            try {
+                initialValue = new EnumType(PropNames.DIRECTION, LTR);
+            } catch (PropertyException e) {
+                throw new RuntimeException
+                                    ("PropertyException: " + e.getMessage());
+            }
+        }
+        public static final int inherited = COMPUTED;
+
+        private static final String[] rwEnums = {
+            null
+            ,"ltr"
+            ,"rtl"
+        };
+        public static final ROStringArray enums = new ROStringArray(rwEnums);
+
+        public static final ROStringArray enumValues = enums;
+    }
+
+    public static class DisplayAlign extends Properties {
+        public static final int dataTypes = AUTO | ENUM | INHERIT;
+        public static final int traitMapping = FORMATTING;
+        public static final int initialValueType = AUTO_IT;
+        public static final int BEFORE = 1;
+        public static final int CENTER = 2;
+        public static final int AFTER = 3;
+        public static final int inherited = COMPUTED;
+
+        private static final String[] rwEnums = {
+            null
+            ,"before"
+            ,"center"
+            ,"after"
+        };
+        public static final ROStringArray enums = new ROStringArray(rwEnums);
+
+        public static final ROStringArray enumValues = enums;
+    }
+
+    public static class DominantBaseline extends Properties {
+        public static final int dataTypes = AUTO | ENUM | INHERIT;
+        public static final int traitMapping = FORMATTING;
+        public static final int initialValueType = AUTO_IT;
+        public static final int USE_SCRIPT = 1;
+        public static final int NO_CHANGE = 2;
+        public static final int RESET_SIZE = 3;
+        public static final int IDEOGRAPHIC = 4;
+        public static final int ALPHABETIC = 5;
+        public static final int HANGING = 6;
+        public static final int MATHEMATICAL = 7;
+        public static final int CENTRAL = 8;
+        public static final int MIDDLE = 9;
+        public static final int TEXT_AFTER_EDGE = 10;
+        public static final int TEXT_BEFORE_EDGE = 11;
+        public static final int inherited = NO;
+
+        private static final String[] rwEnums = {
+            null
+            ,"use-script"
+            ,"no-change"
+            ,"reset-size"
+            ,"ideographic"
+            ,"alphabetic"
+            ,"hanging"
+            ,"mathematical"
+            ,"central"
+            ,"middle"
+            ,"test-after-edge"
+            ,"text-before-edge"
+        };
+        public static final ROStringArray enums = new ROStringArray(rwEnums);
+
+        private static final HashMap rwEnumValues;
+        public static final Map enumValues;
+        static {
+            rwEnumValues = new HashMap(rwEnums.length);
+            for (int i = 1; i < rwEnums.length; i++ ) {
+                rwEnumValues.put((Object)rwEnums[i],
+                                    (Object) Ints.consts.get(i));
+            }
+            enumValues =
+                Collections.unmodifiableMap((Map)rwEnumValues);
+        }
+    }
+
+    public static class Elevation extends Properties {
+        public static final int dataTypes = AURAL;
+        public static final int traitMapping = RENDERING;
+        public static final int initialValueType = AURAL_IT;
+        public static final int inherited = COMPUTED;
+    }
+
+    public static class EmptyCells extends Properties {
+        public static final int dataTypes = ENUM | INHERIT;
+        public static final int traitMapping = FORMATTING;
+        public static final int initialValueType = ENUM_IT;
+        public static final int SHOW = 1;
+        public static final int HIDE = 2;
+        protected static EnumType initialValue;
+        public static void setInitialValue(FOTree foTree) {
+            try {
+                initialValue = new EnumType
+                                        (PropNames.EMPTY_CELLS, SHOW);
+            } catch (PropertyException e) {
+                throw new RuntimeException
+                                    ("PropertyException: " + e.getMessage());
+            }
+        }
+        public static final int inherited = COMPUTED;
+
+        private static final String[] rwEnums = {
+            null
+            ,"show"
+            ,"hide"
+        };
+        public static final ROStringArray enums = new ROStringArray(rwEnums);
+
+        public static final ROStringArray enumValues = enums;
+    }
+
+    public static class EndIndent extends Properties {
+        public static final int dataTypes = LENGTH | INHERIT;
+        public static final int traitMapping = FORMATTING;
+        public static final int initialValueType = LENGTH_IT;
+        protected static Numeric initialValue;
+        public static void setInitialValue(FOTree foTree) {
+            try {
+                initialValue = Length.makeLength
+                                    (PropNames.END_INDENT, 0.0d, Length.PT);
+            } catch (PropertyException e) {
+                throw new RuntimeException
+                                    ("PropertyException: " + e.getMessage());
+            }
+        }
+        public static final int inherited = COMPUTED;
+    }
+
+    public static class EndsRow extends Properties {
+        public static final int dataTypes = BOOL;
+        public static final int traitMapping = FORMATTING;
+        public static final int initialValueType = BOOL_IT;
+        protected static Bool initialValue;
+        public static void setInitialValue(FOTree foTree) {
+            try {
+                initialValue = new Bool(PropNames.ENDS_ROW, false);
+            } catch (PropertyException e) {
+                throw new RuntimeException
+                                    ("PropertyException: " + e.getMessage());
+            }
+        }
+        public static final int inherited = NO;
+    }
+
+    public static class Extent extends Properties {
+        public static final int dataTypes = PERCENTAGE | LENGTH | INHERIT;
+        public static final int traitMapping = SPECIFICATION;
+        public static final int initialValueType = LENGTH_IT;
+        protected static Numeric initialValue;
+        public static void setInitialValue(FOTree foTree) {
+            try {
+                initialValue = Length.makeLength
+                                        (PropNames.EXTENT, 0.0d, Length.PT);
+            } catch (PropertyException e) {
+                throw new RuntimeException
+                                    ("PropertyException: " + e.getMessage());
+            }
+        }
+        public static final int inherited = NO;
+    }
+
+    public static class ExternalDestination extends Properties {
+        public static final int dataTypes = URI_SPECIFICATION;
+        public static final int traitMapping = ACTION;
+        public static final int initialValueType = URI_SPECIFICATION_IT;
+        protected static UriType initialValue;
+        public static void setInitialValue(FOTree foTree) {
+            try {
+                initialValue = new UriType(PropNames.EXTERNAL_DESTINATION, "");
+            } catch (PropertyException e) {
+                throw new RuntimeException
+                                    ("PropertyException: " + e.getMessage());
+            }
+        }
+        public static final int inherited = NO;
+    }
+
+    public static class Float extends Properties {
+        public static final int dataTypes = ENUM | NONE | INHERIT;
+        public static final int traitMapping = FORMATTING;
+        public static final int initialValueType = NONE_IT;
+        public static final int BEFORE = 1;
+        public static final int START = 2;
+        public static final int END = 3;
+        public static final int LEFT = 4;
+        public static final int RIGHT = 5;
+
+        public static final int inherited = NO;
+
+        private static final String[] rwEnums = {
+            null
+            ,"before"
+            ,"start"
+            ,"end"
+            ,"left"
+            ,"right"
+        };
+        public static final ROStringArray enums = new ROStringArray(rwEnums);
+
+        private static final HashMap rwEnumValues;
+        public static final Map enumValues;
+        static {
+            rwEnumValues = new HashMap(rwEnums.length);
+            for (int i = 1; i < rwEnums.length; i++ ) {
+                rwEnumValues.put((Object)rwEnums[i],
+                                    (Object) Ints.consts.get(i));
+            }
+            enumValues =
+                Collections.unmodifiableMap((Map)rwEnumValues);
+        }
+    }
+
+    public static class FlowName extends Properties {
+        public static final int dataTypes = NAME;
+        public static final int traitMapping = REFERENCE;
+        public static final int initialValueType = NAME_IT;
+        protected static NCName initialValue;
+        public static void setInitialValue(FOTree foTree) {
+            try {
+                initialValue = new NCName(PropNames.FLOW_NAME, "");
+            } catch (PropertyException e) {
+                throw new RuntimeException
+                                    ("PropertyException: " + e.getMessage());
+            }
+        }
+        public static final int inherited = NO;
+    }
+
+    public static class Font extends Properties {
+        public static final int dataTypes = SHORTHAND;
+        public static final int traitMapping = SHORTHAND_MAP;
+        public static final int initialValueType = NOTYPE_IT;
+        public static final int inherited = COMPUTED;
+    }
+
+    public static class FontFamily extends Properties {
+        public static final int dataTypes = COMPLEX;
+        public static final int traitMapping = FONT_SELECTION;
+        public static final int initialValueType = NOTYPE_IT;
+        public static final int SERIF = 1;
+        public static final int SANS_SERIF = 2;
+        public static final int CURSIVE = 3;
+        public static final int FANTASY = 4;
+        public static final int MONOSPACE = 5;
+        public static final int inherited = COMPUTED;
+
+        private static final String[] rwEnums = {
+            null
+            ,"serif"
+            ,"sans-serif"
+            ,"cursive"
+            ,"fantasy"
+            ,"monospace"
+        };
+        public static final ROStringArray enums = new ROStringArray(rwEnums);
+
+        private static final HashMap rwEnumValues;
+        public static final Map enumValues;
+        static {
+            rwEnumValues = new HashMap(rwEnums.length);
+            for (int i = 1; i < rwEnums.length; i++ ) {
+                rwEnumValues.put((Object)rwEnums[i],
+                                    (Object) Ints.consts.get(i));
+            }
+            enumValues =
+                Collections.unmodifiableMap((Map)rwEnumValues);
+        }
+
+        public static PropertyValue complex
+            (int property, PropertyValue propvalue) throws PropertyException
+        {
+            // There is no point in attempting to validate the enumeration
+            // tokens, because all NCNames and all Literals are valid.
+            // A PropertyValueList, which itself implements propertyValue,
+            // has the structure
+            // (PropertyValue|PropertyValueList)+
+            // Multiple members represent values that were comma-separated
+            // in the original expression.  PropertyValueList members
+            // represent values that were space-separated in the original
+            // expression.  So, if a prioritised list of font generic or
+            // family names was provided, the NCNames of font families will
+            // be at the top level, and any font family names
+            // that contained spaces will be in PropertyValueLists.
+
+            // First, check that we have a list
+            if ( ! (propvalue instanceof PropertyValueList)) {
+                if ( ! (propvalue instanceof StringType))
+                    throw new PropertyException
+                        ("Unexpected PropertyValue for font-family");
+                return new FontFamilySet(property,
+                        new String[] {((StringType)propvalue).getString() });
+            }
+            PropertyValueList list = (PropertyValueList)propvalue;
+            String[] strings = new String[list.size()];
+            int i = 0;          // the strings index
+            Iterator scan = list.iterator();
+            while (scan.hasNext()) {
+                Object value = scan.next();
+                String name = "";
+                if (value instanceof PropertyValueList) {
+                    // build a font name according to
+                    // 7.8.2 "font-family" <family-name>
+                    Iterator font = ((PropertyValueList)value).iterator();
+                    while (font.hasNext())
+                        name = name + " "
+                                + ((StringType)(font.next())).getString();
+                }
+                else if (value instanceof StringType)
+                            name = ((StringType)value).getString();
+                else throw new PropertyException
+                                ("Unexpected PropertyValue for font-family");
+                strings[i++] = name;
+            }
+            // Construct the FontFamilySet property value
+            return new FontFamilySet(property, strings);
+        }
+
+    }
+
+    public static class FontSelectionStrategy extends Properties {
+        public static final int dataTypes = AUTO | ENUM | INHERIT;
+        public static final int traitMapping = FONT_SELECTION;
+        public static final int initialValueType = AUTO_IT;
+        public static final int CHARACTER_BY_CHARACTER = 1;
+        public static final int inherited = COMPUTED;
+
+        private static final String[] rwEnums = {
+            null
+            ,"character-by-character"
+        };
+        public static final ROStringArray enums = new ROStringArray(rwEnums);
+
+        public static final ROStringArray enumValues = enums;
+    }
+
+    public static class FontSize extends Properties {
+        public static final int dataTypes =
+                                PERCENTAGE | LENGTH | MAPPED_ENUM | INHERIT;
+        public static final int traitMapping = FORMATTING| RENDERING;
+        public static final int initialValueType = LENGTH_IT;
+        public static final int XX_SMALL = 1;
+        public static final int X_SMALL = 2;
+        public static final int SMALL = 3;
+        public static final int MEDIUM = 4;
+        public static final int LARGE = 5;
+        public static final int X_LARGE = 6;
+        public static final int XX_LARGE = 7;
+        public static final int LARGER = 8;
+        public static final int SMALLER = 9;
+
+        protected static Numeric initialValue;
+        // N.B. This foundational value MUST be an absolute length
+        public static void setInitialValue(FOTree foTree) {
+            try {
+                initialValue =
+                        Length.makeLength(PropNames.FONT_SIZE, 12d, Length.PT);
+            } catch (PropertyException e) {
+                throw new RuntimeException
+                                    ("PropertyException: " + e.getMessage());
+            }
+        }
+        public static Numeric getInitialValue() {
+            return initialValue;
+        }
+
+        public static final int inherited = COMPUTED;
+
+        private static final String[] rwEnums = {
+            null
+            ,"xx-small"
+            ,"x-small"
+            ,"small"
+            ,"medium"
+            ,"large"
+            ,"x-large"
+            ,"xx-large"
+            ,"larger"
+            ,"smaller"
+        };
+        public static final ROStringArray enums = new ROStringArray(rwEnums);
+
+        private static final HashMap rwEnumValues;
+        public static final Map enumValues;
+        static {
+            rwEnumValues = new HashMap(rwEnums.length);
+            for (int i = 1; i < rwEnums.length; i++ ) {
+                rwEnumValues.put((Object)rwEnums[i],
+                                    (Object) Ints.consts.get(i));
+            }
+            enumValues =
+                Collections.unmodifiableMap((Map)rwEnumValues);
+        }
+
+        private static final String[] rwEnumMappings = {
+            null
+            ,"7pt"
+            ,"8.3pt"
+            ,"10pt"
+            ,"12pt"
+            ,"14.4pt"
+            ,"17.3pt"
+            ,"20.7pt"
+            ,"1.2em"
+            ,"0.83em"
+        };
+
+        public static final ROStringArray enumMappings
+                                        = new ROStringArray(rwEnumMappings);
+
+    }
+
+    public static class FontSizeAdjust extends Properties {
+        public static final int dataTypes = NUMBER | NONE | INHERIT;
+        public static final int traitMapping = FONT_SELECTION;
+        public static final int initialValueType = NONE_IT;
+        public static final int inherited = COMPUTED;
+    }
+
+    public static class FontStretch extends Properties {
+        public static final int dataTypes = ENUM | INHERIT;
+        public static final int traitMapping = FONT_SELECTION;
+        public static final int initialValueType = ENUM_IT;
+        public static final int NORMAL = 1;
+        public static final int WIDER = 2;
+        public static final int NARROWER = 3;
+        public static final int ULTRA_CONDENSED = 4;
+        public static final int EXTRA_CONDENSED = 5;
+        public static final int CONDENSED = 6;
+        public static final int SEMI_CONDENSED = 7;
+        public static final int SEMI_EXPANDED = 8;
+        public static final int EXPANDED = 9;
+        public static final int EXTRA_EXPANDED = 10;
+        public static final int ULTRA_EXPANDED = 11;
+
+        protected static EnumType initialValue;
+        public static void setInitialValue(FOTree foTree) {
+            try {
+                initialValue = new EnumType
+                                    (PropNames.FONT_STRETCH, NORMAL);
+            } catch (PropertyException e) {
+                throw new RuntimeException
+                                    ("PropertyException: " + e.getMessage());
+            }
+        }
+
+        public static final int inherited = COMPUTED;
+
+        private static final String[] rwEnums = {
+            null
+            ,"normal"
+            ,"wider"
+            ,"narrower"
+            ,"ultra-condensed"
+            ,"extra-condensed"
+            ,"condensed"
+            ,"semi-condensed"
+            ,"semi-expanded"
+            ,"expanded"
+            ,"extra-expanded"
+            ,"ultra-expanded"
+        };
+        public static final ROStringArray enums = new ROStringArray(rwEnums);
+
+        private static final HashMap rwEnumValues;
+        public static final Map enumValues;
+        static {
+            rwEnumValues = new HashMap(rwEnums.length);
+            for (int i = 1; i < rwEnums.length; i++ ) {
+                rwEnumValues.put((Object)rwEnums[i],
+                                    (Object) Ints.consts.get(i));
+            }
+            enumValues =
+                Collections.unmodifiableMap((Map)rwEnumValues);
+        }
+    }
+
+    public static class FontStyle extends Properties {
+        public static final int dataTypes = ENUM | INHERIT;
+        public static final int traitMapping = FONT_SELECTION;
+        public static final int initialValueType = ENUM_IT;
+        public static final int NORMAL = 1;
+        public static final int ITALIC = 2;
+        public static final int OBLIQUE = 3;
+        public static final int BACKSLANT = 4;
+        protected static EnumType initialValue;
+        public static void setInitialValue(FOTree foTree) {
+            try {
+                initialValue = new EnumType
+                                    (PropNames.FONT_STYLE, NORMAL);
+            } catch (PropertyException e) {
+                throw new RuntimeException
+                                    ("PropertyException: " + e.getMessage());
+            }
+        }
+
+        public static final int inherited = COMPUTED;
+
+        private static final String[] rwEnums = {
+            null
+            ,"normal"
+            ,"italic"
+            ,"oblique"
+            ,"backslant"
+        };
+        public static final ROStringArray enums = new ROStringArray(rwEnums);
+
+        public static final ROStringArray enumValues = enums;
+    }
+
+    public static class FontVariant extends Properties {
+        public static final int dataTypes = ENUM | INHERIT;
+        public static final int traitMapping = FONT_SELECTION;
+        public static final int initialValueType = ENUM_IT;
+        public static final int NORMAL = 1;
+        public static final int SMALL_CAPS = 2;
+        protected static EnumType initialValue;
+        public static void setInitialValue(FOTree foTree) {
+            try {
+                initialValue = new EnumType
+                                    (PropNames.FONT_VARIANT, NORMAL);
+            } catch (PropertyException e) {
+                throw new RuntimeException
+                                    ("PropertyException: " + e.getMessage());
+            }
+        }
+        public static final int inherited = COMPUTED;
+
+        private static final String[] rwEnums = {
+            null
+            ,"normal"
+            ,"small-caps"
+        };
+        public static final ROStringArray enums = new ROStringArray(rwEnums);
+
+        public static final ROStringArray enumValues = enums;
+    }
+
+    public static class FontWeight extends Properties {
+        public static final int dataTypes = INTEGER | ENUM | INHERIT;
+        public static final int traitMapping = FONT_SELECTION;
+        public static final int initialValueType = INTEGER_IT;
+        public static final int NORMAL = 1;
+        public static final int BOLD = 2;
+        public static final int BOLDER = 3;
+        public static final int LIGHTER = 4;
+
+        protected static Numeric initialValue;
+        public static void setInitialValue(FOTree foTree) {
+            try {
+                initialValue = IntegerType.makeInteger
+                                            (PropNames.FONT_WEIGHT, 400);
+            } catch (PropertyException e) {
+                throw new RuntimeException
+                                    ("PropertyException: " + e.getMessage());
+            }
+        }
+
+        public static final int inherited = COMPUTED;
+
+        private static final String[] rwEnums = {
+            null
+            ,"normal"
+            ,"bold"
+            ,"bolder"
+            ,"lighter"
+        };
+        public static final ROStringArray enums = new ROStringArray(rwEnums);
+
+        public static final ROStringArray enumValues = enums;
+    }
+
+    public static class ForcePageCount extends Properties {
+        public static final int dataTypes = AUTO | ENUM | INHERIT;
+        public static final int traitMapping = SPECIFICATION;
+        public static final int initialValueType = AUTO_IT;
+        public static final int EVEN = 1;
+        public static final int ODD = 2;
+        public static final int END_ON_EVEN = 3;
+        public static final int END_ON_ODD = 4;
+        public static final int NO_FORCE = 5;
+
+        public static final int inherited = NO;
+
+        private static final String[] rwEnums = {
+            null
+            ,"even"
+            ,"odd"
+            ,"end-on-even"
+            ,"end-on-odd"
+            ,"no-force"
+        };
+        public static final ROStringArray enums = new ROStringArray(rwEnums);
+
+        private static final HashMap rwEnumValues;
+        public static final Map enumValues;
+        static {
+            rwEnumValues = new HashMap(rwEnums.length);
+            for (int i = 1; i < rwEnums.length; i++ ) {
+                rwEnumValues.put((Object)rwEnums[i],
+                                    (Object) Ints.consts.get(i));
+            }
+            enumValues =
+                Collections.unmodifiableMap((Map)rwEnumValues);
+        }
+    }
+
+    public static class Format extends Properties {
+        public static final int dataTypes = STRING;
+        public static final int traitMapping = FORMATTING;
+        public static final int initialValueType = LITERAL_IT;
+        protected static Literal initialValue;
+        public static void setInitialValue(FOTree foTree) {
+            try {
+                initialValue = new Literal(PropNames.FORMAT, "1");
+            } catch (PropertyException e) {
+                throw new RuntimeException
+                                    ("PropertyException: " + e.getMessage());
+            }
+        }
+        public static final int inherited = NO;
+    }
+
+    public static class GlyphOrientationHorizontal extends Properties {
+        public static final int dataTypes = ANGLE | INHERIT;
+        public static final int traitMapping = FORMATTING;
+        public static final int initialValueType = ANGLE_IT;
+        protected static Numeric initialValue;
+        public static void setInitialValue(FOTree foTree) {
+            try {
+                initialValue = Angle.makeAngle
+                    (PropNames.GLYPH_ORIENTATION_HORIZONTAL, 0d, Angle.DEG);
+            } catch (PropertyException e) {
+                throw new RuntimeException
+                                    ("PropertyException: " + e.getMessage());
+            }
+        }
+        public static final int inherited = COMPUTED;
+    }
+
+    public static class GlyphOrientationVertical extends Properties {
+        public static final int dataTypes = ANGLE | AUTO | INHERIT;
+        public static final int traitMapping = FORMATTING;
+        public static final int initialValueType = AUTO_IT;
+        public static final int inherited = COMPUTED;
+    }
+
+    public static class GroupingSeparator extends Properties {
+        public static final int dataTypes = CHARACTER_T;
+        public static final int traitMapping = FORMATTING;
+        public static final int initialValueType = NOTYPE_IT;
+        public static final int inherited = NO;
+    }
+
+    public static class GroupingSize extends Properties {
+        public static final int dataTypes = NUMBER;
+        public static final int traitMapping = FORMATTING;
+        public static final int initialValueType = NOTYPE_IT;
+        public static final int inherited = NO;
+    }
+
+    public static class Height extends Properties {
+        public static final int dataTypes =
+                                        PERCENTAGE | LENGTH | AUTO | INHERIT;
+        public static final int traitMapping = DISAPPEARS;
+        public static final int initialValueType = AUTO_IT;
+        public static final int inherited = NO;
+    }
+
+    public static class Hyphenate extends Properties {
+        public static final int dataTypes = BOOL | INHERIT;
+        public static final int traitMapping = FORMATTING;
+        public static final int initialValueType = BOOL_IT;
+        protected static Bool initialValue;
+        public static void setInitialValue(FOTree foTree) {
+            try {
+                initialValue = new Bool(PropNames.HYPHENATE, false);
+            } catch (PropertyException e) {
+                throw new RuntimeException
+                                    ("PropertyException: " + e.getMessage());
+            }
+        }
+        public static final int inherited = COMPUTED;
+    }
+
+    public static class HyphenationCharacter extends Properties {
+        public static final int dataTypes = CHARACTER_T | INHERIT;
+        public static final int traitMapping = FORMATTING;
+        public static final int initialValueType = LITERAL_IT;
+        protected static Literal initialValue;
+        public static void setInitialValue(FOTree foTree) {
+            try {
+                initialValue = new Literal
+                                (PropNames.HYPHENATION_CHARACTER, "\u2010");
+            } catch (PropertyException e) {
+                throw new RuntimeException
+                                    ("PropertyException: " + e.getMessage());
+            }
+        }
+        public static final int inherited = COMPUTED;
+    }
+
+    public static class HyphenationKeep extends Properties {
+        public static final int dataTypes = AUTO | ENUM | INHERIT;
+        public static final int traitMapping = FORMATTING;
+        public static final int initialValueType = AUTO_IT;
+        public static final int COLUMN = 1;
+        public static final int PAGE = 2;
+        public static final int inherited = COMPUTED;
+
+        private static final String[] rwEnums = {
+            null
+            ,"column"
+            ,"page"
+        };
+        public static final ROStringArray enums = new ROStringArray(rwEnums);
+
+        public static final ROStringArray enumValues = enums;
+    }
+
+    public static class HyphenationLadderCount extends Properties {
+        public static final int dataTypes = NUMBER | ENUM | INHERIT;
+        public static final int traitMapping = FORMATTING;
+        public static final int initialValueType = ENUM_IT;
+        public static final int NO_LIMIT = 1;
+        protected static EnumType initialValue;
+        public static void setInitialValue(FOTree foTree) {
+            try {
+                initialValue = new EnumType
+                        (PropNames.HYPHENATION_LADDER_COUNT, NO_LIMIT);
+            } catch (PropertyException e) {
+                throw new RuntimeException
+                                    ("PropertyException: " + e.getMessage());
+            }
+        }
+        public static final int inherited = COMPUTED;
+
+        private static final String[] rwEnums = {
+            null
+            ,"no-limit"
+        };
+        public static final ROStringArray enums = new ROStringArray(rwEnums);
+
+        public static final ROStringArray enumValues = enums;
+    }
+
+    public static class HyphenationPushCharacterCount extends Properties {
+        public static final int dataTypes = NUMBER | INHERIT;
+        public static final int traitMapping = FORMATTING;
+        public static final int initialValueType = NUMBER_IT;
+        protected static Numeric initialValue;
+        public static void setInitialValue(FOTree foTree) {
+            try {
+                initialValue = new Numeric
+                            (PropNames.HYPHENATION_PUSH_CHARACTER_COUNT, 2d);
+            } catch (PropertyException e) {
+                throw new RuntimeException
+                                    ("PropertyException: " + e.getMessage());
+            }
+        }
+
+        public static final int inherited = COMPUTED;
+    }
+
+    public static class HyphenationRemainCharacterCount extends Properties {
+        public static final int dataTypes = NUMBER | INHERIT;
+        public static final int traitMapping = FORMATTING;
+        public static final int initialValueType = NUMBER_IT;
+        protected static Numeric initialValue;
+        public static void setInitialValue(FOTree foTree) {
+            try {
+                initialValue = new Numeric
+                            (PropNames.HYPHENATION_REMAIN_CHARACTER_COUNT, 2d);
+            } catch (PropertyException e) {
+                throw new RuntimeException
+                                    ("PropertyException: " + e.getMessage());
+            }
+        }
+
+        public static final int inherited = COMPUTED;
+    }
+
+    public static class Id extends Properties {
+        public static final int dataTypes = ID_T;
+        public static final int traitMapping = REFERENCE;
+        public static final int initialValueType = NOTYPE_IT;
+        public static final int inherited = NO;
+    }
+
+    public static class IndicateDestination extends Properties {
+        public static final int dataTypes = BOOL;
+        public static final int traitMapping = ACTION;
+        public static final int initialValueType = BOOL_IT;
+        protected static Bool initialValue;
+        public static void setInitialValue(FOTree foTree) {
+            try {
+                initialValue = new Bool(PropNames.INDICATE_DESTINATION, false);
+            } catch (PropertyException e) {
+                throw new RuntimeException
+                                    ("PropertyException: " + e.getMessage());
+            }
+        }
+        public static final int inherited = NO;
+    }
+
+    public static class InitialPageNumber extends Properties {
+        public static final int dataTypes = NUMBER | AUTO | ENUM | INHERIT;
+        public static final int traitMapping = FORMATTING;
+        public static final int initialValueType = AUTO_IT;
+        public static final int AUTO_ODD = 1;
+        public static final int AUTO_EVEN = 2;
+        public static final int inherited = NO;
+
+        private static final String[] rwEnums = {
+            null
+            ,"auto-odd"
+            ,"auto-even"
+        };
+        public static final ROStringArray enums = new ROStringArray(rwEnums);
+
+        public static final ROStringArray enumValues = enums;
+    }
+
+    public static class InlineProgressionDimension extends Properties {
+        public static final int dataTypes =
+                                        PERCENTAGE | LENGTH | AUTO | INHERIT;
+        public static final int traitMapping = FORMATTING;
+        public static final int initialValueType = AUTO_IT;
+        public static final int inherited = NO;
+    }
+
+    public static class InlineProgressionDimensionMinimum extends Properties {
+        public static final int dataTypes = PERCENTAGE | LENGTH | AUTO;
+        public static final int traitMapping = FORMATTING;
+        public static final int initialValueType = AUTO_IT;
+        public static final int inherited = COMPOUND;
+    }
+
+    public static class InlineProgressionDimensionOptimum extends Properties {
+        public static final int dataTypes = PERCENTAGE | LENGTH | AUTO;
+        public static final int traitMapping = FORMATTING;
+        public static final int initialValueType = AUTO_IT;
+        public static final int inherited = COMPOUND;
+    }
+
+    public static class InlineProgressionDimensionMaximum extends Properties {
+        public static final int dataTypes = PERCENTAGE | LENGTH | AUTO;
+        public static final int traitMapping = FORMATTING;
+        public static final int initialValueType = AUTO_IT;
+        public static final int inherited = COMPOUND;
+    }
+
+    public static class InternalDestination extends Properties {
+        public static final int dataTypes = STRING | IDREF;
+        public static final int traitMapping = ACTION;
+        public static final int initialValueType = LITERAL_IT;
+        protected static Literal initialValue;
+        public static void setInitialValue(FOTree foTree) {
+            try {
+                initialValue = new Literal
+                                        (PropNames.INTERNAL_DESTINATION, "");
+            } catch (PropertyException e) {
+                throw new RuntimeException
+                                    ("PropertyException: " + e.getMessage());
+            }
+        }
+        public static final int inherited = NO;
+    }
+
+    public static class IntrusionDisplace extends Properties {
+        public static final int dataTypes = AUTO | ENUM | NONE | INHERIT;
+        public static final int traitMapping = FORMATTING;
+        public static final int initialValueType = AUTO_IT;
+        public static final int LINE = 1;
+        public static final int INDENT = 2;
+        public static final int BLOCK = 3;
+        public static final int inherited = COMPUTED;
+
+        private static final String[] rwEnums = {
+            null
+            ,"line"
+            ,"indent"
+            ,"block"
+        };
+        public static final ROStringArray enums = new ROStringArray(rwEnums);
+
+        public static final ROStringArray enumValues = enums;
+    }
+
+    public static class KeepTogether extends Properties {
+        public static final int dataTypes = AUTO | ENUM | INTEGER | INHERIT;
+        public static final int traitMapping = FORMATTING;
+        public static final int initialValueType = NOTYPE_IT;
+        public static final int inherited = COMPUTED;
+    }
+
+    public static class KeepTogetherWithinLine extends Properties {
+        public static final int dataTypes = AUTO | ENUM | INTEGER | INHERIT;
+        public static final int traitMapping = FORMATTING;
+        public static final int initialValueType = AUTO_IT;
+        public static final int inherited = NO;
+    }
+
+    public static class KeepTogetherWithinColumn extends Properties {
+        public static final int dataTypes = AUTO | ENUM | INTEGER | INHERIT;
+        public static final int traitMapping = FORMATTING;
+        public static final int initialValueType = AUTO_IT;
+        public static final int inherited = NO;
+    }
+
+    public static class KeepTogetherWithinPage extends Properties {
+        public static final int dataTypes = AUTO | ENUM | INTEGER | INHERIT;
+        public static final int traitMapping = FORMATTING;
+        public static final int initialValueType = AUTO_IT;
+        public static final int inherited = NO;
+    }
+
+    public static class KeepWithNext extends Properties {
+        public static final int dataTypes = AUTO | ENUM | INTEGER | INHERIT;
+        public static final int traitMapping = FORMATTING;
+        public static final int initialValueType = NOTYPE_IT;
+        public static final int inherited = NO;
+    }
+
+    public static class KeepWithNextWithinLine extends Properties {
+        public static final int dataTypes = AUTO | ENUM | INTEGER | INHERIT;
+        public static final int traitMapping = FORMATTING;
+        public static final int initialValueType = AUTO_IT;
+        public static final int inherited = NO;
+    }
+
+    public static class KeepWithNextWithinColumn extends Properties {
+        public static final int dataTypes = AUTO | ENUM | INTEGER | INHERIT;
+        public static final int traitMapping = FORMATTING;
+        public static final int initialValueType = AUTO_IT;
+        public static final int inherited = NO;
+    }
+
+    public static class KeepWithNextWithinPage extends Properties {
+        public static final int dataTypes = AUTO | ENUM | INTEGER | INHERIT;
+        public static final int traitMapping = FORMATTING;
+        public static final int initialValueType = AUTO_IT;
+        public static final int inherited = NO;
+    }
+
+    public static class KeepWithPrevious extends Properties {
+        public static final int dataTypes = AUTO | ENUM | INTEGER | INHERIT;
+        public static final int traitMapping = FORMATTING;
+        public static final int initialValueType = NOTYPE_IT;
+        public static final int inherited = NO;
+    }
+
+    public static class KeepWithPreviousWithinLine extends Properties {
+        public static final int dataTypes = AUTO | ENUM | INTEGER | INHERIT;
+        public static final int traitMapping = FORMATTING;
+        public static final int initialValueType = AUTO_IT;
+        public static final int inherited = NO;
+    }
+
+    public static class KeepWithPreviousWithinColumn extends Properties {
+        public static final int dataTypes = AUTO | ENUM | INTEGER | INHERIT;
+        public static final int traitMapping = FORMATTING;
+        public static final int initialValueType = AUTO_IT;
+        public static final int inherited = NO;
+    }
+
+    public static class KeepWithPreviousWithinPage extends Properties {
+        public static final int dataTypes = AUTO | ENUM | INTEGER | INHERIT;
+        public static final int traitMapping = FORMATTING;
+        public static final int initialValueType = AUTO_IT;
+        public static final int inherited = NO;
+    }
+
+    public static class Language extends Properties {
+        public static final int dataTypes = LANGUAGE_T | NONE | INHERIT;
+        public static final int traitMapping = FORMATTING;
+        public static final int initialValueType = NONE_IT;
+        public static final int inherited = COMPUTED;
+    }
+
+    public static class LastLineEndIndent extends Properties {
+        public static final int dataTypes = PERCENTAGE | LENGTH | INHERIT;
+        public static final int traitMapping = FORMATTING;
+        public static final int initialValueType = LENGTH_IT;
+        protected static Numeric initialValue;
+        public static void setInitialValue(FOTree foTree) {
+            try {
+                initialValue = Length.makeLength
+                            (PropNames.LAST_LINE_END_INDENT, 0.0d, Length.PT);
+            } catch (PropertyException e) {
+                throw new RuntimeException
+                                    ("PropertyException: " + e.getMessage());
+            }
+        }
+        public static final int inherited = COMPUTED;
+    }
+
+    public static class LeaderAlignment extends Properties {
+        public static final int dataTypes = ENUM | NONE | INHERIT;
+        public static final int traitMapping = FORMATTING;
+        public static final int initialValueType = NONE_IT;
+        public static final int REFERENCE_AREA = 1;
+        public static final int PAGE = 2;
+        public static final int inherited = COMPUTED;
+
+        private static final String[] rwEnums = {
+            null
+            ,"reference-area"
+            ,"page"
+        };
+        public static final ROStringArray enums = new ROStringArray(rwEnums);
+
+        public static final ROStringArray enumValues = enums;
+
+    }
+
+    public static class LeaderLength extends Properties {
+        public static final int dataTypes = LENGTH | PERCENTAGE | INHERIT;
+        public static final int traitMapping = FORMATTING;
+        public static final int initialValueType = NOTYPE_IT;
+        public static final int inherited = COMPUTED;
+    }
+
+    public static class LeaderLengthMinimum extends Properties {
+        public static final int dataTypes = LENGTH | PERCENTAGE;
+        public static final int traitMapping = FORMATTING;
+        public static final int initialValueType = LENGTH_IT;
+        protected static Numeric initialValue;
+        public static void setInitialValue(FOTree foTree) {
+            try {
+                initialValue = Length.makeLength
+                            (PropNames.LEADER_LENGTH_MINIMUM, 0.0d, Length.PT);
+            } catch (PropertyException e) {
+                throw new RuntimeException
+                                    ("PropertyException: " + e.getMessage());
+            }
+        }
+        public static final int inherited = COMPOUND;
+    }
+
+    public static class LeaderLengthOptimum extends Properties {
+        public static final int dataTypes = LENGTH | PERCENTAGE;
+        public static final int traitMapping = FORMATTING;
+        public static final int initialValueType = LENGTH_IT;
+        protected static Numeric initialValue;
+        public static void setInitialValue(FOTree foTree) {
+            try {
+                initialValue = Length.makeLength
+                        (PropNames.LEADER_LENGTH_OPTIMUM, 12.0d, Length.PT);
+            } catch (PropertyException e) {
+                throw new RuntimeException
+                                    ("PropertyException: " + e.getMessage());
+            }
+        }
+        public static final int inherited = COMPOUND;
+    }
+
+    public static class LeaderLengthMaximum extends Properties {
+        public static final int dataTypes = LENGTH | PERCENTAGE;
+        public static final int traitMapping = FORMATTING;
+        public static final int initialValueType = PERCENTAGE_IT;
+        protected static Numeric initialValue;
+        public static void setInitialValue(FOTree foTree) {
+            try {
+                initialValue = Percentage.makePercentage
+                                    (PropNames.LEADER_LENGTH_MAXIMUM, 100.0d);
+            } catch (PropertyException e) {
+                throw new RuntimeException
+                                    ("PropertyException: " + e.getMessage());
+            }
+        }
+        public static final int inherited = COMPOUND;
+    }
+
+    public static class LeaderPattern extends Properties {
+        public static final int dataTypes = ENUM | INHERIT;
+        public static final int traitMapping = FORMATTING;
+        public static final int initialValueType = ENUM_IT;
+        public static final int SPACE = 1;
+        public static final int RULE = 2;
+        public static final int DOTS = 3;
+        public static final int USE_CONTENT = 4;
+        protected static EnumType initialValue;
+        public static void setInitialValue(FOTree foTree) {
+            try {
+                initialValue = new EnumType
+                                    (PropNames.LEADER_PATTERN, SPACE);
+            } catch (PropertyException e) {
+                throw new RuntimeException
+                                    ("PropertyException: " + e.getMessage());
+            }
+        }
+        public static final int inherited = COMPUTED;
+
+        private static final String[] rwEnums = {
+            null
+            ,"space"
+            ,"rule"
+            ,"dots"
+            ,"use-content"
+        };
+        public static final ROStringArray enums = new ROStringArray(rwEnums);
+
+        public static final ROStringArray enumValues = enums;
+
+    }
+
+    public static class LeaderPatternWidth extends Properties {
+        public static final int dataTypes = LENGTH | ENUM | INHERIT;
+        public static final int traitMapping = FORMATTING;
+        public static final int initialValueType = ENUM_IT;
+        public static final int USE_FONT_METRICS = 1;
+        protected static EnumType initialValue;
+        public static void setInitialValue(FOTree foTree) {
+            try {
+                initialValue = new EnumType
+                    (PropNames.LEADER_PATTERN_WIDTH, USE_FONT_METRICS);
+            } catch (PropertyException e) {
+                throw new RuntimeException
+                                    ("PropertyException: " + e.getMessage());
+            }
+        }
+        public static final int inherited = COMPUTED;
+
+        private static final String[] rwEnums = {
+            null
+            ,"use-font-metrics"
+        };
+        public static final ROStringArray enums = new ROStringArray(rwEnums);
+
+        public static final ROStringArray enumValues = enums;
+    }
+
+    public static class Left extends Properties {
+        public static final int dataTypes =
+                                        PERCENTAGE | LENGTH | AUTO | INHERIT;
+        public static final int traitMapping = FORMATTING;
+        public static final int initialValueType = AUTO_IT;
+        public static final int inherited = NO;
+    }
+
+    public static class LetterSpacing extends Properties {
+        public static final int dataTypes = LENGTH | ENUM | INHERIT;
+        public static final int traitMapping = DISAPPEARS;
+        public static final int initialValueType = ENUM_IT;
+        public static final int NORMAL = 1;
+        protected static EnumType initialValue;
+        public static void setInitialValue(FOTree foTree) {
+            try {
+                initialValue = new EnumType
+                                    (PropNames.LETTER_SPACING, NORMAL);
+            } catch (PropertyException e) {
+                throw new RuntimeException
+                                    ("PropertyException: " + e.getMessage());
+            }
+        }
+        public static final int inherited = COMPUTED;
+
+        private static final String[] rwEnums = {
+            null
+            ,"normal"
+        };
+        public static final ROStringArray enums = new ROStringArray(rwEnums);
+
+        public static final ROStringArray enumValues = enums;
+    }
+
+    public static class LetterValue extends Properties {
+        public static final int dataTypes = AUTO | ENUM;
+        public static final int traitMapping = FORMATTING;
+        public static final int initialValueType = AUTO_IT;
+        public static final int ALPHABETIC = 1;
+        public static final int TRADITIONAL = 2;
+        public static final int inherited = NO;
+
+        private static final String[] rwEnums = {
+            null
+            ,"alphabetic"
+            ,"traditional"
+        };
+        public static final ROStringArray enums = new ROStringArray(rwEnums);
+
+        public static final ROStringArray enumValues = enums;
+    }
+
+    public static class LinefeedTreatment extends Properties {
+        public static final int dataTypes = ENUM | INHERIT;
+        public static final int traitMapping = FORMATTING;
+        public static final int initialValueType = ENUM_IT;
+        public static final int IGNORE = 1;
+        public static final int PRESERVE = 2;
+        public static final int TREAT_AS_SPACE = 3;
+        public static final int TREAT_AS_ZERO_WIDTH_SPACE = 4;
+        protected static EnumType initialValue;
+        public static void setInitialValue(FOTree foTree) {
+            try {
+                initialValue = new EnumType
+                        (PropNames.LINEFEED_TREATMENT, TREAT_AS_SPACE);
+            } catch (PropertyException e) {
+                throw new RuntimeException
+                                    ("PropertyException: " + e.getMessage());
+            }
+        }
+        public static final int inherited = COMPUTED;
+
+        private static final String[] rwEnums = {
+            null
+            ,"ignore"
+            ,"preserve"
+            ,"treat-as-space"
+            ,"treat-as-zero-width-space"
+        };
+        public static final ROStringArray enums = new ROStringArray(rwEnums);
+
+        public static final ROStringArray enumValues = enums;
+    }
+
+    public static class LineHeight extends Properties {
+        public static final int dataTypes =
+                        PERCENTAGE | LENGTH | NUMBER | MAPPED_ENUM | INHERIT;
+        public static final int traitMapping = FORMATTING;
+        public static final int initialValueType = NOTYPE_IT;
+        public static final int NORMAL = 1;
+        protected static Numeric initialValue;
+        public static final int inherited = VALUE_SPECIFIC;
+
+        private static final String[] rwEnums = {
+            null
+            ,"normal"
+        };
+        public static final ROStringArray enums = new ROStringArray(rwEnums);
+
+        public static final ROStringArray enumValues = enums;
+
+        // If this value changes, change the corresponding initialValue.
+        private static final String[] rwEnumMappings = {
+            null
+            ,"1.2em"
+        };
+
+        public static final ROStringArray enumMappings
+                                        = new ROStringArray(rwEnumMappings);
+    }
+
+    public static class LineHeightMinimum extends Properties {
+        public static final int dataTypes = LENGTH | PERCENTAGE;
+        public static final int traitMapping = FORMATTING;
+        public static final int initialValueType = LENGTH_IT;
+        protected static Numeric initialValue;
+        public static void setInitialValue(FOTree foTree) {
+            try {
+                initialValue = new Numeric(PropNames.LINE_HEIGHT, 1.2d);
+                initialValue.multiply(foTree.currentFontSize());
+            } catch (PropertyException e) {
+                throw new RuntimeException
+                                    ("PropertyException: " + e.getMessage());
+            }
+        }
+        public static final int inherited = COMPOUND;
+    }
+
+    public static class LineHeightOptimum extends Properties {
+        public static final int dataTypes = LENGTH | PERCENTAGE;
+        public static final int traitMapping = FORMATTING;
+        public static final int initialValueType = LENGTH_IT;
+        protected static Numeric initialValue;
+        public static void setInitialValue(FOTree foTree) {
+            try {
+                initialValue = new Numeric(PropNames.LINE_HEIGHT, 1.2d);
+                initialValue.multiply(foTree.currentFontSize());
+            } catch (PropertyException e) {
+                throw new RuntimeException
+                                    ("PropertyException: " + e.getMessage());
+            }
+        }
+        public static final int inherited = COMPOUND;
+    }
+
+    public static class LineHeightMaximum extends Properties {
+        public static final int dataTypes = LENGTH | PERCENTAGE;
+        public static final int traitMapping = FORMATTING;
+        public static final int initialValueType = LENGTH_IT;
+        protected static Numeric initialValue;
+        public static void setInitialValue(FOTree foTree) {
+            try {
+                initialValue = new Numeric(PropNames.LINE_HEIGHT, 1.2d);
+                initialValue.multiply(foTree.currentFontSize());
+            } catch (PropertyException e) {
+                throw new RuntimeException
+                                    ("PropertyException: " + e.getMessage());
+            }
+        }
+        public static final int inherited = COMPOUND;
+    }
+
+    public static class LineHeightConditionality extends Properties {
+        public static final int dataTypes = ENUM;
+        public static final int traitMapping = FORMATTING;
+        public static final int initialValueType = ENUM_IT;
+        protected static EnumType initialValue;
+        public static void setInitialValue(FOTree foTree) {
+            try {
+                initialValue = new EnumType
+                        (PropNames.SPACE_AFTER_CONDITIONALITY,
+                                            Conditionality.DISCARD);
+            } catch (PropertyException e) {
+                throw new RuntimeException
+                                    ("PropertyException: " + e.getMessage());
+            }
+        }
+        public static final int inherited = COMPOUND;
+
+        public static final ROStringArray enums = Conditionality.enums;
+        public static final ROStringArray enumValues
+                                            = Conditionality.enumValues;
+    }
+
+    public static class LineHeightPrecedence extends Properties {
+        public static final int dataTypes = INTEGER | ENUM;
+        public static final int traitMapping = FORMATTING;
+        public static final int initialValueType = INTEGER_IT;
+        protected static Numeric initialValue;
+        public static void setInitialValue(FOTree foTree) {
+            try {
+                initialValue = IntegerType.makeInteger
+                                        (PropNames.LINE_HEIGHT_PRECEDENCE, 0);
+            } catch(PropertyException e) {
+                throw new RuntimeException
+                                    ("PropertyException: " + e.getMessage());
+            }
+        }
+
+        public static final int inherited = COMPOUND;
+
+        public static final ROStringArray enums = PrecedenceCommon.enums;
+        public static final ROStringArray enumValues
+                                            = PrecedenceCommon.enumValues;
+    }
+
+    public static class LineHeightShiftAdjustment extends Properties {
+        public static final int dataTypes = ENUM | INHERIT;
+        public static final int traitMapping = FORMATTING;
+        public static final int initialValueType = ENUM_IT;
+        public static final int CONSIDER_SHIFTS = 1;
+        public static final int DISREGARD_SHIFTS = 2;
+        protected static EnumType initialValue;
+        public static void setInitialValue(FOTree foTree) {
+            try {
+                initialValue = new EnumType
+                    (PropNames.LINE_HEIGHT_SHIFT_ADJUSTMENT,
+                                                    CONSIDER_SHIFTS);
+            } catch (PropertyException e) {
+                throw new RuntimeException
+                                    ("PropertyException: " + e.getMessage());
+            }
+        }
+        public static final int inherited = COMPUTED;
+
+        private static final String[] rwEnums = {
+            null
+            ,"consider-shifts"
+            ,"disregard-shifts"
+        };
+        public static final ROStringArray enums = new ROStringArray(rwEnums);
+
+        public static final ROStringArray enumValues = enums;
+    }
+
+    public static class LineStackingStrategy extends Properties {
+        public static final int dataTypes = ENUM | INHERIT;
+        public static final int traitMapping = FORMATTING;
+        public static final int initialValueType = ENUM_IT;
+        public static final int LINE_HEIGHT = 1;
+        public static final int FONT_HEIGHT = 2;
+        public static final int MAX_HEIGHT = 3;
+        protected static EnumType initialValue;
+        public static void setInitialValue(FOTree foTree) {
+            try {
+                initialValue = new EnumType
+                        (PropNames.LINE_STACKING_STRATEGY, LINE_HEIGHT);
+            } catch (PropertyException e) {
+                throw new RuntimeException
+                                    ("PropertyException: " + e.getMessage());
+            }
+        }
+        public static final int inherited = COMPUTED;
+
+        private static final String[] rwEnums = {
+            null
+            ,"line-height"
+            ,"font-height"
+            ,"max-height"
+        };
+        public static final ROStringArray enums = new ROStringArray(rwEnums);
+
+        public static final ROStringArray enumValues = enums;
+    }
+
+    public static class Margin extends Properties {
+        public static final int dataTypes = SHORTHAND;
+        public static final int traitMapping = SHORTHAND_MAP;
+        public static final int initialValueType = NOTYPE_IT;
+        public static final int inherited = NO;
+    }
+
+    public static class MarginBottom extends Properties {
+        public static final int dataTypes =
+                                        PERCENTAGE | LENGTH | AUTO | INHERIT;
+        public static final int traitMapping = DISAPPEARS;
+        public static final int initialValueType = LENGTH_IT;
+        protected static Numeric initialValue;
+        public static void setInitialValue(FOTree foTree) {
+            try {
+                initialValue = Length.makeLength
+                                    (PropNames.MARGIN_BOTTOM, 0.0d, Length.PT);
+            } catch (PropertyException e) {
+                throw new RuntimeException
+                                    ("PropertyException: " + e.getMessage());
+            }
+        }
+        public static final int inherited = NO;
+    }
+
+    public static class MarginLeft extends Properties {
+        public static final int dataTypes =
+                                        PERCENTAGE | LENGTH | AUTO | INHERIT;
+        public static final int traitMapping = DISAPPEARS;
+        public static final int initialValueType = LENGTH_IT;
+        protected static Numeric initialValue;
+        public static void setInitialValue(FOTree foTree) {
+            try {
+                initialValue = Length.makeLength
+                                    (PropNames.MARGIN_LEFT, 0.0d, Length.PT);
+            } catch (PropertyException e) {
+                throw new RuntimeException
+                                    ("PropertyException: " + e.getMessage());
+            }
+        }
+        public static final int inherited = NO;
+    }
+
+    public static class MarginRight extends Properties {
+        public static final int dataTypes =
+                                        PERCENTAGE | LENGTH | AUTO | INHERIT;
+        public static final int traitMapping = DISAPPEARS;
+        public static final int initialValueType = LENGTH_IT;
+        protected static Numeric initialValue;
+        public static void setInitialValue(FOTree foTree) {
+            try {
+                initialValue = Length.makeLength
+                                    (PropNames.MARGIN_RIGHT, 0.0d, Length.PT);
+            } catch (PropertyException e) {
+                throw new RuntimeException
+                                    ("PropertyException: " + e.getMessage());
+            }
+        }
+        public static final int inherited = NO;
+    }
+
+    public static class MarginTop extends Properties {
+        public static final int dataTypes =
+                                        PERCENTAGE | LENGTH | AUTO | INHERIT;
+        public static final int traitMapping = DISAPPEARS;
+        public static final int initialValueType = LENGTH_IT;
+        protected static Numeric initialValue;
+        public static void setInitialValue(FOTree foTree) {
+            try {
+                initialValue = Length.makeLength
+                                    (PropNames.MARGIN_TOP, 0.0d, Length.PT);
+            } catch (PropertyException e) {
+                throw new RuntimeException
+                                    ("PropertyException: " + e.getMessage());
+            }
+        }
+        public static final int inherited = NO;
+    }
+
+    public static class MarkerClassName extends Properties {
+        public static final int dataTypes = NAME;
+        public static final int traitMapping = FORMATTING;
+        public static final int initialValueType = NAME_IT;
+        protected static NCName initialValue;
+        public static void setInitialValue(FOTree foTree) {
+            try {
+                initialValue = new NCName(PropNames.MARKER_CLASS_NAME, "");
+            } catch (PropertyException e) {
+                throw new RuntimeException
+                                    ("PropertyException: " + e.getMessage());
+            }
+        }
+        public static final int inherited = NO;
+    }
+
+    public static class MasterName extends Properties {
+        public static final int dataTypes = NAME;
+        public static final int traitMapping = SPECIFICATION;
+        public static final int initialValueType = NAME_IT;
+        protected static NCName initialValue;
+        public static void setInitialValue(FOTree foTree) {
+            try {
+                initialValue = new NCName(PropNames.MASTER_NAME, "");
+            } catch (PropertyException e) {
+                throw new RuntimeException
+                                    ("PropertyException: " + e.getMessage());
+            }
+        }
+        public static final int inherited = NO;
+    }
+
+    public static class MasterReference extends Properties {
+        public static final int dataTypes = NAME;
+        public static final int traitMapping = SPECIFICATION;
+        public static final int initialValueType = NAME_IT;
+        protected static NCName initialValue;
+        public static void setInitialValue(FOTree foTree) {
+            try {
+                initialValue = new NCName(PropNames.MASTER_REFERENCE, "");
+            } catch (PropertyException e) {
+                throw new RuntimeException
+                                    ("PropertyException: " + e.getMessage());
+            }
+        }
+        public static final int inherited = NO;
+    }
+
+    public static class MaxHeight extends Properties {
+        public static final int dataTypes =
+                                        PERCENTAGE | LENGTH | NONE | INHERIT;
+        public static final int traitMapping = SHORTHAND_MAP;
+        public static final int initialValueType = LENGTH_IT;
+        protected static Numeric initialValue;
+        public static void setInitialValue(FOTree foTree) {
+            try {
+                initialValue = Length.makeLength
+                                    (PropNames.MAX_HEIGHT, 0.0d, Length.PT);
+            } catch (PropertyException e) {
+                throw new RuntimeException
+                                    ("PropertyException: " + e.getMessage());
+            }
+        }
+        public static final int inherited = NO;
+    }
+
+    public static class MaximumRepeats extends Properties {
+        public static final int dataTypes = NUMBER | ENUM | INHERIT;
+        public static final int traitMapping = SPECIFICATION;
+        public static final int initialValueType = ENUM_IT;
+        public static final int NO_LIMIT = 1;
+        protected static EnumType initialValue;
+        public static void setInitialValue(FOTree foTree) {
+            try {
+                initialValue = new EnumType
+                                (PropNames.MAXIMUM_REPEATS, NO_LIMIT);
+            } catch (PropertyException e) {
+                throw new RuntimeException
+                                    ("PropertyException: " + e.getMessage());
+            }
+        }
+        public static final int inherited = NO;
+
+        private static final String[] rwEnums = {
+            null
+            ,"no-limit"
+        };
+        public static final ROStringArray enums = new ROStringArray(rwEnums);
+
+        public static final ROStringArray enumValues = enums;
+
+    }
+
+    public static class MaxWidth extends Properties {
+        public static final int dataTypes =
+                                        PERCENTAGE | LENGTH | NONE | INHERIT;
+        public static final int traitMapping = SHORTHAND_MAP;
+        public static final int initialValueType = NONE_IT;
+        public static final int inherited = NO;
+    }
+
+    public static class MediaUsage extends Properties {
+        public static final int dataTypes = AUTO | ENUM;
+        public static final int traitMapping = FORMATTING;
+        public static final int initialValueType = AUTO_IT;
+        public static final int PAGINATE = 1;
+        public static final int BOUNDED_IN_ONE_DIMENSION = 2;
+        public static final int UNBOUNDED = 3;
+        public static final int inherited = NO;
+
+        private static final String[] rwEnums = {
+            null
+            ,"paginate"
+            ,"bounded-in-one-dimension"
+            ,"unbounded"
+        };
+        public static final ROStringArray enums = new ROStringArray(rwEnums);
+
+        public static final ROStringArray enumValues = enums;
+    }
+
+    public static class MinHeight extends Properties {
+        public static final int dataTypes = PERCENTAGE | LENGTH | INHERIT;
+        public static final int traitMapping = SHORTHAND_MAP;
+        public static final int initialValueType = LENGTH_IT;
+        protected static Numeric initialValue;
+        public static void setInitialValue(FOTree foTree) {
+            try {
+                initialValue = Length.makeLength
+                                    (PropNames.MIN_HEIGHT, 0.0d, Length.PT);
+            } catch (PropertyException e) {
+                throw new RuntimeException
+                                    ("PropertyException: " + e.getMessage());
+            }
+        }
+        public static final int inherited = NO;
+    }
+
+    public static class MinWidth extends Properties {
+        public static final int dataTypes = PERCENTAGE | LENGTH | INHERIT;
+        public static final int traitMapping = SHORTHAND_MAP;
+        public static final int initialValueType = NOTYPE_IT;
+        public static final int inherited = NO;
+    }
+
+    public static class NumberColumnsRepeated extends Properties {
+        public static final int dataTypes = NUMBER;
+        public static final int traitMapping = SPECIFICATION;
+        public static final int initialValueType = NUMBER_IT;
+        protected static Numeric initialValue;
+        public static void setInitialValue(FOTree foTree) {
+            try {
+                initialValue = new Numeric
+                                    (PropNames.NUMBER_COLUMNS_REPEATED, 1d);
+            } catch (PropertyException e) {
+                throw new RuntimeException
+                                    ("PropertyException: " + e.getMessage());
+            }
+        }
+
+        public static final int inherited = NO;
+    }
+
+    public static class NumberColumnsSpanned extends Properties {
+        public static final int dataTypes = NUMBER;
+        public static final int traitMapping = FORMATTING;
+        public static final int initialValueType = NUMBER_IT;
+        protected static Numeric initialValue;
+        public static void setInitialValue(FOTree foTree) {
+            try {
+                initialValue = new Numeric
+                                    (PropNames.NUMBER_COLUMNS_SPANNED, 1d);
+            } catch (PropertyException e) {
+                throw new RuntimeException
+                                    ("PropertyException: " + e.getMessage());
+            }
+        }
+
+        public static final int inherited = NO;
+    }
+
+    public static class NumberRowsSpanned extends Properties {
+        public static final int dataTypes = NUMBER;
+        public static final int traitMapping = FORMATTING;
+        public static final int initialValueType = NUMBER_IT;
+        protected static Numeric initialValue;
+        public static void setInitialValue(FOTree foTree) {
+            try {
+                initialValue = new Numeric(PropNames.NUMBER_ROWS_SPANNED, 1d);
+            } catch (PropertyException e) {
+                throw new RuntimeException
+                                    ("PropertyException: " + e.getMessage());
+            }
+        }
+
+        public static final int inherited = NO;
+    }
+
+    public static class OddOrEven extends Properties {
+        public static final int dataTypes = ENUM | INHERIT;
+        public static final int traitMapping = SPECIFICATION;
+        public static final int initialValueType = ENUM_IT;
+        public static final int ODD = 1;
+        public static final int EVEN = 2;
+        public static final int ANY = 3;
+        protected static EnumType initialValue;
+        public static void setInitialValue(FOTree foTree) {
+            try {
+                initialValue = new EnumType(PropNames.ODD_OR_EVEN, ANY);
+            } catch (PropertyException e) {
+                throw new RuntimeException
+                                    ("PropertyException: " + e.getMessage());
+            }
+        }
+        public static final int inherited = NO;
+
+        private static final String[] rwEnums = {
+            null
+            ,"odd"
+            ,"even"
+            ,"any"
+        };
+        public static final ROStringArray enums = new ROStringArray(rwEnums);
+
+        public static final ROStringArray enumValues = enums;
+
+    }
+
+    public static class Orphans extends Properties {
+        public static final int dataTypes = INTEGER | INHERIT;
+        public static final int traitMapping = FORMATTING;
+        public static final int initialValueType = INTEGER_IT;
+        protected static Numeric initialValue;
+        public static void setInitialValue(FOTree foTree) {
+            try {
+                initialValue = IntegerType.makeInteger(PropNames.ORPHANS, 2);
+            } catch(PropertyException e) {
+                throw new RuntimeException
+                                    ("PropertyException: " + e.getMessage());
+            }
+        }
+
+        public static final int inherited = COMPUTED;
+    }
+
+    public static class Overflow extends Properties {
+        public static final int dataTypes = AUTO | ENUM | INHERIT;
+        public static final int traitMapping = FORMATTING;
+        public static final int initialValueType = AUTO_IT;
+        public static final int VISIBLE = 1;
+        public static final int HIDDEN = 2;
+        public static final int SCROLL = 3;
+        public static final int ERROR_IF_OVERFLOW = 4;
+        public static final int inherited = NO;
+
+        private static final String[] rwEnums = {
+            null
+            ,"visible"
+            ,"hidden"
+            ,"scroll"
+            ,"error-if-overflow"
+        };
+        public static final ROStringArray enums = new ROStringArray(rwEnums);
+
+        public static final ROStringArray enumValues = enums;
+
+    }
+
+    public static class Padding extends Properties {
+        public static final int dataTypes = SHORTHAND;
+        public static final int traitMapping = SHORTHAND_MAP;
+        public static final int initialValueType = NOTYPE_IT;
+        public static final int inherited = NO;
+    }
+
+    public static class PaddingAfter extends Properties {
+        public static final int dataTypes = PERCENTAGE | LENGTH | INHERIT;
+        public static final int traitMapping = FORMATTING | RENDERING;
+        public static final int initialValueType = LENGTH_IT;
+        protected static Numeric initialValue;
+        public static void setInitialValue(FOTree foTree) {
+            try {
+                initialValue = Length.makeLength
+                                    (PropNames.PADDING_AFTER, 0.0d, Length.PT);
+            } catch (PropertyException e) {
+                throw new RuntimeException
+                                    ("PropertyException: " + e.getMessage());
+            }
+        }
+        public static final int inherited = NO;
+    }
+
+    public static class PaddingAfterLength extends Properties {
+        public static final int dataTypes = LENGTH;
+        public static final int traitMapping = FORMATTING | RENDERING;
+        public static final int initialValueType = LENGTH_IT;
+        protected static Numeric initialValue;
+        public static void setInitialValue(FOTree foTree) {
+            try {
+                initialValue = Length.makeLength
+                            (PropNames.PADDING_AFTER_LENGTH, 0.0d, Length.PT);
+            } catch (PropertyException e) {
+                throw new RuntimeException
+                                    ("PropertyException: " + e.getMessage());
+            }
+        }
+        public static final int inherited = COMPOUND;
+    }
+
+    public static class PaddingAfterConditionality extends Properties {
+        public static final int dataTypes = ENUM;
+        public static final int traitMapping = FORMATTING | RENDERING;
+        public static final int initialValueType = ENUM_IT;
+        protected static EnumType initialValue;
+        public static void setInitialValue(FOTree foTree) {
+            try {
+                initialValue = new EnumType
+                        (PropNames.PADDING_AFTER_CONDITIONALITY,
+                                                Conditionality.DISCARD);
+            } catch (PropertyException e) {
+                throw new RuntimeException
+                                    ("PropertyException: " + e.getMessage());
+            }
+        }
+        public static final int inherited = COMPOUND;
+
+        public static final ROStringArray enums = Conditionality.enums;
+        public static final ROStringArray enumValues
+                                            = Conditionality.enumValues;
+    }
+
+    public static class PaddingBefore extends Properties {
+        public static final int dataTypes = PERCENTAGE | LENGTH | INHERIT;
+        public static final int traitMapping = FORMATTING | RENDERING;
+        public static final int initialValueType = LENGTH_IT;
+        protected static Numeric initialValue;
+        public static void setInitialValue(FOTree foTree) {
+            try {
+                initialValue = Length.makeLength
+                                (PropNames.PADDING_BEFORE, 0.0d, Length.PT);
+            } catch (PropertyException e) {
+                throw new RuntimeException
+                                    ("PropertyException: " + e.getMessage());
+            }
+        }
+        public static final int inherited = NO;
+    }
+
+    public static class PaddingBeforeLength extends Properties {
+        public static final int dataTypes = LENGTH;
+        public static final int traitMapping = FORMATTING | RENDERING;
+        public static final int initialValueType = LENGTH_IT;
+        protected static Numeric initialValue;
+        public static void setInitialValue(FOTree foTree) {
+            try {
+                initialValue = Length.makeLength
+                            (PropNames.PADDING_BEFORE_LENGTH, 0.0d, Length.PT);
+            } catch (PropertyException e) {
+                throw new RuntimeException
+                                    ("PropertyException: " + e.getMessage());
+            }
+        }
+        public static final int inherited = COMPOUND;
+    }
+
+    public static class PaddingBeforeConditionality extends Properties {
+        public static final int dataTypes = ENUM;
+        public static final int traitMapping = FORMATTING | RENDERING;
+        public static final int initialValueType = ENUM_IT;
+        protected static EnumType initialValue;
+        public static void setInitialValue(FOTree foTree) {
+            try {
+                initialValue = new EnumType
+                        (PropNames.PADDING_BEFORE_CONDITIONALITY,
+                                                Conditionality.DISCARD);
+            } catch (PropertyException e) {
+                throw new RuntimeException
+                                    ("PropertyException: " + e.getMessage());
+            }
+        }
+        public static final int inherited = COMPOUND;
+
+        public static final ROStringArray enums = Conditionality.enums;
+        public static final ROStringArray enumValues
+                                            = Conditionality.enumValues;
+    }
+
+    public static class PaddingBottom extends Properties {
+        public static final int dataTypes = PERCENTAGE | LENGTH | INHERIT;
+        public static final int traitMapping = DISAPPEARS;
+        public static final int initialValueType = LENGTH_IT;
+        protected static Numeric initialValue;
+        public static void setInitialValue(FOTree foTree) {
+            try {
+                initialValue = Length.makeLength
+                                (PropNames.PADDING_BOTTOM, 0.0d, Length.PT);
+            } catch (PropertyException e) {
+                throw new RuntimeException
+                                    ("PropertyException: " + e.getMessage());
+            }
+        }
+        public static final int inherited = NO;
+    }
+
+    public static class PaddingEnd extends Properties {
+        public static final int dataTypes = PERCENTAGE | LENGTH | INHERIT;
+        public static final int traitMapping = FORMATTING | RENDERING;
+        public static final int initialValueType = LENGTH_IT;
+        protected static Numeric initialValue;
+        public static void setInitialValue(FOTree foTree) {
+            try {
+                initialValue = Length.makeLength
+                                  (PropNames.PADDING_END, 0.0d, Length.PT);
+            } catch (PropertyException e) {
+                throw new RuntimeException
+                                    ("PropertyException: " + e.getMessage());
+            }
+        }
+        public static final int inherited = NO;
+    }
+
+    public static class PaddingEndLength extends Properties {
+        public static final int dataTypes = LENGTH;
+        public static final int traitMapping = FORMATTING | RENDERING;
+        public static final int initialValueType = LENGTH_IT;
+        protected static Numeric initialValue;
+        public static void setInitialValue(FOTree foTree) {
+            try {
+                initialValue = Length.makeLength
+                            (PropNames.PADDING_END_LENGTH, 0.0d, Length.PT);
+            } catch (PropertyException e) {
+                throw new RuntimeException
+                                    ("PropertyException: " + e.getMessage());
+            }
+        }
+        public static final int inherited = COMPOUND;
+    }
+
+    public static class PaddingEndConditionality extends Properties {
+        public static final int dataTypes = ENUM;
+        public static final int traitMapping = FORMATTING | RENDERING;
+        public static final int initialValueType = ENUM_IT;
+        protected static EnumType initialValue;
+        public static void setInitialValue(FOTree foTree) {
+            try {
+                initialValue = new EnumType
+                        (PropNames.PADDING_END_CONDITIONALITY,
+                                                Conditionality.DISCARD);
+            } catch (PropertyException e) {
+                throw new RuntimeException
+                                    ("PropertyException: " + e.getMessage());
+            }
+        }
+        public static final int inherited = COMPOUND;
+
+        public static final ROStringArray enums = Conditionality.enums;
+        public static final ROStringArray enumValues
+                                            = Conditionality.enumValues;
+    }
+
+    public static class PaddingLeft extends Properties {
+        public static final int dataTypes = PERCENTAGE | LENGTH | INHERIT;
+        public static final int traitMapping = DISAPPEARS;
+        public static final int initialValueType = LENGTH_IT;
+        protected static Numeric initialValue;
+        public static void setInitialValue(FOTree foTree) {
+            try {
+                initialValue = Length.makeLength
+                                    (PropNames.PADDING_LEFT, 0.0d, Length.PT);
+            } catch (PropertyException e) {
+                throw new RuntimeException
+                                    ("PropertyException: " + e.getMessage());
+            }
+        }
+        public static final int inherited = NO;
+    }
+
+    public static class PaddingRight extends Properties {
+        public static final int dataTypes = PERCENTAGE | LENGTH | INHERIT;
+        public static final int traitMapping = DISAPPEARS;
+        public static final int initialValueType = LENGTH_IT;
+        protected static Numeric initialValue;
+        public static void setInitialValue(FOTree foTree) {
+            try {
+                initialValue = Length.makeLength
+                                    (PropNames.PADDING_RIGHT, 0.0d, Length.PT);
+            } catch (PropertyException e) {
+                throw new RuntimeException
+                                    ("PropertyException: " + e.getMessage());
+            }
+        }
+        public static final int inherited = NO;
+    }
+
+    public static class PaddingStart extends Properties {
+        public static final int dataTypes = PERCENTAGE | LENGTH | INHERIT;
+        public static final int traitMapping = FORMATTING | RENDERING;
+        public static final int initialValueType = LENGTH_IT;
+        protected static Numeric initialValue;
+        public static void setInitialValue(FOTree foTree) {
+            try {
+                initialValue = Length.makeLength
+                                    (PropNames.PADDING_START, 0.0d, Length.PT);
+            } catch (PropertyException e) {
+                throw new RuntimeException
+                                    ("PropertyException: " + e.getMessage());
+            }
+        }
+        public static final int inherited = NO;
+    }
+
+    public static class PaddingStartLength extends Properties {
+        public static final int dataTypes = LENGTH;
+        public static final int traitMapping = FORMATTING | RENDERING;
+        public static final int initialValueType = LENGTH_IT;
+        protected static Numeric initialValue;
+        public static void setInitialValue(FOTree foTree) {
+            try {
+                initialValue = Length.makeLength
+                            (PropNames.PADDING_START_LENGTH, 0.0d, Length.PT);
+            } catch (PropertyException e) {
+                throw new RuntimeException
+                                    ("PropertyException: " + e.getMessage());
+            }
+        }
+        public static final int inherited = COMPOUND;
+    }
+
+    public static class PaddingStartConditionality extends Properties {
+        public static final int dataTypes = ENUM;
+        public static final int traitMapping = FORMATTING | RENDERING;
+        public static final int initialValueType = ENUM_IT;
+        protected static EnumType initialValue;
+        public static void setInitialValue(FOTree foTree) {
+            try {
+                initialValue = new EnumType
+                    (PropNames.PADDING_START_CONDITIONALITY,
+                                                Conditionality.DISCARD);
+            } catch (PropertyException e) {
+                throw new RuntimeException
+                                    ("PropertyException: " + e.getMessage());
+            }
+        }
+        public static final int inherited = COMPOUND;
+
+        public static final ROStringArray enums = Conditionality.enums;
+        public static final ROStringArray enumValues
+                                            = Conditionality.enumValues;
+    }
+
+    public static class PaddingTop extends Properties {
+        public static final int dataTypes = PERCENTAGE | LENGTH | INHERIT;
+        public static final int traitMapping = DISAPPEARS;
+        public static final int initialValueType = LENGTH_IT;
+        protected static Numeric initialValue;
+        public static void setInitialValue(FOTree foTree) {
+            try {
+                initialValue = Length.makeLength
+                                    (PropNames.PADDING_TOP, 0.0d, Length.PT);
+            } catch (PropertyException e) {
+                throw new RuntimeException
+                                    ("PropertyException: " + e.getMessage());
+            }
+        }
+        public static final int inherited = NO;
+    }
+
+    public static class PageBreakAfter extends Properties {
+        public static final int dataTypes = SHORTHAND | AUTO | ENUM | INHERIT;
+        public static final int traitMapping = SHORTHAND_MAP;
+        public static final int initialValueType = AUTO_IT;
+        public static final int ALWAYS = 1;
+        public static final int AVOID = 2;
+        public static final int LEFT = 3;
+        public static final int RIGHT = 4;
+        public static final int inherited = NO;
+
+        private static final String[] rwEnums = {
+            null
+            ,"always"
+            ,"avoid"
+            ,"left"
+            ,"right"
+        };
+        public static final ROStringArray enums = new ROStringArray(rwEnums);
+
+        private static final HashMap rwEnumValues;
+        public static final Map enumValues;
+        static {
+            rwEnumValues = new HashMap(rwEnums.length);
+            for (int i = 1; i < rwEnums.length; i++ ) {
+                rwEnumValues.put((Object)rwEnums[i],
+                                    (Object) Ints.consts.get(i));
+            }
+            enumValues =
+                Collections.unmodifiableMap((Map)rwEnumValues);
+        }
+    }
+    public static class PageBreakBefore extends Properties {
+        public static final int dataTypes = SHORTHAND | AUTO | ENUM | INHERIT;
+        public static final int traitMapping = SHORTHAND_MAP;
+        public static final int initialValueType = AUTO_IT;
+        public static final int inherited = NO;
+
+        private static final HashMap rwEnumValues
+                                            = PageBreakAfter.rwEnumValues;
+    }
+
+    public static class PageBreakInside extends Properties {
+        public static final int dataTypes = SHORTHAND | AUTO | ENUM | INHERIT;
+        public static final int traitMapping = SHORTHAND_MAP;
+        public static final int initialValueType = AUTO_IT;
+        public static final int AVOID = 1;
+        public static final int inherited = COMPUTED;
+
+        private static final String[] rwEnums = {
+            null
+            ,"avoid"
+        };
+        public static final ROStringArray enums = new ROStringArray(rwEnums);
+
+        public static final ROStringArray enumValues = enums;
+    }
+
+    public static class PageHeight extends Properties {
+        public static final int dataTypes = LENGTH | AUTO | ENUM | INHERIT;
+        public static final int traitMapping = SPECIFICATION;
+        public static final int initialValueType = AUTO_IT;
+        public static final int INDEFINITE = 1;
+        public static final int inherited = NO;
+
+        private static final String[] rwEnums = {
+            null
+            ,"indefinite"
+        };
+        public static final ROStringArray enums = new ROStringArray(rwEnums);
+
+        public static final ROStringArray enumValues = enums;
+    }
+
+    public static class PagePosition extends Properties {
+        public static final int dataTypes = ENUM | INHERIT;
+        public static final int traitMapping = SPECIFICATION;
+        public static final int initialValueType = ENUM_IT;
+        public static final int FIRST = 1;
+        public static final int LAST = 2;
+        public static final int REST = 3;
+        public static final int ANY = 4;
+        protected static EnumType initialValue;
+        public static void setInitialValue(FOTree foTree) {
+            try {
+                initialValue = new EnumType
+                                        (PropNames.PAGE_POSITION, ANY);
+            } catch (PropertyException e) {
+                throw new RuntimeException
+                                    ("PropertyException: " + e.getMessage());
+            }
+        }
+        public static final int inherited = NO;
+
+        private static final String[] rwEnums = {
+            null
+            ,"first"
+            ,"last"
+            ,"rest"
+            ,"any"
+        };
+        public static final ROStringArray enums = new ROStringArray(rwEnums);
+
+        public static final ROStringArray enumValues = enums;
+    }
+
+    public static class PageWidth extends Properties {
+        public static final int dataTypes = LENGTH | ENUM | INHERIT;
+        public static final int traitMapping = SPECIFICATION;
+        public static final int initialValueType = AUTO_IT;
+        public static final int inherited = NO;
+
+        public static final ROStringArray enumValues = PageHeight.enumValues;
+    }
+
+    public static class Pause extends Properties {
+        public static final int dataTypes = AURAL;
+        public static final int traitMapping = SHORTHAND_MAP;
+        public static final int initialValueType = AURAL_IT;
+        public static final int inherited = NO;
+    }
+
+    public static class PauseAfter extends Properties {
+        public static final int dataTypes = AURAL;
+        public static final int traitMapping = RENDERING;
+        public static final int initialValueType = AURAL_IT;
+        public static final int inherited = NO;
+    }
+
+    public static class PauseBefore extends Properties {
+        public static final int dataTypes = AURAL;
+        public static final int traitMapping = RENDERING;
+        public static final int initialValueType = AURAL_IT;
+        public static final int inherited = NO;
+    }
+
+    public static class Pitch extends Properties {
+        public static final int dataTypes = AURAL;
+        public static final int traitMapping = RENDERING;
+        public static final int initialValueType = AURAL_IT;
+        public static final int inherited = COMPUTED;
+    }
+
+    public static class PitchRange extends Properties {
+        public static final int dataTypes = AURAL;
+        public static final int traitMapping = RENDERING;
+        public static final int initialValueType = AURAL_IT;
+        public static final int inherited = COMPUTED;
+    }
+
+    public static class PlayDuring extends Properties {
+        public static final int dataTypes = AURAL;
+        public static final int traitMapping = RENDERING;
+        public static final int initialValueType = AURAL_IT;
+        public static final int inherited = NO;
+    }
+
+    public static class Position extends Properties {
+        public static final int dataTypes = SHORTHAND | ENUM | INHERIT;
+        public static final int traitMapping = SHORTHAND_MAP;
+        public static final int initialValueType = ENUM_IT;
+        public static final int STATIC = 1;
+        public static final int RELATIVE = 2;
+        public static final int ABSOLUTE = 3;
+        public static final int FIXED = 4;
+        protected static EnumType initialValue;
+        public static void setInitialValue(FOTree foTree) {
+            try {
+                initialValue = new EnumType(PropNames.POSITION, STATIC);
+            } catch (PropertyException e) {
+                throw new RuntimeException
+                                    ("PropertyException: " + e.getMessage());
+            }
+        }
+        public static final int inherited = NO;
+
+        private static final String[] rwEnums = {
+            null
+            ,"static"
+            ,"relative"
+            ,"absolute"
+            ,"fixed"
+        };
+        public static final ROStringArray enums = new ROStringArray(rwEnums);
+
+        public static final ROStringArray enumValues = enums;
+    }
+
+    public static class Precedence extends Properties {
+        public static final int dataTypes = BOOL | INHERIT;
+        public static final int traitMapping = SPECIFICATION;
+        public static final int initialValueType = BOOL_IT;
+        protected static Bool initialValue;
+        public static void setInitialValue(FOTree foTree) {
+            try {
+                initialValue = new Bool(PropNames.PRECEDENCE, false);
+            } catch (PropertyException e) {
+                throw new RuntimeException
+                                ("PropertyException: " + e.getMessage());
+            }
+        }
+        public static final int inherited = NO;
+    }
+
+    public static class PrecedenceCommon extends Properties {
+        public static final int FORCE = 1;
+
+        private static final String[] rwEnums = {
+            null
+            ,"force"
+        };
+        public static final ROStringArray enums = new ROStringArray(rwEnums);
+
+        public static final ROStringArray enumValues = enums;
+    }
+
+    public static class ProvisionalDistanceBetweenStarts extends Properties {
+        public static final int dataTypes = LENGTH | INHERIT;
+        public static final int traitMapping = SPECIFICATION;
+        public static final int initialValueType = LENGTH_IT;
+        protected static Numeric initialValue;
+        public static void setInitialValue(FOTree foTree) {
+            try {
+                initialValue = Length.makeLength
+                    (PropNames.PROVISIONAL_DISTANCE_BETWEEN_STARTS,
+                        24.0d, Length.PT);
+            } catch (PropertyException e) {
+                throw new RuntimeException
+                                    ("PropertyException: " + e.getMessage());
+            }
+        }
+        public static final int inherited = COMPUTED;
+    }
+
+    public static class ProvisionalLabelSeparation extends Properties {
+        public static final int dataTypes = LENGTH | INHERIT;
+        public static final int traitMapping = SPECIFICATION;
+        public static final int initialValueType = LENGTH_IT;
+        protected static Numeric initialValue;
+        public static void setInitialValue(FOTree foTree) {
+            try {
+                initialValue = Length.makeLength
+                    (PropNames.PROVISIONAL_LABEL_SEPARATION, 6.0d, Length.PT);
+            } catch (PropertyException e) {
+                throw new RuntimeException
+                                    ("PropertyException: " + e.getMessage());
+            }
+        }
+        public static final int inherited = COMPUTED;
+    }
+
+    public static class ReferenceOrientation extends Properties {
+        public static final int dataTypes = INTEGER | INHERIT;
+        public static final int traitMapping = NEW_TRAIT;
+        public static final int initialValueType = INTEGER_IT;
+        protected static Numeric initialValue;
+        public static void setInitialValue(FOTree foTree) {
+            try {
+                initialValue = IntegerType.makeInteger
+                                    (PropNames.REFERENCE_ORIENTATION, 0);
+            } catch (PropertyException e) {
+                throw new RuntimeException
+                                    ("PropertyException: " + e.getMessage());
+            }
+        }
+        public static final int inherited = COMPUTED;
+
+    }
+
+    public static class RefId extends Properties {
+        public static final int dataTypes = IDREF | INHERIT;
+        public static final int traitMapping = REFERENCE;
+        public static final int initialValueType = NOTYPE_IT;
+        public static final int inherited = NO;
+    }
+
+    public static class RegionName extends Properties {
+        public static final int dataTypes = NAME | ENUM;
+        public static final int traitMapping = SPECIFICATION;
+        public static final int initialValueType = NOTYPE_IT;
+        public static final int XSL_REGION_BODY = 1;
+        public static final int XSL_REGION_START = 2;
+        public static final int XSL_REGION_END = 3;
+        public static final int XSL_REGION_BEFORE = 4;
+        public static final int XSL_REGION_AFTER = 5;
+        public static final int XSL_BEFORE_FLOAT_SEPARATOR = 6;
+        public static final int XSL_FOOTNOTE_SEPARATOR = 7;
+        public static final int inherited = NO;
+
+        private static final String[] rwEnums = {
+            null
+            ,"xsl-region-body"
+            ,"xsl-region-start"
+            ,"xsl-region-end"
+            ,"xsl-region-before"
+            ,"xsl-region-after"
+            ,"xsl-before-float-separator"
+            ,"xsl-footnote-separator"
+        };
+        public static final ROStringArray enums = new ROStringArray(rwEnums);
+
+        private static final HashMap rwEnumValues;
+        public static final Map enumValues;
+        static {
+            rwEnumValues = new HashMap(rwEnums.length);
+            for (int i = 1; i < rwEnums.length; i++ ) {
+                rwEnumValues.put((Object)rwEnums[i],
+                                    (Object) Ints.consts.get(i));
+            }
+            enumValues =
+                Collections.unmodifiableMap((Map)rwEnumValues);
+        }
+    }
+
+    public static class RelativeAlign extends Properties {
+        public static final int dataTypes = ENUM | INHERIT;
+        public static final int traitMapping = FORMATTING;
+        public static final int initialValueType = ENUM_IT;
+        public static final int BEFORE = 1;
+        public static final int BASELINE = 2;
+        protected static EnumType initialValue;
+        public static void setInitialValue(FOTree foTree) {
+            try {
+                initialValue = new EnumType
+                                    (PropNames.RELATIVE_ALIGN, BEFORE);
+            } catch (PropertyException e) {
+                throw new RuntimeException
+                                    ("PropertyException: " + e.getMessage());
+            }
+        }
+        public static final int inherited = COMPUTED;
+
+        private static final String[] rwEnums = {
+            null
+            ,"before"
+            ,"baseline"
+        };
+        public static final ROStringArray enums = new ROStringArray(rwEnums);
+
+        public static final ROStringArray enumValues = enums;
+    }
+
+    public static class RelativePosition extends Properties {
+        public static final int dataTypes = ENUM | INHERIT;
+        public static final int traitMapping = NEW_TRAIT;
+        public static final int initialValueType = ENUM_IT;
+        public static final int STATIC = 1;
+        public static final int RELATIVE = 2;
+        protected static EnumType initialValue;
+        public static void setInitialValue(FOTree foTree) {
+            try {
+                initialValue = new EnumType
+                                (PropNames.RELATIVE_POSITION, STATIC);
+            } catch (PropertyException e) {
+                throw new RuntimeException
+                                    ("PropertyException: " + e.getMessage());
+            }
+        }
+        public static final int inherited = NO;
+
+        private static final String[] rwEnums = {
+            null
+            ,"static"
+            ,"relative"
+        };
+        public static final ROStringArray enums = new ROStringArray(rwEnums);
+
+        public static final ROStringArray enumValues = enums;
+    }
+
+    public static class RenderingIntent extends Properties {
+        public static final int dataTypes = AUTO | ENUM | INHERIT;
+        public static final int traitMapping = FORMATTING;
+        public static final int initialValueType = AUTO_IT;
+        public static final int PERCEPTUAL = 1;
+        public static final int RELATIVE_COLORIMETRIC = 2;
+        public static final int SATURATION = 3;
+        public static final int ABSOLUTE_COLORIMETRIC = 4;
+        public static final int inherited = NO;
+
+        private static final String[] rwEnums = {
+            null
+            ,"perceptual"
+            ,"relative-colorimetric"
+            ,"saturation"
+            ,"absolute-colorimetric"
+        };
+        public static final ROStringArray enums = new ROStringArray(rwEnums);
+
+        private static final HashMap rwEnumValues;
+        public static final Map enumValues;
+        static {
+            rwEnumValues = new HashMap(rwEnums.length);
+            for (int i = 1; i < rwEnums.length; i++ ) {
+                rwEnumValues.put((Object)rwEnums[i],
+                                    (Object) Ints.consts.get(i));
+            }
+            enumValues =
+                Collections.unmodifiableMap((Map)rwEnumValues);
+        }
+    }
+
+    public static class RetrieveBoundary extends Properties {
+        public static final int dataTypes = ENUM;
+        public static final int traitMapping = FORMATTING;
+        public static final int initialValueType = ENUM_IT;
+        public static final int PAGE = 1;
+        public static final int PAGE_SEQUENCE = 2;
+        public static final int DOCUMENT = 3;
+        protected static EnumType initialValue;
+        public static void setInitialValue(FOTree foTree) {
+            try {
+                initialValue = new EnumType
+                        (PropNames.RETRIEVE_BOUNDARY, PAGE_SEQUENCE);
+            } catch (PropertyException e) {
+                throw new RuntimeException
+                                    ("PropertyException: " + e.getMessage());
+            }
+        }
+        public static final int inherited = NO;
+
+        private static final String[] rwEnums = {
+            null
+            ,"page"
+            ,"page-sequence"
+            ,"document"
+        };
+        public static final ROStringArray enums = new ROStringArray(rwEnums);
+
+        public static final ROStringArray enumValues = enums;
+    }
+
+    public static class RetrieveClassName extends Properties {
+        public static final int dataTypes = NAME;
+        public static final int traitMapping = FORMATTING;
+        public static final int initialValueType = NOTYPE_IT;
+        public static final String initialValue = "";
+        public static final int inherited = NO;
+    }
+
+    public static class RetrievePosition extends Properties {
+        public static final int dataTypes = ENUM;
+        public static final int traitMapping = FORMATTING;
+        public static final int initialValueType = ENUM_IT;
+        public static final int FIRST_STARTING_WITHIN_PAGE = 1;
+        public static final int FIRST_INCLUDING_CARRYOVER = 2;
+        public static final int LAST_STARTING_WITHIN_PAGE = 3;
+        public static final int LAST_ENDING_WITHIN_PAGE = 4;
+        protected static EnumType initialValue;
+        public static void setInitialValue(FOTree foTree) {
+            try {
+                initialValue = new EnumType
+                        (PropNames.RETRIEVE_POSITION,
+                                            FIRST_STARTING_WITHIN_PAGE);
+            } catch (PropertyException e) {
+                throw new RuntimeException
+                                    ("PropertyException: " + e.getMessage());
+            }
+        }
+        public static final int inherited = NO;
+
+        private static final String[] rwEnums = {
+            null
+            ,"first-starting-within-page"
+            ,"first-including-carryover"
+            ,"last-starting-within-page"
+            ,"last-ending-within-page"
+        };
+        public static final ROStringArray enums = new ROStringArray(rwEnums);
+
+        public static final ROStringArray enumValues = enums;
+    }
+
+    public static class Richness extends Properties {
+        public static final int dataTypes = AURAL;
+        public static final int traitMapping = RENDERING;
+        public static final int initialValueType = AURAL_IT;
+        public static final int inherited = COMPUTED;
+    }
+
+    public static class Right extends Properties {
+        public static final int dataTypes =
+                                        PERCENTAGE | LENGTH | AUTO | INHERIT;
+        public static final int traitMapping = FORMATTING;
+        public static final int initialValueType = AUTO_IT;
+        public static final int inherited = NO;
+    }
+
+    public static class Role extends Properties {
+        public static final int dataTypes =
+                                STRING | URI_SPECIFICATION | NONE | INHERIT;
+        public static final int traitMapping = RENDERING;
+        public static final int initialValueType = NONE_IT;
+        public static final int inherited = NO;
+    }
+
+    public static class RuleStyle extends Properties {
+        public static final int dataTypes = ENUM | NONE | INHERIT;
+        public static final int traitMapping = RENDERING;
+        public static final int initialValueType = ENUM_IT;
+        public static final int DOTTED = 1;
+        public static final int DASHED = 2;
+        public static final int SOLID = 3;
+        public static final int DOUBLE = 4;
+        public static final int GROOVE = 5;
+        public static final int RIDGE = 6;
+        protected static EnumType initialValue;
+        public static void setInitialValue(FOTree foTree) {
+            try {
+                initialValue = new EnumType(PropNames.RULE_STYLE, SOLID);
+            } catch (PropertyException e) {
+                throw new RuntimeException
+                                    ("PropertyException: " + e.getMessage());
+            }
+        }
+        public static final int inherited = COMPUTED;
+
+        private static final String[] rwEnums = {
+            null
+            ,"dotted"
+            ,"dashed"
+            ,"solid"
+            ,"double"
+            ,"groove"
+            ,"ridge"
+        };
+        public static final ROStringArray enums = new ROStringArray(rwEnums);
+
+        private static final HashMap rwEnumValues;
+        public static final Map enumValues;
+        static {
+            rwEnumValues = new HashMap(rwEnums.length);
+            for (int i = 1; i < rwEnums.length; i++ ) {
+                rwEnumValues.put((Object)rwEnums[i],
+                                    (Object) Ints.consts.get(i));
+            }
+            enumValues =
+                Collections.unmodifiableMap((Map)rwEnumValues);
+        }
+    }
+
+    public static class RuleThickness extends Properties {
+        public static final int dataTypes = LENGTH;
+        public static final int traitMapping = RENDERING;
+        public static final int initialValueType = LENGTH_IT;
+        protected static Numeric initialValue;
+        public static void setInitialValue(FOTree foTree) {
+            try {
+                initialValue = Length.makeLength
+                                (PropNames.RULE_THICKNESS, 1.0d, Length.PT);
+            } catch (PropertyException e) {
+                throw new RuntimeException
+                                    ("PropertyException: " + e.getMessage());
+            }
+        }
+        public static final int inherited = COMPUTED;
+    }
+
+    public static class Scaling extends Properties {
+        public static final int dataTypes = ENUM | INHERIT;
+        public static final int traitMapping = FORMATTING;
+        public static final int initialValueType = ENUM_IT;
+        public static final int UNIFORM = 1;
+        public static final int NON_UNIFORM = 2;
+        protected static EnumType initialValue;
+        public static void setInitialValue(FOTree foTree) {
+            try {
+                initialValue = new EnumType(PropNames.SCALING, UNIFORM);
+            } catch (PropertyException e) {
+                throw new RuntimeException
+                                    ("PropertyException: " + e.getMessage());
+            }
+        }
+        public static final int inherited = NO;
+
+        private static final String[] rwEnums = {
+            null
+            ,"uniform"
+            ,"non-uniform"
+        };
+        public static final ROStringArray enums = new ROStringArray(rwEnums);
+
+        public static final ROStringArray enumValues = enums;
+    }
+
+    public static class ScalingMethod extends Properties {
+        public static final int dataTypes = AUTO | ENUM | INHERIT;
+        public static final int traitMapping = FORMATTING;
+        public static final int initialValueType = AUTO_IT;
+        public static final int INTEGER_PIXELS = 1;
+        public static final int RESAMPLE_ANY_METHOD = 2;
+        public static final int inherited = NO;
+
+        private static final String[] rwEnums = {
+            null
+            ,"integer-pixels"
+            ,"resample-any-method"
+        };
+        public static final ROStringArray enums = new ROStringArray(rwEnums);
+
+        public static final ROStringArray enumValues = enums;
+    }
+
+    public static class ScoreSpaces extends Properties {
+        public static final int dataTypes = BOOL | INHERIT;
+        public static final int traitMapping = FORMATTING;
+        public static final int initialValueType = BOOL_IT;
+        protected static Bool initialValue;
+        public static void setInitialValue(FOTree foTree) {
+            try {
+                initialValue = new Bool(PropNames.SCORE_SPACES, true);
+            } catch (PropertyException e) {
+                throw new RuntimeException
+                                ("PropertyException: " + e.getMessage());
+            }
+        }
+        public static final int inherited = COMPUTED;
+    }
+
+    public static class Script extends Properties {
+        public static final int dataTypes = SCRIPT_T | AUTO | NONE | INHERIT;
+        public static final int traitMapping = FORMATTING;
+        public static final int initialValueType = AUTO_IT;
+        public static final int inherited = COMPUTED;
+    }
+
+    public static class ShowDestination extends Properties {
+        public static final int dataTypes = ENUM;
+        public static final int traitMapping = ACTION;
+        public static final int initialValueType = ENUM_IT;
+        public static final int REPLACE = 1;
+        public static final int NEW = 2;
+        protected static EnumType initialValue;
+        public static void setInitialValue(FOTree foTree) {
+            try {
+                initialValue = new EnumType
+                                (PropNames.SHOW_DESTINATION, REPLACE);
+            } catch (PropertyException e) {
+                throw new RuntimeException
+                                    ("PropertyException: " + e.getMessage());
+            }
+        }
+        public static final int inherited = NO;
+
+        private static final String[] rwEnums = {
+            null
+            ,"replace"
+            ,"new"
+        };
+        public static final ROStringArray enums = new ROStringArray(rwEnums);
+
+        public static final ROStringArray enumValues = enums;
+    }
+
+    public static class Size extends Properties {
+        public static final int dataTypes = SHORTHAND | AUTO | ENUM | INHERIT;
+        public static final int traitMapping = SHORTHAND_MAP;
+        public static final int initialValueType = AUTO_IT;
+        public static final int LANDSCAPE = 1;
+        public static final int PORTRAIT = 2;
+        public static final int inherited = NO;
+
+        private static final String[] rwEnums = {
+            null
+            ,"landscape"
+            ,"portrait"
+        };
+        public static final ROStringArray enums = new ROStringArray(rwEnums);
+
+        public static final ROStringArray enumValues = enums;
+    }
+
+    public static class SourceDocument extends Properties {
+        public static final int dataTypes = COMPLEX | NONE | INHERIT;
+        public static final int traitMapping = RENDERING;
+        public static final int initialValueType = NONE_IT;
+        public static final int inherited = NO;
+
+        public static PropertyValue complex
+            (int property, PropertyValue list) throws PropertyException
+        {
+            // Confirm that the list contains only UriType elements
+            Iterator iter = ((PropertyValueList)list).iterator();
+            while (iter.hasNext()) {
+                Object value = iter.next();
+                if ( ! (value instanceof UriType))
+                    throw new PropertyException
+                        ("source-document requires a list of uris");
+            }
+            return list;
+        }
+    }
+
+    public static class SpaceAfter extends Properties {
+        public static final int dataTypes = LENGTH | INHERIT;
+        public static final int traitMapping = FORMATTING;
+        public static final int initialValueType = NOTYPE_IT;
+        public static final int inherited = NO;
+    }
+
+    public static class SpaceAfterMinimum extends Properties {
+        public static final int dataTypes = LENGTH;
+        public static final int traitMapping = FORMATTING;
+        public static final int initialValueType = LENGTH_IT;
+        protected static Numeric initialValue;
+        public static void setInitialValue(FOTree foTree) {
+            try {
+                initialValue = Length.makeLength
+                            (PropNames.SPACE_AFTER_MINIMUM, 0.0d, Length.PT);
+            } catch (PropertyException e) {
+                throw new RuntimeException
+                                    ("PropertyException: " + e.getMessage());
+            }
+        }
+        public static final int inherited = COMPOUND;
+    }
+
+    public static class SpaceAfterOptimum extends Properties {
+        public static final int dataTypes = LENGTH;
+        public static final int traitMapping = FORMATTING;
+        public static final int initialValueType = LENGTH_IT;
+        protected static Numeric initialValue;
+        public static void setInitialValue(FOTree foTree) {
+            try {
+                initialValue = Length.makeLength
+                            (PropNames.SPACE_AFTER_OPTIMUM, 0.0d, Length.PT);
+            } catch (PropertyException e) {
+                throw new RuntimeException
+                                    ("PropertyException: " + e.getMessage());
+            }
+        }
+        public static final int inherited = COMPOUND;
+    }
+
+    public static class SpaceAfterMaximum extends Properties {
+        public static final int dataTypes = LENGTH;
+        public static final int traitMapping = FORMATTING;
+        public static final int initialValueType = LENGTH_IT;
+        protected static Numeric initialValue;
+        public static void setInitialValue(FOTree foTree) {
+            try {
+                initialValue = Length.makeLength
+                            (PropNames.SPACE_AFTER_MAXIMUM, 0.0d, Length.PT);
+            } catch (PropertyException e) {
+                throw new RuntimeException
+                                    ("PropertyException: " + e.getMessage());
+            }
+        }
+        public static final int inherited = COMPOUND;
+    }
+
+    public static class SpaceAfterConditionality extends Properties {
+        public static final int dataTypes = ENUM;
+        public static final int traitMapping = FORMATTING;
+        public static final int initialValueType = ENUM_IT;
+        protected static EnumType initialValue;
+        public static void setInitialValue(FOTree foTree) {
+            try {
+                initialValue = new EnumType
+                        (PropNames.SPACE_AFTER_CONDITIONALITY,
+                                            Conditionality.DISCARD);
+            } catch (PropertyException e) {
+                throw new RuntimeException
+                                    ("PropertyException: " + e.getMessage());
+            }
+        }
+        public static final int inherited = COMPOUND;
+
+        public static final ROStringArray enums = Conditionality.enums;
+        public static final ROStringArray enumValues
+                                            = Conditionality.enumValues;
+    }
+
+    public static class SpaceAfterPrecedence extends Properties {
+        public static final int dataTypes = INTEGER | ENUM;
+        public static final int traitMapping = FORMATTING;
+        public static final int initialValueType = INTEGER_IT;
+        protected static Numeric initialValue;
+        public static void setInitialValue(FOTree foTree) {
+            try {
+                initialValue = IntegerType.makeInteger
+                                        (PropNames.SPACE_AFTER_PRECEDENCE, 0);
+            } catch(PropertyException e) {
+                throw new RuntimeException
+                                    ("PropertyException: " + e.getMessage());
+            }
+        }
+
+        public static final int inherited = COMPOUND;
+
+        public static final ROStringArray enums = PrecedenceCommon.enums;
+        public static final ROStringArray enumValues
+                                            = PrecedenceCommon.enumValues;
+    }
+
+    public static class SpaceBefore extends Properties {
+        public static final int dataTypes = LENGTH | INHERIT;
+        public static final int traitMapping = FORMATTING;
+        public static final int initialValueType = NOTYPE_IT;
+        public static final int inherited = NO;
+    }
+
+    public static class SpaceBeforeMinimum extends Properties {
+        public static final int dataTypes = LENGTH;
+        public static final int traitMapping = FORMATTING;
+        public static final int initialValueType = LENGTH_IT;
+        protected static Numeric initialValue;
+        public static void setInitialValue(FOTree foTree) {
+            try {
+                initialValue = Length.makeLength
+                            (PropNames.SPACE_BEFORE_MINIMUM, 0.0d, Length.PT);
+            } catch (PropertyException e) {
+                throw new RuntimeException
+                                    ("PropertyException: " + e.getMessage());
+            }
+        }
+        public static final int inherited = COMPOUND;
+    }
+
+    public static class SpaceBeforeOptimum extends Properties {
+        public static final int dataTypes = LENGTH;
+        public static final int traitMapping = FORMATTING;
+        public static final int initialValueType = LENGTH_IT;
+        protected static Numeric initialValue;
+        public static void setInitialValue(FOTree foTree) {
+            try {
+                initialValue = Length.makeLength
+                            (PropNames.SPACE_BEFORE_OPTIMUM, 0.0d, Length.PT);
+            } catch (PropertyException e) {
+                throw new RuntimeException
+                                    ("PropertyException: " + e.getMessage());
+            }
+        }
+        public static final int inherited = COMPOUND;
+    }
+
+    public static class SpaceBeforeMaximum extends Properties {
+        public static final int dataTypes = LENGTH;
+        public static final int traitMapping = FORMATTING;
+        public static final int initialValueType = LENGTH_IT;
+        protected static Numeric initialValue;
+        public static void setInitialValue(FOTree foTree) {
+            try {
+                initialValue = Length.makeLength
+                            (PropNames.SPACE_BEFORE_MAXIMUM, 0.0d, Length.PT);
+            } catch (PropertyException e) {
+                throw new RuntimeException
+                                    ("PropertyException: " + e.getMessage());
+            }
+        }
+        public static final int inherited = COMPOUND;
+    }
+
+    public static class SpaceBeforeConditionality extends Properties {
+        public static final int dataTypes = ENUM;
+        public static final int traitMapping = FORMATTING;
+        public static final int initialValueType = ENUM_IT;
+        protected static EnumType initialValue;
+        public static void setInitialValue(FOTree foTree) {
+            try {
+                initialValue = new EnumType
+                        (PropNames.SPACE_BEFORE_CONDITIONALITY,
+                                                Conditionality.DISCARD);
+            } catch (PropertyException e) {
+                throw new RuntimeException
+                                    ("PropertyException: " + e.getMessage());
+            }
+        }
+        public static final int inherited = COMPOUND;
+
+        public static final ROStringArray enums = Conditionality.enums;
+        public static final ROStringArray enumValues
+                                            = Conditionality.enumValues;
+    }
+
+    public static class SpaceBeforePrecedence extends Properties {
+        public static final int dataTypes = INTEGER | ENUM;
+        public static final int traitMapping = FORMATTING;
+        public static final int initialValueType = INTEGER_IT;
+        protected static Numeric initialValue;
+        public static void setInitialValue(FOTree foTree) {
+            try {
+                initialValue = IntegerType.makeInteger
+                                        (PropNames.SPACE_BEFORE_PRECEDENCE, 0);
+            } catch(PropertyException e) {
+                throw new RuntimeException
+                                    ("PropertyException: " + e.getMessage());
+            }
+        }
+
+        public static final int inherited = COMPOUND;
+
+        public static final ROStringArray enums = PrecedenceCommon.enums;
+        public static final ROStringArray enumValues
+                                            = PrecedenceCommon.enumValues;
+    }
+
+    public static class SpaceEnd extends Properties {
+        public static final int dataTypes = LENGTH | PERCENTAGE | INHERIT;
+        public static final int traitMapping = FORMATTING;
+        public static final int initialValueType = NOTYPE_IT;
+        public static final int inherited = NO;
+    }
+
+    public static class SpaceEndMinimum extends Properties {
+        public static final int dataTypes = LENGTH | PERCENTAGE;
+        public static final int traitMapping = FORMATTING;
+        public static final int initialValueType = LENGTH_IT;
+        protected static Numeric initialValue;
+        public static void setInitialValue(FOTree foTree) {
+            try {
+                initialValue = Length.makeLength
+                            (PropNames.SPACE_END_MINIMUM, 0.0d, Length.PT);
+            } catch (PropertyException e) {
+                throw new RuntimeException
+                                    ("PropertyException: " + e.getMessage());
+            }
+        }
+        public static final int inherited = COMPOUND;
+    }
+
+    public static class SpaceEndOptimum extends Properties {
+        public static final int dataTypes = LENGTH | PERCENTAGE;
+        public static final int traitMapping = FORMATTING;
+        public static final int initialValueType = LENGTH_IT;
+        protected static Numeric initialValue;
+        public static void setInitialValue(FOTree foTree) {
+            try {
+                initialValue = Length.makeLength
+                            (PropNames.SPACE_END_OPTIMUM, 0.0d, Length.PT);
+            } catch (PropertyException e) {
+                throw new RuntimeException
+                                    ("PropertyException: " + e.getMessage());
+            }
+        }
+        public static final int inherited = COMPOUND;
+    }
+
+    public static class SpaceEndMaximum extends Properties {
+        public static final int dataTypes = LENGTH | PERCENTAGE;
+        public static final int traitMapping = FORMATTING;
+        public static final int initialValueType = LENGTH_IT;
+        protected static Numeric initialValue;
+        public static void setInitialValue(FOTree foTree) {
+            try {
+                initialValue = Length.makeLength
+                            (PropNames.SPACE_END_MAXIMUM, 0.0d, Length.PT);
+            } catch (PropertyException e) {
+                throw new RuntimeException
+                                    ("PropertyException: " + e.getMessage());
+            }
+        }
+        public static final int inherited = COMPOUND;
+    }
+
+    public static class SpaceEndConditionality extends Properties {
+        public static final int dataTypes = ENUM;
+        public static final int traitMapping = FORMATTING;
+        public static final int initialValueType = ENUM_IT;
+        protected static EnumType initialValue;
+        public static void setInitialValue(FOTree foTree) {
+            try {
+                initialValue = new EnumType
+                        (PropNames.SPACE_END_CONDITIONALITY,
+                                                Conditionality.DISCARD);
+            } catch (PropertyException e) {
+                throw new RuntimeException
+                                    ("PropertyException: " + e.getMessage());
+            }
+        }
+        public static final int inherited = COMPOUND;
+
+        public static final ROStringArray enums = Conditionality.enums;
+        public static final ROStringArray enumValues
+                                            = Conditionality.enumValues;
+    }
+
+    public static class SpaceEndPrecedence extends Properties {
+        public static final int dataTypes = INTEGER | ENUM;
+        public static final int traitMapping = FORMATTING;
+        public static final int initialValueType = INTEGER_IT;
+        protected static Numeric initialValue;
+        public static void setInitialValue(FOTree foTree) {
+            try {
+                initialValue = IntegerType.makeInteger
+                                        (PropNames.SPACE_END_PRECEDENCE, 0);
+            } catch(PropertyException e) {
+                throw new RuntimeException
+                                    ("PropertyException: " + e.getMessage());
+            }
+        }
+
+        public static final int inherited = COMPOUND;
+
+        public static final ROStringArray enums = PrecedenceCommon.enums;
+        public static final ROStringArray enumValues
+                                            = PrecedenceCommon.enumValues;
+    }
+
+    public static class SpaceStart extends Properties {
+        public static final int dataTypes = LENGTH | PERCENTAGE | INHERIT;
+        public static final int traitMapping = FORMATTING;
+        public static final int initialValueType = NOTYPE_IT;
+        public static final int inherited = NO;
+    }
+
+    public static class SpaceStartMinimum extends Properties {
+        public static final int dataTypes = LENGTH | PERCENTAGE;
+        public static final int traitMapping = FORMATTING;
+        public static final int initialValueType = LENGTH_IT;
+        protected static Numeric initialValue;
+        public static void setInitialValue(FOTree foTree) {
+            try {
+                initialValue = Length.makeLength
+                            (PropNames.SPACE_START_MINIMUM, 0.0d, Length.PT);
+            } catch (PropertyException e) {
+                throw new RuntimeException
+                                    ("PropertyException: " + e.getMessage());
+            }
+        }
+        public static final int inherited = COMPOUND;
+    }
+
+    public static class SpaceStartOptimum extends Properties {
+        public static final int dataTypes = LENGTH | PERCENTAGE;
+        public static final int traitMapping = FORMATTING;
+        public static final int initialValueType = LENGTH_IT;
+        protected static Numeric initialValue;
+        public static void setInitialValue(FOTree foTree) {
+            try {
+                initialValue = Length.makeLength
+                            (PropNames.SPACE_START_OPTIMUM, 0.0d, Length.PT);
+            } catch (PropertyException e) {
+                throw new RuntimeException
+                                    ("PropertyException: " + e.getMessage());
+            }
+        }
+        public static final int inherited = COMPOUND;
+    }
+
+    public static class SpaceStartMaximum extends Properties {
+        public static final int dataTypes = LENGTH | PERCENTAGE;
+        public static final int traitMapping = FORMATTING;
+        public static final int initialValueType = LENGTH_IT;
+        protected static Numeric initialValue;
+        public static void setInitialValue(FOTree foTree) {
+            try {
+                initialValue = Length.makeLength
+                            (PropNames.SPACE_START_MAXIMUM, 0.0d, Length.PT);
+            } catch (PropertyException e) {
+                throw new RuntimeException
+                                    ("PropertyException: " + e.getMessage());
+            }
+        }
+        public static final int inherited = COMPOUND;
+    }
+
+    public static class SpaceStartConditionality extends Properties {
+        public static final int dataTypes = ENUM;
+        public static final int traitMapping = FORMATTING;
+        public static final int initialValueType = ENUM_IT;
+        protected static EnumType initialValue;
+        public static void setInitialValue(FOTree foTree) {
+            try {
+                initialValue = new EnumType
+                        (PropNames.SPACE_START_CONDITIONALITY,
+                                                Conditionality.DISCARD);
+            } catch (PropertyException e) {
+                throw new RuntimeException
+                                    ("PropertyException: " + e.getMessage());
+            }
+        }
+        public static final int inherited = COMPOUND;
+
+        public static final ROStringArray enums = Conditionality.enums;
+        public static final ROStringArray enumValues
+                                            = Conditionality.enumValues;
+    }
+
+    public static class SpaceStartPrecedence extends Properties {
+        public static final int dataTypes = INTEGER | ENUM;
+        public static final int traitMapping = FORMATTING;
+        public static final int initialValueType = INTEGER_IT;
+        protected static Numeric initialValue;
+        public static void setInitialValue(FOTree foTree) {
+            try {
+                initialValue = IntegerType.makeInteger
+                                        (PropNames.SPACE_START_PRECEDENCE, 0);
+            } catch(PropertyException e) {
+                throw new RuntimeException
+                                    ("PropertyException: " + e.getMessage());
+            }
+        }
+
+        public static final int inherited = COMPOUND;
+
+        public static final ROStringArray enums = PrecedenceCommon.enums;
+        public static final ROStringArray enumValues
+                                            = PrecedenceCommon.enumValues;
+    }
+
+    public static class Span extends Properties {
+        public static final int dataTypes = ENUM | NONE | INHERIT;
+        public static final int traitMapping = FORMATTING;
+        public static final int initialValueType = NONE_IT;
+        public static final int ALL = 1;
+        public static final int inherited = NO;
+
+        private static final String[] rwEnums = {
+            null
+            ,"all"
+        };
+        public static final ROStringArray enums = new ROStringArray(rwEnums);
+
+        public static final ROStringArray enumValues = enums;
+    }
+
+    public static class Speak extends Properties {
+        public static final int dataTypes = AURAL;
+        public static final int traitMapping = RENDERING;
+        public static final int initialValueType = AURAL_IT;
+        public static final int inherited = COMPUTED;
+    }
+
+    public static class SpeakHeader extends Properties {
+        public static final int dataTypes = AURAL;
+        public static final int traitMapping = RENDERING;
+        public static final int initialValueType = AURAL_IT;
+        public static final int inherited = COMPUTED;
+    }
+
+    public static class SpeakNumeral extends Properties {
+        public static final int dataTypes = AURAL;
+        public static final int traitMapping = RENDERING;
+        public static final int initialValueType = AURAL_IT;
+        public static final int inherited = COMPUTED;
+    }
+
+    public static class SpeakPunctuation extends Properties {
+        public static final int dataTypes = AURAL;
+        public static final int traitMapping = RENDERING;
+        public static final int initialValueType = AURAL_IT;
+        public static final int inherited = COMPUTED;
+    }
+
+    public static class SpeechRate extends Properties {
+        public static final int dataTypes = AURAL;
+        public static final int traitMapping = RENDERING;
+        public static final int initialValueType = AURAL_IT;
+        public static final int inherited = COMPUTED;
+    }
+
+    public static class Src extends Properties {
+        public static final int dataTypes = URI_SPECIFICATION | INHERIT;
+        public static final int traitMapping = REFERENCE;
+        public static final int initialValueType = NOTYPE_IT;
+        public static final int inherited = NO;
+    }
+
+    public static class StartIndent extends Properties {
+        public static final int dataTypes = LENGTH | INHERIT;
+        public static final int traitMapping = FORMATTING;
+        public static final int initialValueType = LENGTH_IT;
+        protected static Numeric initialValue;
+        public static void setInitialValue(FOTree foTree) {
+            try {
+                initialValue = Length.makeLength
+                                    (PropNames.START_INDENT, 0.0d, Length.PT);
+            } catch (PropertyException e) {
+                throw new RuntimeException
+                                    ("PropertyException: " + e.getMessage());
+            }
+        }
+        public static final int inherited = COMPUTED;
+    }
+
+    public static class StartingState extends Properties {
+        public static final int dataTypes = ENUM;
+        public static final int traitMapping = ACTION;
+        public static final int initialValueType = ENUM_IT;
+        public static final int SHOW = 1;
+        public static final int HIDE = 2;
+        protected static EnumType initialValue;
+        public static void setInitialValue(FOTree foTree) {
+            try {
+                initialValue = new EnumType
+                                    (PropNames.STARTING_STATE, SHOW);
+            } catch (PropertyException e) {
+                throw new RuntimeException
+                                    ("PropertyException: " + e.getMessage());
+            }
+        }
+        public static final int inherited = NO;
+
+        private static final String[] rwEnums = {
+            null
+            ,"show"
+            ,"hide"
+        };
+        public static final ROStringArray enums = new ROStringArray(rwEnums);
+
+        public static final ROStringArray enumValues = enums;
+    }
+
+    public static class StartsRow extends Properties {
+        public static final int dataTypes = BOOL;
+        public static final int traitMapping = FORMATTING;
+        public static final int initialValueType = BOOL_IT;
+        protected static Bool initialValue;
+        public static void setInitialValue(FOTree foTree) {
+            try {
+                initialValue = new Bool(PropNames.STARTS_ROW, false);
+            } catch (PropertyException e) {
+                throw new RuntimeException
+                                    ("PropertyException: " + e.getMessage());
+            }
+        }
+        public static final int inherited = NO;
+    }
+
+    public static class Stress extends Properties {
+        public static final int dataTypes = AURAL;
+        public static final int traitMapping = RENDERING;
+        public static final int initialValueType = AURAL_IT;
+        public static final int inherited = COMPUTED;
+    }
+
+    public static class SuppressAtLineBreak extends Properties {
+        public static final int dataTypes = AUTO | ENUM | INHERIT;
+        public static final int traitMapping = FORMATTING;
+        public static final int initialValueType = AUTO_IT;
+        public static final int SUPPRESS = 1;
+        public static final int RETAIN = 2;
+        public static final int inherited = NO;
+
+        private static final String[] rwEnums = {
+            null
+            ,"suppress"
+            ,"retain"
+        };
+        public static final ROStringArray enums = new ROStringArray(rwEnums);
+
+        public static final ROStringArray enumValues = enums;
+    }
+
+    public static class SwitchTo extends Properties {
+        public static final int dataTypes = COMPLEX;
+        public static final int traitMapping = ACTION;
+        public static final int initialValueType = ENUM_IT;
+        public static final int XSL_PRECEDING = 1;
+        public static final int XSL_FOLLOWING = 2;
+        public static final int XSL_ANY = 3;
+        protected static EnumType initialValue;
+        public static void setInitialValue(FOTree foTree) {
+            try {
+                initialValue = new EnumType
+                                        (PropNames.SWITCH_TO, XSL_ANY);
+            } catch (PropertyException e) {
+                throw new RuntimeException
+                                    ("PropertyException: " + e.getMessage());
+            }
+        }
+        public static final int inherited = NO;
+
+        private static final String[] rwEnums = {
+            null
+            ,"xsl-preceding"
+            ,"xsl-following"
+            ,"xsl-any"
+        };
+        public static final ROStringArray enums = new ROStringArray(rwEnums);
+
+        public static final ROStringArray enumValues = enums;
+
+        public static PropertyValue complex
+            (int property, PropertyValue list) throws PropertyException
+        {
+            // Assume that the enumeration has been checked for.  Look for
+            // a list of NCNames.
+            // N.B. it may be a possible to perform further checks on the
+            // validity of the NCNames - do they match multi-case case names.
+            Iterator iter = ((PropertyValueList)list).iterator();
+            while (iter.hasNext()) {
+                Object value = iter.next();
+                if ( ! (value instanceof NCName))
+                    throw new PropertyException
+                        ("switch-to requires a list of NCNames");
+            }
+            return list;
+        }
+    }
+
+    public static class TableLayout extends Properties {
+        public static final int dataTypes = AUTO | ENUM | INHERIT;
+        public static final int traitMapping = FORMATTING;
+        public static final int initialValueType = AUTO_IT;
+        public static final int FIXED = 1;
+        public static final int inherited = NO;
+
+        private static final String[] rwEnums = {
+            null
+            ,"fixed"
+        };
+        public static final ROStringArray enums = new ROStringArray(rwEnums);
+
+        public static final ROStringArray enumValues = enums;
+    }
+
+    public static class TableOmitFooterAtBreak extends Properties {
+        public static final int dataTypes = BOOL;
+        public static final int traitMapping = FORMATTING;
+        public static final int initialValueType = BOOL_IT;
+        protected static Bool initialValue;
+        public static void setInitialValue(FOTree foTree) {
+            try {
+                initialValue = new Bool
+                                (PropNames.TABLE_OMIT_FOOTER_AT_BREAK, false);
+            } catch (PropertyException e) {
+                throw new RuntimeException
+                                    ("PropertyException: " + e.getMessage());
+            }
+        }
+        public static final int inherited = NO;
+    }
+
+    public static class TableOmitHeaderAtBreak extends Properties {
+        public static final int dataTypes = BOOL;
+        public static final int traitMapping = FORMATTING;
+        public static final int initialValueType = BOOL_IT;
+        protected static Bool initialValue;
+        public static void setInitialValue(FOTree foTree) {
+            try {
+                initialValue = new Bool
+                                (PropNames.TABLE_OMIT_HEADER_AT_BREAK, false);
+            } catch (PropertyException e) {
+                throw new RuntimeException
+                                    ("PropertyException: " + e.getMessage());
+            }
+        }
+        public static final int inherited = NO;
+    }
+
+    public static class TargetPresentationContext extends Properties {
+        public static final int dataTypes = URI_SPECIFICATION | ENUM;
+        public static final int traitMapping = ACTION;
+        public static final int initialValueType = ENUM_IT;
+        public static final int USE_TARGET_PROCESSING_CONTEXT = 1;
+        protected static EnumType initialValue;
+        public static void setInitialValue(FOTree foTree) {
+            try {
+                initialValue = new EnumType
+                        (PropNames.TARGET_PRESENTATION_CONTEXT,
+                                        USE_TARGET_PROCESSING_CONTEXT);
+            } catch (PropertyException e) {
+                throw new RuntimeException
+                                    ("PropertyException: " + e.getMessage());
+            }
+        }
+        public static final int inherited = NO;
+
+        private static final String[] rwEnums = {
+            null
+            ,"use-target-processing-context"
+        };
+        public static final ROStringArray enums = new ROStringArray(rwEnums);
+
+        public static final ROStringArray enumValues = enums;
+    }
+
+    public static class TargetProcessingContext extends Properties {
+        public static final int dataTypes = URI_SPECIFICATION | ENUM;
+        public static final int traitMapping = ACTION;
+        public static final int initialValueType = ENUM_IT;
+        public static final int DOCUMENT_ROOT = 1;
+        protected static EnumType initialValue;
+        public static void setInitialValue(FOTree foTree) {
+            try {
+                initialValue = new EnumType
+                        (PropNames.TARGET_PROCESSING_CONTEXT,
+                                                        DOCUMENT_ROOT);
+            } catch (PropertyException e) {
+                throw new RuntimeException
+                                    ("PropertyException: " + e.getMessage());
+            }
+        }
+        public static final int inherited = NO;
+
+        private static final String[] rwEnums = {
+            null
+            ,"document-root"
+        };
+        public static final ROStringArray enums = new ROStringArray(rwEnums);
+
+        public static final ROStringArray enumValues = enums;
+    }
+
+    public static class TargetStylesheet extends Properties {
+        public static final int dataTypes = URI_SPECIFICATION | ENUM;
+        public static final int traitMapping = ACTION;
+        public static final int initialValueType = ENUM_IT;
+        public static final int USE_NORMAL_STYLESHEET = 1;
+        protected static EnumType initialValue;
+        public static void setInitialValue(FOTree foTree) {
+            try {
+                initialValue = new EnumType
+                            (PropNames.TARGET_STYLESHEET,
+                                                USE_NORMAL_STYLESHEET);
+            } catch (PropertyException e) {
+                throw new RuntimeException
+                                    ("PropertyException: " + e.getMessage());
+            }
+        }
+        public static final int inherited = NO;
+
+        private static final String[] rwEnums = {
+            null
+            ,"use-normal-stylesheet"
+        };
+        public static final ROStringArray enums = new ROStringArray(rwEnums);
+
+        public static final ROStringArray enumValues = enums;
+    }
+
+    public static class TextAlign extends Properties {
+        public static final int dataTypes = STRING | ENUM | INHERIT;
+        public static final int traitMapping = VALUE_CHANGE;
+        public static final int initialValueType = ENUM_IT;
+        public static final int START = 1;
+        public static final int CENTER = 2;
+        public static final int END = 3;
+        public static final int JUSTIFY = 4;
+        public static final int INSIDE = 5;
+        public static final int OUTSIDE = 6;
+        public static final int LEFT = 7;
+        public static final int RIGHT = 8;
+
+        protected static EnumType initialValue;
+        public static void setInitialValue(FOTree foTree) {
+            try {
+                initialValue = new EnumType(PropNames.TEXT_ALIGN, START);
+            } catch (PropertyException e) {
+                throw new RuntimeException
+                                    ("PropertyException: " + e.getMessage());
+            }
+        }
+
+        public static final int inherited = COMPUTED;
+
+        private static final String[] rwEnums = {
+            null
+            ,"start"
+            ,"center"
+            ,"end"
+            ,"justify"
+            ,"inside"
+            ,"outside"
+            ,"left"
+            ,"right"
+        };
+        public static final ROStringArray enums = new ROStringArray(rwEnums);
+
+        private static final HashMap rwEnumValues;
+        public static final Map enumValues;
+        static {
+            rwEnumValues = new HashMap(rwEnums.length);
+            for (int i = 1; i < rwEnums.length; i++ ) {
+                rwEnumValues.put((Object)rwEnums[i],
+                                    (Object) Ints.consts.get(i));
+            }
+            enumValues =
+                Collections.unmodifiableMap((Map)rwEnumValues);
+        }
+    }
+
+    public static class TextAlignLast extends Properties {
+        public static final int dataTypes = ENUM | INHERIT;
+        public static final int traitMapping = VALUE_CHANGE;
+        public static final int initialValueType = ENUM_IT;
+        public static final int RELATIVE = 1;
+        public static final int START = 2;
+        public static final int CENTER = 3;
+        public static final int END = 4;
+        public static final int JUSTIFY = 5;
+        public static final int INSIDE = 6;
+        public static final int OUTSIDE = 7;
+        public static final int LEFT = 8;
+        public static final int RIGHT = 9;
+
+        protected static EnumType initialValue;
+        public static void setInitialValue(FOTree foTree) {
+            try {
+                initialValue = new EnumType
+                                (PropNames.TEXT_ALIGN_LAST, RELATIVE);
+            } catch (PropertyException e) {
+                throw new RuntimeException
+                                    ("PropertyException: " + e.getMessage());
+            }
+        }
+
+        public static final int inherited = COMPUTED;
+
+        private static final String[] rwEnums = {
+            null
+            ,"relative"
+            ,"start"
+            ,"center"
+            ,"end"
+            ,"justify"
+            ,"inside"
+            ,"outside"
+            ,"left"
+            ,"right"
+        };
+        public static final ROStringArray enums = new ROStringArray(rwEnums);
+
+        private static final HashMap rwEnumValues;
+        public static final Map enumValues;
+        static {
+            rwEnumValues = new HashMap(rwEnums.length);
+            for (int i = 1; i < rwEnums.length; i++ ) {
+                rwEnumValues.put((Object)rwEnums[i],
+                                    (Object) Ints.consts.get(i));
+            }
+            enumValues =
+                Collections.unmodifiableMap((Map)rwEnumValues);
+        }
+    }
+
+    public static class TextAltitude extends Properties {
+        public static final int dataTypes = LENGTH | ENUM | INHERIT;
+        public static final int traitMapping = FORMATTING;
+        public static final int initialValueType = ENUM_IT;
+        public static final int USE_FONT_METRICS = 1;
+        protected static EnumType initialValue;
+        public static void setInitialValue(FOTree foTree) {
+            try {
+                initialValue = new EnumType
+                            (PropNames.TEXT_ALTITUDE, USE_FONT_METRICS);
+            } catch (PropertyException e) {
+                throw new RuntimeException
+                                    ("PropertyException: " + e.getMessage());
+            }
+        }
+        public static final int inherited = NO;
+
+        private static final String[] rwEnums = {
+            null
+            ,"use-font-metrics"
+        };
+        public static final ROStringArray enums = new ROStringArray(rwEnums);
+
+        public static final ROStringArray enumValues = enums;
+    }
+
+    public static class TextDecoration extends Properties {
+        public static final int dataTypes = COMPLEX | NONE | INHERIT;
+        public static final int traitMapping = NEW_TRAIT;
+        public static final int initialValueType = TEXT_DECORATION_IT;
+        protected static TextDecorations initialValue;
+        public static void setInitialValue(FOTree foTree) {
+            try {
+                initialValue = new TextDecorations
+                            (PropNames.TEXT_DECORATION, NO_DECORATION);
+            } catch (PropertyException e) {
+                throw new RuntimeException
+                                    ("PropertyException: " + e.getMessage());
+            }
+        }
+        public static final int inherited = NO;
+
+        /**
+         * Text decoration constant
+         */
+        public static final byte
+          NO_DECORATION = 0
+             ,UNDERLINE = 1
+              ,OVERLINE = 2
+          ,LINE_THROUGH = 4
+                 ,BLINK = 8
+                        ;
+
+        public static final ROStringArray alternatives =
+            new ROStringArray(new String[] {
+                                    null
+                                    ,"underline"
+                                    ,"overline"
+                                    ,"line-through"
+                                    ,"blink"
+                                });
+
+        public static final ROIntArray decorations =
+            new ROIntArray(new int[] {
+                                    NO_DECORATION
+                                    ,UNDERLINE
+                                    ,OVERLINE
+                                    ,LINE_THROUGH
+                                    ,BLINK
+                            });
+
+        public static PropertyValue complex
+            (int property, PropertyValue list) throws PropertyException
+        {
+            byte onMask = NO_DECORATION;
+            byte offMask = NO_DECORATION;
+            Iterator iter;
+            LinkedList strings = new LinkedList();
+            if ( ! (list instanceof PropertyValueList)) {
+                if ( ! (list instanceof NCName))
+                    throw new PropertyException
+                        ("text-decoration require list of NCNames");
+                strings.add(((NCName)list).getNCName());
+            } else { // list is a PropertyValueList
+                iter = ((PropertyValueList)list).iterator();
+                while (iter.hasNext()) {
+                    Object value = iter.next();
+                    if ( ! (value instanceof NCName))
+                        throw new PropertyException
+                            ("text-decoration requires a list of NCNames");
+                    strings.add(((NCName)value).getNCName());
+                }
+            }
+            iter = strings.iterator();
+            while (iter.hasNext()) {
+                int i;
+                String str, str2;
+                boolean negate;
+                negate = false;
+                str = (String)iter.next();
+                str2 = str;
+                if (str.indexOf("no-") == 0) {
+                    str2 = str.substring(3);
+                    negate = true;
+                }
+                try {
+                    i = PropertyConsts.enumValueToIndex(str2, alternatives);
+                } catch (PropertyException e) {
+                    throw new PropertyException
+                                    ("text-decoration: unknown value " + str);
+                }
+                if (negate) offMask |= (byte)decorations.get(i);
+                else         onMask |= (byte)decorations.get(i);
+            }
+            if ((offMask & onMask) != 0)
+                throw new PropertyException
+                    ("Contradictory instructions for text-decoration " +
+                        list.toString());
+            return new TextDecorator(property, onMask, offMask);
+        }
+    }
+
+    public static class TextDepth extends Properties {
+        public static final int dataTypes = LENGTH | ENUM | INHERIT;
+        public static final int traitMapping = FORMATTING;
+        public static final int initialValueType = ENUM_IT;
+        public static final int USE_FONT_METRICS = 1;
+        protected static EnumType initialValue;
+        public static void setInitialValue(FOTree foTree) {
+            try {
+                initialValue = new EnumType
+                            (PropNames.TEXT_DEPTH, USE_FONT_METRICS);
+            } catch (PropertyException e) {
+                throw new RuntimeException
+                                    ("PropertyException: " + e.getMessage());
+            }
+        }
+        public static final int inherited = NO;
+
+        private static final String[] rwEnums = {
+            null
+            ,"use-font-metrics"
+        };
+        public static final ROStringArray enums = new ROStringArray(rwEnums);
+
+        public static final ROStringArray enumValues = enums;
+    }
+
+    public static class TextIndent extends Properties {
+        public static final int dataTypes = PERCENTAGE | LENGTH | INHERIT;
+        public static final int traitMapping = FORMATTING;
+        public static final int initialValueType = LENGTH_IT;
+        protected static Numeric initialValue;
+        public static void setInitialValue(FOTree foTree) {
+            try {
+                initialValue = Length.makeLength
+                                    (PropNames.TEXT_INDENT, 0.0d, Length.PT);
+            } catch (PropertyException e) {
+                throw new RuntimeException
+                                    ("PropertyException: " + e.getMessage());
+            }
+        }
+        public static final int inherited = COMPUTED;
+    }
+
+    public static class TextShadow extends Properties {
+        public static final int dataTypes = COMPLEX | NONE | INHERIT;
+        public static final int traitMapping = RENDERING;
+        public static final int initialValueType = NONE_IT;
+        public static final int inherited = NO;
+
+        public static final ROStringArray enums = ColorCommon.enums;
+        public static final Map enumValues = ColorCommon.colorTransEnums;
+
+        /**
+         * 'list' is a PropertyValueList containing, at the top level,
+         * a sequence of PropertyValueLists, each representing a single
+         * shadow effect.  A shadow effect must contain, at a minimum, an
+         * inline-progression offset and a block-progression offset.  It may
+         * also optionally contain a blur radius.  This set of two or three
+         * <tt>Length</tt>s may be preceded or followed by a color
+         * specifier.
+         */
+        public static PropertyValue complex
+            (int property, PropertyValue list) throws PropertyException
+        {
+            if ( ! (list instanceof PropertyValueList) ||
+                    ((PropertyValueList)list).size() == 0)
+                throw new PropertyException
+                    ("text-shadow requires PropertyValueList of effects");
+            PropertyValueList newlist =
+                    new PropertyValueList(property);
+            Iterator effects = ((PropertyValueList)list).iterator();
+            while (effects.hasNext()) {
+                newlist.add(new ShadowEffect(property,
+                            (PropertyValueList)(effects.next())));
+            }
+            return newlist;
+        }
+    }
+
+    public static class TextTransform extends Properties {
+        public static final int dataTypes = ENUM | NONE | INHERIT;
+        public static final int traitMapping = REFINE;
+        public static final int initialValueType = NONE_IT;
+        public static final int CAPITALIZE = 1;
+        public static final int UPPERCASE = 2;
+        public static final int LOWERCASE = 3;
+        public static final int inherited = COMPUTED;
+
+        private static final String[] rwEnums = {
+            null
+            ,"capitalize"
+            ,"uppercase"
+            ,"lowercase"
+        };
+        public static final ROStringArray enums = new ROStringArray(rwEnums);
+
+        public static final ROStringArray enumValues = enums;
+    }
+
+    public static class Top extends Properties {
+        public static final int dataTypes =
+                                        PERCENTAGE | LENGTH | AUTO | INHERIT;
+        public static final int traitMapping = FORMATTING;
+        public static final int initialValueType = AUTO_IT;
+        public static final int inherited = NO;
+    }
+
+    public static class TreatAsWordSpace extends Properties {
+        public static final int dataTypes = BOOL | AUTO | INHERIT;
+        public static final int traitMapping = FORMATTING;
+        public static final int initialValueType = AUTO_IT;
+        public static final int inherited = NO;
+    }
+
+    public static class UnicodeBidi extends Properties {
+        public static final int dataTypes = ENUM | INHERIT;
+        public static final int traitMapping = FORMATTING;
+        public static final int initialValueType = ENUM_IT;
+        public static final int NORMAL = 1;
+        public static final int EMBED = 2;
+        public static final int BIDI_OVERRIDE = 3;
+        protected static EnumType initialValue;
+        public static void setInitialValue(FOTree foTree) {
+            try {
+                initialValue = new EnumType
+                                    (PropNames.UNICODE_BIDI, NORMAL);
+            } catch (PropertyException e) {
+                throw new RuntimeException
+                                   ("PropertyException: " + e.getMessage());
+            }
+        }
+        public static final int inherited = NO;
+
+        private static final String[] rwEnums = {
+            null
+            ,"normal"
+            ,"embed"
+            ,"bidi-override"
+        };
+        public static final ROStringArray enums = new ROStringArray(rwEnums);
+
+        public static final ROStringArray enumValues = enums;
+    }
+
+    public static class VerticalAlign extends Properties {
+        public static final int dataTypes =
+                            SHORTHAND | PERCENTAGE | LENGTH | ENUM | INHERIT;
+        public static final int traitMapping = SHORTHAND_MAP;
+        public static final int initialValueType = ENUM_IT;
+        public static final int BASELINE = 1;
+        public static final int MIDDLE = 2;
+        public static final int SUB = 3;
+        public static final int SUPER = 4;
+        public static final int TEXT_TOP = 5;
+        public static final int TEXT_BOTTOM = 6;
+        public static final int TOP = 7;
+        public static final int BOTTOM = 8;
+        protected static EnumType initialValue;
+        public static void setInitialValue(FOTree foTree) {
+            try {
+                initialValue = new EnumType
+                                (PropNames.VERTICAL_ALIGN, BASELINE);
+            } catch (PropertyException e) {
+                throw new RuntimeException
+                                    ("PropertyException: " + e.getMessage());
+            }
+        }
+        public static final int inherited = NO;
+
+        private static final String[] rwEnums = {
+            null
+            ,"baseline"
+            ,"middle"
+            ,"sub"
+            ,"super"
+            ,"text-top"
+            ,"text-bottom"
+            ,"top"
+            ,"bottom"
+        };
+        public static final ROStringArray enums = new ROStringArray(rwEnums);
+
+        private static final HashMap rwEnumValues;
+        public static final Map enumValues;
+        static {
+            rwEnumValues = new HashMap(rwEnums.length);
+            for (int i = 1; i < rwEnums.length; i++ ) {
+                rwEnumValues.put((Object)rwEnums[i],
+                                    (Object) Ints.consts.get(i));
+            }
+            enumValues =
+                Collections.unmodifiableMap((Map)rwEnumValues);
+        }
+    }
+
+    public static class Visibility extends Properties {
+        public static final int dataTypes = ENUM | INHERIT;
+        public static final int traitMapping = MAGIC;
+        public static final int initialValueType = ENUM_IT;
+        public static final int VISIBLE = 1;
+        public static final int HIDDEN = 2;
+        public static final int COLLAPSE = 3;
+        protected static EnumType initialValue;
+        public static void setInitialValue(FOTree foTree) {
+            try {
+                initialValue = new EnumType
+                                        (PropNames.VISIBILITY, VISIBLE);
+            } catch (PropertyException e) {
+                throw new RuntimeException
+                                    ("PropertyException: " + e.getMessage());
+            }
+        }
+        public static final int inherited = COMPUTED;
+
+        private static final String[] rwEnums = {
+            null
+            ,"visible"
+            ,"hidden"
+            ,"collapse"
+        };
+        public static final ROStringArray enums = new ROStringArray(rwEnums);
+
+        public static final ROStringArray enumValues = enums;
+    }
+
+    public static class VoiceFamily extends Properties {
+        public static final int dataTypes = AURAL;
+        public static final int traitMapping = RENDERING;
+        public static final int initialValueType = AURAL_IT;
+        public static final int inherited = COMPUTED;
+    }
+
+    public static class Volume extends Properties {
+        public static final int dataTypes = AURAL;
+        public static final int traitMapping = RENDERING;
+        public static final int initialValueType = AURAL_IT;
+        public static final int inherited = COMPUTED;
+    }
+
+    public static class WhiteSpace extends Properties {
+        public static final int dataTypes = SHORTHAND | ENUM | INHERIT;
+        public static final int traitMapping = SHORTHAND_MAP;
+        public static final int initialValueType = ENUM_IT;
+        public static final int NORMAL = 1;
+        public static final int PRE = 2;
+        public static final int NOWRAP = 3;
+        protected static EnumType initialValue;
+        public static void setInitialValue(FOTree foTree) {
+            try {
+                initialValue = new EnumType
+                                        (PropNames.WHITE_SPACE, NORMAL);
+            } catch (PropertyException e) {
+                throw new RuntimeException
+                                    ("PropertyException: " + e.getMessage());
+            }
+        }
+        public static final int inherited = COMPUTED;
+
+        private static final String[] rwEnums = {
+            null
+            ,"normal"
+            ,"pre"
+            ,"nowrap"
+        };
+        public static final ROStringArray enums = new ROStringArray(rwEnums);
+
+        public static final ROStringArray enumValues = enums;
+    }
+
+    public static class WhiteSpaceCollapse extends Properties {
+        public static final int dataTypes = BOOL | INHERIT;
+        public static final int traitMapping = FORMATTING;
+        public static final int initialValueType = BOOL_IT;
+        protected static Bool initialValue;
+        public static void setInitialValue(FOTree foTree) {
+            try {
+                initialValue = new Bool(PropNames.WHITE_SPACE_COLLAPSE, true);
+            } catch (PropertyException e) {
+                throw new RuntimeException
+                                    ("PropertyException: " + e.getMessage());
+            }
+        }
+        public static final int inherited = COMPUTED;
+    }
+
+    public static class WhiteSpaceTreatment extends Properties {
+        public static final int dataTypes = ENUM | INHERIT;
+        public static final int traitMapping = FORMATTING;
+        public static final int initialValueType = ENUM_IT;
+        public static final int IGNORE = 1;
+        public static final int PRESERVE = 2;
+        public static final int IGNORE_IF_BEFORE_LINEFEED = 3;
+        public static final int IGNORE_IF_AFTER_LINEFEED = 4;
+        public static final int IGNORE_IF_SURROUNDING_LINEFEED = 5;
+        protected static EnumType initialValue;
+        public static void setInitialValue(FOTree foTree) {
+            try {
+                initialValue = new EnumType
+                            (PropNames.WHITE_SPACE_TREATMENT, PRESERVE);
+            } catch (PropertyException e) {
+                throw new RuntimeException
+                                    ("PropertyException: " + e.getMessage());
+            }
+        }
+        public static final int inherited = COMPUTED;
+
+        private static final String[] rwEnums = {
+            null
+            ,"ignore"
+            ,"preserve"
+            ,"ignore-if-before-linefeed"
+            ,"ignore-if-after-linefeed"
+            ,"ignore-if-surrounding-linefeed"
+        };
+        public static final ROStringArray enums = new ROStringArray(rwEnums);
+
+        private static final HashMap rwEnumValues;
+        public static final Map enumValues;
+        static {
+            rwEnumValues = new HashMap(rwEnums.length);
+            for (int i = 1; i < rwEnums.length; i++ ) {
+                rwEnumValues.put((Object)rwEnums[i],
+                                    (Object) Ints.consts.get(i));
+            }
+            enumValues =
+                Collections.unmodifiableMap((Map)rwEnumValues);
+        }
+    }
+
+    public static class Widows extends Properties {
+        public static final int dataTypes = INTEGER | INHERIT;
+        public static final int traitMapping = FORMATTING;
+        public static final int initialValueType = INTEGER_IT;
+        protected static Numeric initialValue;
+        public static void setInitialValue(FOTree foTree) {
+            try {
+                initialValue = IntegerType.makeInteger(PropNames.WIDOWS, 2);
+            } catch(PropertyException e) {
+                throw new RuntimeException
+                                    ("PropertyException: " + e.getMessage());
+            }
+        }
+
+        public static final int inherited = COMPUTED;
+    }
+
+    public static class Width extends Properties {
+        public static final int dataTypes =
+                                        PERCENTAGE | LENGTH | AUTO | INHERIT;
+        public static final int traitMapping = DISAPPEARS;
+        public static final int initialValueType = AUTO_IT;
+        public static final int inherited = NO;
+    }
+
+    public static class WordSpacing extends Properties {
+        public static final int dataTypes = LENGTH | ENUM | INHERIT;
+        public static final int traitMapping = DISAPPEARS;
+        public static final int initialValueType = ENUM_IT;
+        public static final int NORMAL = 1;
+        protected static EnumType initialValue;
+        public static void setInitialValue(FOTree foTree) {
+            try {
+                initialValue = new EnumType
+                                    (PropNames.WORD_SPACING, NORMAL);
+            } catch (PropertyException e) {
+                throw new RuntimeException
+                                    ("PropertyException: " + e.getMessage());
+            }
+        }
+        public static final int inherited = COMPUTED;
+
+        private static final String[] rwEnums = {
+            null
+            ,"normal"
+        };
+        public static final ROStringArray enums = new ROStringArray(rwEnums);
+
+        public static final ROStringArray enumValues = enums;
+    }
+
+    public static class WrapOption extends Properties {
+        public static final int dataTypes = ENUM | INHERIT;
+        public static final int traitMapping = FORMATTING;
+        public static final int initialValueType = ENUM_IT;
+        public static final int WRAP = 1;
+        public static final int NO_WRAP = 2;
+        protected static EnumType initialValue;
+        public static void setInitialValue(FOTree foTree) {
+            try {
+                initialValue = new EnumType(PropNames.WRAP_OPTION, WRAP);
+            } catch (PropertyException e) {
+                throw new RuntimeException
+                                    ("PropertyException: " + e.getMessage());
+            }
+        }
+        public static final int inherited = COMPUTED;
+
+        private static final String[] rwEnums = {
+            null
+            ,"wrap"
+            ,"no-wrap"
+        };
+        public static final ROStringArray enums = new ROStringArray(rwEnums);
+
+        public static final ROStringArray enumValues = enums;
+    }
+
+    public static class WritingMode extends Properties {
+        public static final int dataTypes = ENUM | INHERIT;
+        public static final int traitMapping = NEW_TRAIT;
+        public static final int initialValueType = ENUM_IT;
+        public static final int LR_TB = 1;
+        public static final int RL_TB = 2;
+        public static final int TB_RL = 3;
+        public static final int LR = 4;
+        public static final int RL = 5;
+        public static final int TB = 6;
+        protected static EnumType initialValue;
+        public static void setInitialValue(FOTree foTree) {
+            try {
+                initialValue = new EnumType
+                                        (PropNames.WRITING_MODE, LR_TB);
+            } catch (PropertyException e) {
+                throw new RuntimeException
+                                    ("PropertyException: " + e.getMessage());
+            }
+        }
+        public static final int inherited = COMPUTED;
+
+        private static final String[] rwEnums = {
+            null
+            ,"lr-tb"
+            ,"rl-tb"
+            ,"tb-rl"
+            ,"lr"
+            ,"rl"
+            ,"tb"
+        };
+        public static final ROStringArray enums = new ROStringArray(rwEnums);
+
+        private static final HashMap rwEnumValues;
+        public static final Map enumValues;
+        static {
+            rwEnumValues = new HashMap(rwEnums.length);
+            for (int i = 1; i < rwEnums.length; i++ ) {
+                rwEnumValues.put((Object)rwEnums[i],
+                                    (Object) Ints.consts.get(i));
+            }
+            enumValues =
+                Collections.unmodifiableMap((Map)rwEnumValues);
+        }
+    }
+
+    public static class XmlLang extends Properties {
+        public static final int dataTypes = SHORTHAND;
+        public static final int traitMapping = SHORTHAND_MAP;
+        public static final int initialValueType = NOTYPE_IT;
+        public static final int inherited = COMPUTED;
+    }
+
+    public static class ZIndex extends Properties {
+        public static final int dataTypes =INTEGER | AUTO | INHERIT;
+        public static final int traitMapping = VALUE_CHANGE;
+        public static final int initialValueType = AUTO_IT;
+        public static final int inherited = NO;
+    }
+
+}
diff --git a/src/org/apache/fop/fo/PropertyConsts.java b/src/org/apache/fop/fo/PropertyConsts.java
new file mode 100644 (file)
index 0000000..7f7a34d
--- /dev/null
@@ -0,0 +1,598 @@
+/**
+ * $Id$
+ * <br/>Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
+ * <br/>For details on use and redistribution please refer to the
+ * <br/>LICENSE file included with these sources.
+ *
+ * @author <a href="mailto:pbwest@powerup.com.au">Peter B. West</a>
+ * @version $Revision$ $Name$
+ */
+
+package org.apache.fop.fo;
+
+import java.lang.Character;
+import java.lang.reflect.Method;
+import java.lang.reflect.InvocationTargetException;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.HashSet;
+import java.util.LinkedList;
+import java.util.BitSet;
+import java.util.StringTokenizer;
+
+import org.apache.fop.fo.FOTree;
+import org.apache.fop.fo.PropNames;
+import org.apache.fop.fo.Properties;
+import org.apache.fop.fo.expr.PropertyException;
+import org.apache.fop.datatypes.Ints;
+import org.apache.fop.datastructs.ROIntArray;
+import org.apache.fop.datastructs.ROStringArray;
+import org.apache.fop.datastructs.ROClassArray;
+import org.apache.fop.datastructs.ROMethodArray;
+import org.apache.fop.fo.expr.PropertyValue;
+
+/**
+ * <p>
+ * This class contains a number of arrays containing values indexed by the
+ * property index value, determined from the PropNames class.  These arrays
+ * provide a means of accessing information about the nature of a property
+ * through the property index value.
+ * </p><p>
+ * Most of the values in the property-indexed arrays are initialised at run
+ * time through the static{} initializers contained in this class.  This
+ * process is not essential; much of the initialization could be done at
+ * compile time by directly initializing individual elements of the arrays,
+ * but the arrays would each then have to be kept in sync with one another
+ * and with the propertyNames array, and the list of property index constants
+ * in the PropNames class.  This would greatly increase the risk of errors
+ * in the initialization.  Speed of startup is here being traded for
+ * robustness.
+ * </p><p>
+ * There are also <tt>HashMap</tt>s which encode the various sets of
+ * properties which are defined to apply to each of the Flow Objects,
+ * and a <tt>BitSet</tt> of those properties which are <i>not</i>
+ * automatically inherited.  The <tt>HashMap</tt>s provide a convenient
+ * means of specifying the relationship between FOs and properties.
+ */
+public class PropertyConsts {
+
+    private static final String packageName = "org.apache.fop.fo";
+
+    /**
+     * @param property <tt>String</tt> name of the FO property
+     * @return <tt>int</tt> index of the named FO property in the array of
+     * property names.
+     * @exception PropertyException if the property name is not found.
+     */
+    public static int getPropertyIndex(String property)
+                throws PropertyException
+    {
+        Integer integer = (Integer)toIndex.get((Object)property);
+        if (integer == null)
+            throw new PropertyException
+                                    ("Property " + property + " not found.");
+        return integer.intValue();
+    }
+
+    /**
+     * @param propertyClassName String name of the FO property class
+     * @return int index of the named FO property class in the array of
+     * property class names.
+     * @exception PropertyException if the property class name is not found.
+     */
+    public static int getPropertyClassIndex(String propertyClass)
+                throws PropertyException
+    {
+        Integer integer =
+                    (Integer)classToIndex.get((Object)propertyClass);
+        if (integer == null)
+            throw new PropertyException
+                        ("Property class " + propertyClass + " not found.");
+        return integer.intValue();
+    }
+
+    /**
+     * @param property String name of the FO property
+     * @return int enumerated initialValueType.  These constants are defined
+     * as static final ints in this class.  Note that an undefined property
+     * name will return the constant defined as NOTYPE_IT
+     */
+    public static int getInitialValueType(String property)
+                    throws PropertyException
+    {
+        // Get the property index then index into the initialvaluetypes array
+        return initialValueTypes[getPropertyIndex(property)];
+    }
+
+    /**
+     * @param propertyIndex int index of the FO property
+     * @return int enumerated initialValueType.  These constants are defined
+     * as static final ints in this class.  Note that an undefined property
+     * name will return the constant defined as NOTYPE_IT
+     */
+    public static int getInitialValueType(int propertyIndex) {
+        return initialValueTypes[propertyIndex];
+    }
+
+    /**
+     * @param property String name of the FO property
+     * @return int type of inheritance for this property
+     * (See constants defined in Properties.)
+     */
+    public static int inheritance(String property)
+                throws PropertyException
+    {
+        return inherit[getPropertyIndex(property)];
+    }
+
+    /**
+     * @param propertyIndex int index of the FO property
+     * @return int type of inheritance for this property
+     * (See constants defined in Properties.)
+     */
+    public static int inheritance(int propertyIndex) {
+        return inherit[propertyIndex];
+    }
+
+    /**
+     * @return <tt>BitSet</tt> of non-inherited properties
+     */
+    public static BitSet getNonInheritedSet() {
+        return (BitSet)nonInheritedProps.clone();
+    }
+
+    /**
+     * @param propertyIndex int index of the FO property
+     * @return <tt>boolean</tt> is property a shorthand?
+     */
+    public static boolean isShorthand(int propertyIndex) {
+        return (datatypes[propertyIndex] & Properties.SHORTHAND) != 0;
+    }
+
+    /**
+     * @param property String name of the FO property
+     * @return <tt>boolean</tt> is property a shorthand?
+     */
+    public static boolean isShorthand(String property)
+                throws PropertyException
+    {
+        return (datatypes[getPropertyIndex(property)] & Properties.SHORTHAND)
+                    != 0;
+    }
+
+    /**
+     * Map the String value of an enum to its integer equivalent.
+     * @param value the enum text
+     * @param values an <tt>ROStringArray</tt> of all of the enum text values.
+     * This array is effectively 1-based.
+     * @return the integer equivalent of the enum text
+     * @exception PropertyException if the enum text is not valid.
+     */
+    static int enumValueToIndex(String value, ROStringArray values)
+                throws PropertyException
+    {
+        for (int i = 1; i < values.length; i++) {
+            if (value.equals(values.get(i))) {
+                return i;
+            }
+        }
+        throw new PropertyException("Enum text " + value +" not found.");
+    }
+
+    /**
+     * Map the String value of an enum to its integer equivalent.
+     * @param value the enum text
+     * @param valuesMap a <tt>Map</tt> mapping enum text to integer
+     * equivalent
+     * @return the integer equivalent of the enum text
+     * @exception PropertyException if the enum text is not valid.
+     */
+    static int enumValueToIndex(String value, Map valuesMap)
+                throws PropertyException
+    {
+        Integer i = (Integer) valuesMap.get((Object) value);
+        if (i == null)
+            throw new PropertyException("Enum text " + value +" not found.");
+        return i.intValue();
+    }
+
+    /**
+     * Map the integer value of an enum into its mapped value.
+     * Only valid when the datatype of the property includes MAPPED_ENUM.
+     * <p>Generally, the path will be enumText->enumIndex->mappedEnumText.
+     * @param index <tt>int</tt> containing the enumeration index.
+     * @param enumMap an <tt>ROStringArray</tt> of the <tt>String</tt>s 
+     * with the mapped enumeration values.
+     * @return a <tt>String</tt> with the mapped enumeration text.
+     */
+    static String enumIndexToMapping(int index, ROStringArray enumMap) {
+        return enumMap.get(index);
+    }
+
+    /**
+     * @param property <tt>int</tt> property index.
+     * @param enum <tt>String</tt> containing the enumeration text.
+     * @return <tt>int</tt> constant representing the enumeration value.
+     * @exception PropertyException
+     */
+    public static int getEnumIndex(int property, String enum)
+                    throws PropertyException
+    {
+        // Get the object represented by the enumValues field in the
+        // property class
+        Object values;
+        try {
+            values
+                = classes[property].getField("enumValues").get(null);
+        }
+        catch (NoSuchFieldException e) {
+            throw new PropertyException(
+                        "Missing field \"" + e.getMessage() + "\""
+                        + " in class " + classNames[property]);
+        }
+        catch (IllegalAccessException e) {
+            throw new PropertyException(
+                "Illegal access on \"" + e.getMessage() + "\" in class " +
+                classNames[property]);
+        }
+        if (values instanceof Map)
+                    return enumValueToIndex(enum, (Map)values);
+        return enumValueToIndex(enum, (ROStringArray)values);
+    }
+
+    /**
+     * @param property <tt>int</tt> property index.
+     * @param enumIndex <tt>int</tt> containing the enumeration index.
+     * @return <tt>String</tt> containing the enumeration text.
+     * @exception PropertyException
+     */
+    public static String getEnumText(int property, int enumIndex)
+                    throws PropertyException
+    {
+        // Get the object represented by the enumValues field in the
+        // property class
+        Object enums;
+        try {
+            enums
+                = classes[property].getField("enums").get(null);
+        }
+        catch (NoSuchFieldException e) {
+            throw new PropertyException(
+                        "Missing field \"" + e.getMessage() + "\""
+                        + " in class " + classNames[property]);
+        }
+        catch (IllegalAccessException e) {
+            throw new PropertyException(
+                "Illegal access on \"" + e.getMessage() + "\" in class " +
+                classNames[property]);
+        }
+        return ((ROStringArray)enums).get(enumIndex);
+    }
+
+    /**
+     * @param property <tt>int</tt> property index.
+     * @param enumIndex int containing the enumeration index.
+     * @return <tt>String</tt> containing the mapped enumeration value.
+     * @exception PropertyException
+     */
+    public static String getMappedEnumValue(int property, int enumIndex)
+                    throws PropertyException
+    {
+        // Get the object represented by the enumMappings field in the
+        // property class
+        Object values;
+        try {
+            values =
+                classes[property].getField("enumMappings").get(null);
+        }
+        catch (NoSuchFieldException e) {
+            throw new PropertyException(
+                        "Missing field \"" + e.getMessage() + "\""
+                        + " in class " + classNames[property]);
+        }
+        catch (IllegalAccessException e) {
+            throw new PropertyException(
+                "Illegal access on \"" + e.getMessage() + "\" in class " +
+                classNames[property]);
+        }
+        return enumIndexToMapping(enumIndex, (ROStringArray)values);
+    }
+
+    /**
+     * A String[] array of the property class names.  This array is
+     * effectively 1-based, with the first element being unused.
+     * The array is initialized in a static initializer by converting the FO
+     * property names from the array PropNames.propertyNames into class
+     * names by converting the first character of every component word to
+     * upper case, and removing all punctuation characters.
+     * It can be indexed by the property name constants defined in
+     * the PropNames class.
+     */
+    private static final String[] classNames;
+
+    /**
+     * An ROStringArray of the property class names.  This read-only array
+     * is derived from <i>classNames</i>, above.
+     * It can be indexed by the property name constants defined in
+     * the PropNames class.
+     */
+    public static final ROStringArray propertyClassNames;
+
+    /**
+     * A Class[] array containing Class objects corresponding to each of the
+     * class names in the classNames array.  It is initialized in a
+     * static initializer in parallel to the creation of the class names in
+     * the classNames array.  It can be indexed by the property name
+     * constants defined in this file.
+     */
+    private static final Class[] classes;
+
+    /**
+     * An ROClassArray of the property classes.  This read-only array
+     * is derived fo <i>classes</i>, above.
+     * It can be indexed by the property name constants defined in
+     * the PropNames class.
+     */
+    public static final ROClassArray propertyClasses;
+
+    /**
+     * A HashMap whose elements are an integer index value keyed by a
+     * property name.  The index value is the index of the property name in
+     * the PropNames.propertyNames[] array.
+     * It is initialized in a static initializer.
+     */
+    private static final HashMap toIndex;
+
+    /**
+     * An unmodifiable Map of property name to property index.  It is derived 
+     * from the <tt>HashMap</tt> toIndex, above.
+     */
+    //public static final Map propertyToIndex;
+
+    /**
+     * A HashMap whose elements are an integer index value keyed by the name
+     * of a property class.  the index value is the index of the property
+     * class name in the classNames[] array.  It is initialized in a
+     * static initializer.
+     */
+    private static final HashMap classToIndex;
+
+    /**
+     * An unmodifiable Map of property class name to property index.  It is
+     * derived from the <tt>HashMap</tt> classToIndex, above.
+     */
+    //public static final Map propertyClassToIndex;
+
+    /** <p>
+     * An int[] array of values specifying the type of inheritance of a
+     * property.  The array is indexed by the index value constants that are
+     * defined in the PropNames class in parallel to the
+     * PropNames.propertyNames[] array.
+     * </p><p>
+     * The array is initialized in a static initializer from the values of the
+     * <i>inherited</i> field in each property class.
+     */
+    private static final int[] inherit;
+
+    /**
+     * An ROIntArray of the property <i>inherited</i> values.
+     * This read-only array is derived from <i>inherit</i>, above.
+     * It can be indexed by the property name constants defined in
+     * the PropNames class.
+     */
+    public static final ROIntArray inherited;
+
+    /**
+     * A <tt>BitSet</tt> of properties which are not normally inherited.
+     * It is defined relative to the set of all properties; i.e. the
+     * non-inheritance of any property can be established by testing the
+     * bit in this set that corresponds to the queried property's index.
+     * <p>The <tt>BitSet</tt> is private.  An accessor method is defined
+     * which returns a clone of this set.
+     */
+    private static final BitSet nonInheritedProps;
+
+    /** <p>
+     * An int[] array of the types of the <i>initialValue</i> field of each
+     * property.  The array is indexed by the index value constants that are
+     * defined in the PropNames class in parallel to the
+     * PropNames.propertyNames[] array.
+     * </p><p>
+     * The array is initialized in a static initializer from the values of the
+     * <i>initialValueType</i> field in each property class.
+     */
+    private static final int[] initialValueTypes;
+
+    /** <p>
+     * An int[] array of the values of the <i>traitMapping</i> field of each
+     * property.  The array is indexed by the index value constants that are
+     * defined in the PropNames class in parallel to the
+     * PropNames.propertyNames[] array.
+     * </p><p>
+     * The array is initialized in a static initializer from the values of the
+     * <i>traitMapping</i> field in each property class.
+     */
+    private static final int[] traitMappings;
+
+    /**
+     * <p>An int[] array of the values of the <i>dataTypes</i> field of each
+     * property.  The array is indexed by the index value constants that are
+     * defined in the PropNames class in parallel to the
+     * PropNames.propertyNames[] array.
+     * </p><p>
+     * The array is initialized in a static initializer from the values of the
+     * <i>dataTypes</i> field in each property class.
+     * </p>
+     */
+    private static final int[] datatypes;
+
+    /**
+     * An ROIntArray of the property <i>dataTypes</i> values.
+     * This read-only array is derived from <i>datatypes</i>, above.
+     * It can be indexed by the property name constants defined in
+     * the PropNames class.
+     */
+    public static final ROIntArray dataTypes;
+
+    /**
+     * A sparsely populated array of <tt>Method</tt> objects.  Although this
+     * array has a slot for every property, only positions corresponding to
+     * properties which have a <i>complex()</i> method for processing
+     * complex property value specifications, will hold a valid
+     * <tt>Method</tt> object.
+     */
+    private static final Method[] complexmethods;
+
+    /**
+     * An ROMethodArray of the property <i>complex</i> methods.
+     * This read-only array is derived from <i>complexmethods</i>, above.
+     * It can be indexed by the property name constants defined in
+     * the PropNames class.
+     */
+    public static final ROMethodArray complexMethods;
+
+    /**
+     * A sparsely populated array of <tt>Method</tt> objects.  Although this
+     * array has a slot for every property, only positions corresponding to
+     * properties which have a <i>setInitialValue()</i> method for creating
+     * initial property value objects, will hold a valid
+     * <tt>Method</tt> object.
+     */
+    private static final Method[] initialvaluemethods;
+
+    /**
+     * An ROMethodArray of the property <i>setInitialValue</i> methods.
+     * This read-only array is derived from <i>initialvaluemethods</i>, above.
+     * It can be indexed by the property name constants defined in
+     * the PropNames class.
+     */
+    public static final ROMethodArray initialValueMethods;
+
+    static {
+        String prefix = packageName + "." + "Properties" + "$";
+        String cname = "";
+
+        classNames   = new String[PropNames.LAST_PROPERTY_INDEX + 1];
+        toIndex      = new HashMap(PropNames.LAST_PROPERTY_INDEX + 1);
+        classToIndex = new HashMap(PropNames.LAST_PROPERTY_INDEX + 1);
+        inherit            = new int[PropNames.LAST_PROPERTY_INDEX + 1];
+        nonInheritedProps  = new BitSet(PropNames.LAST_PROPERTY_INDEX + 1);
+        initialValueTypes  = new int[PropNames.LAST_PROPERTY_INDEX + 1];
+        traitMappings      = new int[PropNames.LAST_PROPERTY_INDEX + 1];
+        datatypes          = new int[PropNames.LAST_PROPERTY_INDEX + 1];
+        classes            = new Class[PropNames.LAST_PROPERTY_INDEX + 1];
+        complexmethods     = new Method[PropNames.LAST_PROPERTY_INDEX + 1];
+        initialvaluemethods = new Method[PropNames.LAST_PROPERTY_INDEX + 1];
+
+        for (int i = 0; i <= PropNames.LAST_PROPERTY_INDEX; i++) {
+            cname = "";
+
+            // Set the array of property class names
+            StringTokenizer stoke;
+            try {
+                stoke = new StringTokenizer
+                                        (PropNames.getPropertyName(i), "-.:");
+            } catch (PropertyException e) {
+                throw new RuntimeException(e.getMessage());
+            }
+            while (stoke.hasMoreTokens()) {
+                String token = stoke.nextToken();
+                String pname = new Character(
+                                    Character.toUpperCase(token.charAt(0))
+                                ).toString() + token.substring(1);
+                cname = cname + pname;
+            }
+            classNames[i] = cname;
+
+            // Set up the array of Class objects representing each of the
+            //  member classes of the Properties class
+            String name = prefix + cname;
+            try {
+                //System.out.println("classes["+i+"] "+name);//DEBUG
+                classes[i] = Class.forName(name);
+            } catch (ClassNotFoundException e) {
+                throw new RuntimeException(
+                                "Class " + name + " could not be found.");
+            }
+
+            // Set up the toIndex Hashmap with the name of the
+            // property as a key, and the integer index as a value
+            
+            try {
+                if (toIndex.put((Object) PropNames.getPropertyName(i),
+                                        Ints.consts.get(i)) != null) {
+                    throw new RuntimeException(
+                        "Duplicate values in toIndex for key " +
+                        PropNames.getPropertyName(i));
+                }
+            } catch (PropertyException e) {
+                throw new RuntimeException(e.getMessage());
+            }
+
+            // Set up the classToIndex Hashmap with the name of the
+            // property class as a key, and the integer index as a value
+            
+            if (classToIndex.put((Object) classNames[i],
+                                    Ints.consts.get(i)) != null) {
+                throw new RuntimeException(
+                    "Duplicate values in classToIndex for key " +
+                    classNames[i]);
+            }
+
+            try {
+                Class vclass = classes[i];
+                cname = vclass.getName();
+                inherit[i] = classes[i].getField("inherited").getInt(null);
+                if (inherit[i] == Properties.NO) nonInheritedProps.set(i);
+                initialValueTypes[i] =
+                classes[i].getField("initialValueType").getInt(null);
+                traitMappings[i] =
+                classes[i].getField("traitMapping").getInt(null);
+                datatypes[i] = classes[i].getField("dataTypes").getInt(null);
+                if ((datatypes[i] & Properties.COMPLEX) != 0)
+                    complexmethods[i] =
+                            classes[i].getMethod
+                                        ("complex", new Class[]
+                                                    {int.class,
+                                                     PropertyValue.class});
+                if ((initialValueTypes[i] & Properties.USE_SET_FUNCTION_IT)
+                                        != 0)
+                    initialvaluemethods[i] =
+                            classes[i].getMethod
+                                    ("setInitialValue",
+                                     new Class[]
+                                        {org.apache.fop.fo.FOTree.class});
+            }
+            catch (NoSuchFieldException e) {
+                throw new RuntimeException(
+                            "Missing field \"" + e.getMessage() + "\""
+                            + " in class " + cname);
+            }
+            catch (NoSuchMethodException e) {
+                throw new RuntimeException(
+                            "Missing method \"" + e.getMessage() + "\""
+                            + " in class " + cname);
+            }
+            catch (IllegalAccessException e) {
+                throw new RuntimeException(
+                    "Illegal access on \"" + e.getMessage() + "\" in class " +
+                    cname);
+            }
+
+        }
+
+        // Initialise the RO arrays
+        propertyClassNames  = new ROStringArray(classNames);
+        propertyClasses     = new ROClassArray(classes);
+        inherited           = new ROIntArray(inherit);
+        dataTypes           = new ROIntArray(datatypes);
+        complexMethods      = new ROMethodArray(complexmethods);
+        initialValueMethods = new ROMethodArray(initialvaluemethods);
+
+    }
+
+
+    private PropertyConsts (){}
+
+}
+
diff --git a/src/org/apache/fop/fo/PropertySets.java b/src/org/apache/fop/fo/PropertySets.java
new file mode 100644 (file)
index 0000000..efdcc86
--- /dev/null
@@ -0,0 +1,543 @@
+/**
+ * $Id$
+ * <br/>Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
+ * <br/>For details on use and redistribution please refer to the
+ * <br/>LICENSE file included with these sources.
+ *
+ * @author <a href="mailto:pbwest@powerup.com.au">Peter B. West</a>
+ * @version $Revision$ $Name$
+ */
+
+package org.apache.fop.fo;
+
+import java.util.Set;
+import java.util.HashSet;
+import java.util.Collections;
+
+import org.apache.fop.fo.PropNames;
+import org.apache.fop.datastructs.ROIntArray;
+import org.apache.fop.datatypes.Ints;
+
+/**
+ * This class contains <tt>HashMap</tt>s which encode the various sets of
+ * properties which are defined to apply to each of the Flow Objects.  These 
+ * <tt>HashMap</tt>s provide a convenient means of specifying the
+ * relationship between FOs and properties.
+ */
+public class PropertySets {
+
+    private static final String packageName = "org.apache.fop.fo";
+
+    /**
+     * The number of <b>Common Accessibility Properties</b>
+     */
+    public static final int accessibilityPropsSize = 2;
+    /**
+     * <tt>HashSet</tt> of the <tt>Integer</tt> objects corresponding to the
+     * constant index of each property in the set of
+     * <b>Common Accessibility Properties</b>.
+     */
+    private static final HashSet accessibilityProps =
+                                        new HashSet(accessibilityPropsSize);
+    public static final Set accessibilitySet;
+
+    static {
+         accessibilityProps.add(Ints.consts.get(PropNames.ROLE));       
+         accessibilityProps.add(Ints.consts.get(PropNames.SOURCE_DOCUMENT));       
+         accessibilitySet =
+                         Collections.unmodifiableSet((Set)accessibilityProps);
+    }
+    /**
+     * The number of <b>Common Absolute Position Properties</b>.
+     */
+    public static final int absolutePositionPropsSize = 5;
+    /**
+     * <tt>HashSet</tt> of the <tt>Integer</tt> objects corresponding to the
+     * constant index of each property in the set of
+     * <b>Common Absolute Position Properties</b>.
+     */
+    private static final HashSet absolutePositionProps =
+                                    new HashSet(absolutePositionPropsSize);
+    public static final Set absolutePositionSet;
+
+    static {
+        absolutePositionProps.add
+                            (Ints.consts.get(PropNames.ABSOLUTE_POSITION));
+        absolutePositionProps.add(Ints.consts.get(PropNames.BOTTOM));
+        absolutePositionProps.add(Ints.consts.get(PropNames.LEFT));
+        absolutePositionProps.add(Ints.consts.get(PropNames.RIGHT));
+        absolutePositionProps.add(Ints.consts.get(PropNames.TOP));
+        absolutePositionSet =
+                    Collections.unmodifiableSet((Set)absolutePositionProps);
+    }
+    /**
+     * The number of <b>Common Aural Properties</b>.
+     */
+    public static final int auralPropsSize = 18;
+    /**
+     * <tt>HashSet</tt> of the <tt>Integer</tt> objects corresponding to the
+     * constant index of each property in the set of
+     * <b>Common Aural Properties</b>.
+     */
+    private static final HashSet auralProps = new HashSet(auralPropsSize);
+    public static final Set auralSet;
+
+    static {
+        auralProps.add(Ints.consts.get(PropNames.AZIMUTH));
+        auralProps.add(Ints.consts.get(PropNames.CUE_AFTER));
+        auralProps.add(Ints.consts.get(PropNames.CUE_BEFORE));
+        auralProps.add(Ints.consts.get(PropNames.ELEVATION));
+        auralProps.add(Ints.consts.get(PropNames.PAUSE_AFTER));
+        auralProps.add(Ints.consts.get(PropNames.PAUSE_BEFORE));
+        auralProps.add(Ints.consts.get(PropNames.PITCH));
+        auralProps.add(Ints.consts.get(PropNames.PITCH_RANGE));
+        auralProps.add(Ints.consts.get(PropNames.PLAY_DURING));
+        auralProps.add(Ints.consts.get(PropNames.RICHNESS));
+        auralProps.add(Ints.consts.get(PropNames.SPEAK));
+        auralProps.add(Ints.consts.get(PropNames.SPEAK_HEADER));
+        auralProps.add(Ints.consts.get(PropNames.SPEAK_NUMERAL));
+        auralProps.add(Ints.consts.get(PropNames.SPEAK_PUNCTUATION));
+        auralProps.add(Ints.consts.get(PropNames.SPEECH_RATE));
+        auralProps.add(Ints.consts.get(PropNames.STRESS));
+        auralProps.add(Ints.consts.get(PropNames.VOICE_FAMILY));
+        auralProps.add(Ints.consts.get(PropNames.VOLUME));
+        auralSet = Collections.unmodifiableSet((Set)auralProps);
+    }
+    /**
+     * The number of <b>Common Background Properties</b>.
+     */
+    public static final int backgroundPropsSize = 8;
+    /**
+     * <tt>HashSet</tt> of the <tt>Integer</tt> objects corresponding to the
+     * constant index of each property in the set of
+     * <b>Common Background Properties</b>.
+     */
+    private static final HashSet backgroundProps =
+                                            new HashSet(backgroundPropsSize);
+    public static final Set backgroundSet;
+
+    static {
+        backgroundProps.add(Ints.consts.get(PropNames.BACKGROUND));
+        backgroundProps.add(Ints.consts.get(PropNames.BACKGROUND_ATTACHMENT));
+        backgroundProps.add(Ints.consts.get(PropNames.BACKGROUND_COLOR));
+        backgroundProps.add(Ints.consts.get(PropNames.BACKGROUND_IMAGE));
+        backgroundProps.add(Ints.consts.get(PropNames.BACKGROUND_POSITION));
+        backgroundProps.add
+                (Ints.consts.get(PropNames.BACKGROUND_POSITION_HORIZONTAL));
+        backgroundProps.add
+                    (Ints.consts.get(PropNames.BACKGROUND_POSITION_VERTICAL));
+        backgroundProps.add(Ints.consts.get(PropNames.BACKGROUND_REPEAT));
+        backgroundSet = Collections.unmodifiableSet((Set)backgroundProps);
+    }
+    /**
+     * The number of <b>Common Border Properties</b>.
+     */
+    public static final int borderPropsSize = 41;
+    /**
+     * <tt>HashSet</tt> of the <tt>Integer</tt> objects corresponding to the
+     * constant index of each property in the set of
+     * <b>Common Border Properties</b>.
+     */
+    private static final HashSet borderProps = new HashSet(borderPropsSize);
+    public static final Set borderSet;
+
+    static {
+        borderProps.add(Ints.consts.get(PropNames.BORDER));
+        borderProps.add(Ints.consts.get(PropNames.BORDER_AFTER_COLOR));
+        borderProps.add(Ints.consts.get(PropNames.BORDER_AFTER_STYLE));
+        borderProps.add(Ints.consts.get(PropNames.BORDER_AFTER_WIDTH));
+        borderProps.add(Ints.consts.get(PropNames.BORDER_AFTER_WIDTH_LENGTH));
+        borderProps.add
+            (Ints.consts.get(PropNames.BORDER_AFTER_WIDTH_CONDITIONALITY));
+        borderProps.add(Ints.consts.get(PropNames.BORDER_BEFORE_COLOR));
+        borderProps.add(Ints.consts.get(PropNames.BORDER_BEFORE_STYLE));
+        borderProps.add(Ints.consts.get(PropNames.BORDER_BEFORE_WIDTH));
+        borderProps.add(Ints.consts.get(PropNames.BORDER_BEFORE_WIDTH_LENGTH));
+        borderProps.add
+            (Ints.consts.get(PropNames.BORDER_BEFORE_WIDTH_CONDITIONALITY));
+        borderProps.add(Ints.consts.get(PropNames.BORDER_BOTTOM));
+        borderProps.add(Ints.consts.get(PropNames.BORDER_BOTTOM_COLOR));
+        borderProps.add(Ints.consts.get(PropNames.BORDER_BOTTOM_STYLE));
+        borderProps.add(Ints.consts.get(PropNames.BORDER_BOTTOM_WIDTH));
+        borderProps.add(Ints.consts.get(PropNames.BORDER_COLOR));
+        borderProps.add(Ints.consts.get(PropNames.BORDER_END_COLOR));
+        borderProps.add(Ints.consts.get(PropNames.BORDER_END_STYLE));
+        borderProps.add(Ints.consts.get(PropNames.BORDER_END_WIDTH));
+        borderProps.add(Ints.consts.get(PropNames.BORDER_END_WIDTH_LENGTH));
+        borderProps.add
+            (Ints.consts.get(PropNames.BORDER_END_WIDTH_CONDITIONALITY));
+        borderProps.add(Ints.consts.get(PropNames.BORDER_LEFT));
+        borderProps.add(Ints.consts.get(PropNames.BORDER_LEFT_COLOR));
+        borderProps.add(Ints.consts.get(PropNames.BORDER_LEFT_STYLE));
+        borderProps.add(Ints.consts.get(PropNames.BORDER_LEFT_WIDTH));
+        borderProps.add(Ints.consts.get(PropNames.BORDER_RIGHT));
+        borderProps.add(Ints.consts.get(PropNames.BORDER_RIGHT_COLOR));
+        borderProps.add(Ints.consts.get(PropNames.BORDER_RIGHT_STYLE));
+        borderProps.add(Ints.consts.get(PropNames.BORDER_RIGHT_WIDTH));
+        borderProps.add(Ints.consts.get(PropNames.BORDER_START_COLOR));
+        borderProps.add(Ints.consts.get(PropNames.BORDER_START_STYLE));
+        borderProps.add(Ints.consts.get(PropNames.BORDER_START_WIDTH));
+        borderProps.add(Ints.consts.get(PropNames.BORDER_START_WIDTH_LENGTH));
+        borderProps.add
+            (Ints.consts.get(PropNames.BORDER_START_WIDTH_CONDITIONALITY));
+        borderProps.add(Ints.consts.get(PropNames.BORDER_STYLE));
+        borderProps.add(Ints.consts.get(PropNames.BORDER_TOP));
+        borderProps.add(Ints.consts.get(PropNames.BORDER_TOP_COLOR));
+        borderProps.add(Ints.consts.get(PropNames.BORDER_TOP_STYLE));
+        borderProps.add(Ints.consts.get(PropNames.BORDER_TOP_WIDTH));
+        borderProps.add(Ints.consts.get(PropNames.BORDER_WIDTH));
+        borderSet = Collections.unmodifiableSet((Set)borderProps);
+    }
+    /**
+     * The number of <b>Common Font Properties</b>.
+     */
+    public static final int fontPropsSize = 9;
+    /**
+     * <tt>HashSet</tt> of the <tt>Integer</tt> objects corresponding to the
+     * constant index of each property in the set of
+     * <b>Common Font Properties</b>.
+     */
+    private static final HashSet fontProps = new HashSet(fontPropsSize);
+    public static final Set fontSet;
+
+    static {
+        fontProps.add(Ints.consts.get(PropNames.FONT));
+        fontProps.add(Ints.consts.get(PropNames.FONT_FAMILY));
+        fontProps.add(Ints.consts.get(PropNames.FONT_SELECTION_STRATEGY));
+        fontProps.add(Ints.consts.get(PropNames.FONT_SIZE));
+        fontProps.add(Ints.consts.get(PropNames.FONT_SIZE_ADJUST));
+        fontProps.add(Ints.consts.get(PropNames.FONT_STRETCH));
+        fontProps.add(Ints.consts.get(PropNames.FONT_STYLE));
+        fontProps.add(Ints.consts.get(PropNames.FONT_VARIANT));
+        fontProps.add(Ints.consts.get(PropNames.FONT_WEIGHT));
+        fontSet = Collections.unmodifiableSet((Set)fontProps);
+    }
+    /**
+     * The number of <b>Common Hyphenation Properties</b>.
+     */
+    public static final int hyphenationPropsSize = 7;
+    /**
+     * <tt>HashSet</tt> of the <tt>Integer</tt> objects corresponding to the
+     * constant index of each property in the set of
+     * <b>Common Hyphenation Properties</b>.
+     */
+    private static final HashSet hyphenationProps =
+                                            new HashSet(hyphenationPropsSize);
+    public static final Set hyphenationSet;
+
+    static {
+        hyphenationProps.add(Ints.consts.get(PropNames.COUNTRY));
+        hyphenationProps.add(Ints.consts.get(PropNames.LANGUAGE));
+        hyphenationProps.add(Ints.consts.get(PropNames.SCRIPT));
+        hyphenationProps.add(Ints.consts.get(PropNames.HYPHENATE));
+        hyphenationProps.add(Ints.consts.get(PropNames.HYPHENATION_CHARACTER));
+        hyphenationProps.add
+                (Ints.consts.get(PropNames.HYPHENATION_PUSH_CHARACTER_COUNT));
+        hyphenationProps.add
+            (Ints.consts.get(PropNames.HYPHENATION_REMAIN_CHARACTER_COUNT));
+        hyphenationSet = Collections.unmodifiableSet((Set)hyphenationProps);
+    }
+    /**
+     * The number of <b>Common Margin-Block Properties</b>.
+     */
+    public static final int marginBlockPropsSize = 5;
+    /**
+     * <tt>HashSet</tt> of the <tt>Integer</tt> objects corresponding to the
+     * constant index of each property in the set of
+     * <b>Common Margin-Block Properties</b>.
+     */
+    private static final HashSet marginBlockProps =
+                                            new HashSet(marginBlockPropsSize);
+    public static final Set marginBlockSet;
+
+    static {
+        marginBlockProps.add(Ints.consts.get(PropNames.MARGIN));
+        marginBlockProps.add(Ints.consts.get(PropNames.MARGIN_BOTTOM));
+        marginBlockProps.add(Ints.consts.get(PropNames.MARGIN_LEFT));
+        marginBlockProps.add(Ints.consts.get(PropNames.MARGIN_RIGHT));
+        marginBlockProps.add(Ints.consts.get(PropNames.MARGIN_TOP));
+        marginBlockSet = Collections.unmodifiableSet((Set)marginBlockProps);
+    }
+    /**
+     * The number of <b>Common Margin-Inline Properties</b>.
+     */
+    public static final int marginInlinePropsSize = 2;
+    /**
+     * <tt>HashSet</tt> of the <tt>Integer</tt> objects corresponding to the
+     * constant index of each property in the set of
+     * <b>Common Margin-Inline Properties</b>.
+     */
+    private static final HashSet marginInlineProps =
+                                        new HashSet(marginInlinePropsSize);
+    public static final Set marginInlineSet;
+
+    static {
+        marginInlineProps.add(Ints.consts.get(PropNames.SPACE_END));
+        marginInlineProps.add(Ints.consts.get(PropNames.SPACE_START));
+        marginInlineSet = Collections.unmodifiableSet((Set)marginInlineProps);
+    }
+    /**
+     * The number of <b>Common Padding Properties</b>.
+     */
+    public static final int paddingPropsSize = 17;
+    /**
+     * <tt>HashSet</tt> of the <tt>Integer</tt> objects corresponding to the
+     * constant index of each property in the set of
+     * <b>Common Padding Properties</b>.
+     */
+    private static final HashSet paddingProps = new HashSet(paddingPropsSize);
+    public static final Set paddingSet;
+
+    static {
+        paddingProps.add(Ints.consts.get(PropNames.PADDING));
+        paddingProps.add(Ints.consts.get(PropNames.PADDING_AFTER));
+        paddingProps.add(Ints.consts.get(PropNames.PADDING_AFTER_LENGTH));
+        paddingProps.add
+                    (Ints.consts.get(PropNames.PADDING_AFTER_CONDITIONALITY));
+        paddingProps.add(Ints.consts.get(PropNames.PADDING_BEFORE));
+        paddingProps.add(Ints.consts.get(PropNames.PADDING_BEFORE_LENGTH));
+        paddingProps.add
+                    (Ints.consts.get(PropNames.PADDING_BEFORE_CONDITIONALITY));
+        paddingProps.add(Ints.consts.get(PropNames.PADDING_BOTTOM));
+        paddingProps.add(Ints.consts.get(PropNames.PADDING_END));
+        paddingProps.add(Ints.consts.get(PropNames.PADDING_END_LENGTH));
+        paddingProps.add
+                    (Ints.consts.get(PropNames.PADDING_END_CONDITIONALITY));
+        paddingProps.add(Ints.consts.get(PropNames.PADDING_LEFT));
+        paddingProps.add(Ints.consts.get(PropNames.PADDING_RIGHT));
+        paddingProps.add(Ints.consts.get(PropNames.PADDING_START));
+        paddingProps.add(Ints.consts.get(PropNames.PADDING_START_LENGTH));
+        paddingProps.add
+                    (Ints.consts.get(PropNames.PADDING_START_CONDITIONALITY));
+        paddingProps.add(Ints.consts.get(PropNames.PADDING_TOP));
+        paddingSet = Collections.unmodifiableSet((Set)paddingProps);
+    }
+    /**
+     * The number of <b>Common Relative Position Properties</b>.
+     */
+    public static final int relativePositionPropsSize = 5;
+    /**
+     * <tt>HashSet</tt> of the <tt>Integer</tt> objects corresponding to the
+     * constant index of each property in the set of
+     * <b>Common Relative Position Properties</b>.
+     */
+    private static final HashSet relativePositionProps =
+                                    new HashSet(relativePositionPropsSize);
+    public static final Set relativePositionSet;
+
+    static {
+        relativePositionProps.add
+                            (Ints.consts.get(PropNames.RELATIVE_POSITION));
+        relativePositionProps.add(Ints.consts.get(PropNames.BOTTOM));
+        relativePositionProps.add(Ints.consts.get(PropNames.LEFT));
+        relativePositionProps.add(Ints.consts.get(PropNames.RIGHT));
+        relativePositionProps.add(Ints.consts.get(PropNames.TOP));
+        relativePositionSet =
+                    Collections.unmodifiableSet((Set)relativePositionProps);
+    }
+    /**
+     * The number of <b>Common Table Properties</b>.
+     */
+    public static final int tablePropsSize = 21;
+    /**
+     * <tt>HashSet</tt> of the <tt>Integer</tt> objects corresponding to the
+     * constant index of each property in the set of
+     * <b>Common Table Properties</b>.
+     */
+    private static final HashSet tableProps = new HashSet(tablePropsSize);
+    public static final Set tableSet;
+
+    static {
+        tableProps.add(Ints.consts.get(PropNames.BORDER_AFTER_PRECEDENCE));
+        tableProps.add(Ints.consts.get(PropNames.BORDER_BEFORE_PRECEDENCE));
+        tableProps.add(Ints.consts.get(PropNames.BORDER_COLLAPSE));
+        tableProps.add(Ints.consts.get(PropNames.BORDER_END_PRECEDENCE));
+        tableProps.add(Ints.consts.get(PropNames.BORDER_SEPARATION));
+        tableProps.add(Ints.consts.get
+                (PropNames.BORDER_SEPARATION_BLOCK_PROGRESSION_DIRECTION));
+        tableProps.add(Ints.consts.get
+                (PropNames.BORDER_SEPARATION_INLINE_PROGRESSION_DIRECTION));
+        tableProps.add(Ints.consts.get(PropNames.BORDER_SPACING));
+        tableProps.add(Ints.consts.get(PropNames.BORDER_START_PRECEDENCE));
+        tableProps.add(Ints.consts.get(PropNames.CAPTION_SIDE));
+        tableProps.add(Ints.consts.get(PropNames.COLUMN_NUMBER));
+        tableProps.add(Ints.consts.get(PropNames.COLUMN_WIDTH));
+        tableProps.add(Ints.consts.get(PropNames.EMPTY_CELLS));
+        tableProps.add(Ints.consts.get(PropNames.ENDS_ROW));
+        tableProps.add(Ints.consts.get(PropNames.NUMBER_COLUMNS_REPEATED));
+        tableProps.add(Ints.consts.get(PropNames.NUMBER_COLUMNS_SPANNED));
+        tableProps.add(Ints.consts.get(PropNames.NUMBER_ROWS_SPANNED));
+        tableProps.add(Ints.consts.get(PropNames.STARTS_ROW));
+        tableProps.add(Ints.consts.get(PropNames.TABLE_LAYOUT));
+        tableProps.add(Ints.consts.get(PropNames.TABLE_OMIT_FOOTER_AT_BREAK));
+        tableProps.add(Ints.consts.get(PropNames.TABLE_OMIT_HEADER_AT_BREAK));
+        tableSet = Collections.unmodifiableSet((Set)tableProps);
+    }
+
+    /**
+     * Shorthand properties.  Where properties interact, they are listed
+     * in increasing precision.
+     */
+    public static final ROIntArray shorthands =
+        new ROIntArray(new int[] {
+            PropNames.BACKGROUND
+            ,PropNames.BACKGROUND_POSITION
+            ,PropNames.BORDER
+            ,PropNames.BORDER_STYLE
+            ,PropNames.BORDER_COLOR
+            ,PropNames.BORDER_WIDTH
+            ,PropNames.BORDER_TOP
+            ,PropNames.BORDER_RIGHT
+            ,PropNames.BORDER_BOTTOM
+            ,PropNames.BORDER_LEFT
+            ,PropNames.BORDER_SPACING
+            ,PropNames.CUE
+            ,PropNames.FONT
+            ,PropNames.MARGIN
+            ,PropNames.PADDING
+            ,PropNames.PAGE_BREAK_AFTER
+            ,PropNames.PAGE_BREAK_BEFORE
+            ,PropNames.PAGE_BREAK_INSIDE
+            ,PropNames.PAUSE
+            ,PropNames.POSITION
+            ,PropNames.SIZE
+            ,PropNames.VERTICAL_ALIGN
+            ,PropNames.WHITE_SPACE
+            ,PropNames.XML_LANG
+        });
+
+    private static final int[] backgroundPosition = {
+        PropNames.BACKGROUND_POSITION_HORIZONTAL
+        ,PropNames.BACKGROUND_POSITION_VERTICAL
+    };
+
+    private static final int[] borderColor = {
+        PropNames.BORDER_TOP_COLOR
+        ,PropNames.BORDER_RIGHT_COLOR
+        ,PropNames.BORDER_BOTTOM_COLOR
+        ,PropNames.BORDER_LEFT_COLOR
+    };
+
+    private static final int[] borderStyle = {
+        PropNames.BORDER_TOP_STYLE
+        ,PropNames.BORDER_RIGHT_STYLE
+        ,PropNames.BORDER_BOTTOM_STYLE
+        ,PropNames.BORDER_LEFT_STYLE
+    };
+
+    private static final int[] borderWidth = {
+        PropNames.BORDER_TOP_WIDTH
+        ,PropNames.BORDER_RIGHT_WIDTH
+        ,PropNames.BORDER_BOTTOM_WIDTH
+        ,PropNames.BORDER_LEFT_WIDTH
+    };
+
+    public static final ROIntArray backgroundExpansion =
+        new ROIntArray(new int[][] {
+            new int[] {
+                PropNames.BACKGROUND_COLOR
+                ,PropNames.BACKGROUND_IMAGE
+                ,PropNames.BACKGROUND_REPEAT
+                ,PropNames.BACKGROUND_ATTACHMENT
+                ,PropNames.BACKGROUND_POSITION_HORIZONTAL
+                ,PropNames.BACKGROUND_POSITION_VERTICAL
+            }, backgroundPosition});
+
+    public static final ROIntArray backgroundPositionExpansion =
+        new ROIntArray(backgroundPosition);
+
+    public static final ROIntArray borderExpansion =
+        new ROIntArray(new int[][] { borderStyle, borderColor, borderWidth });
+
+    public static final ROIntArray borderStyleExpansion =
+        new ROIntArray(borderStyle);
+
+    public static final ROIntArray borderColorExpansion =
+        new ROIntArray(borderColor);
+
+    public static final ROIntArray borderWidthExpansion =
+        new ROIntArray(borderWidth);
+
+    public static final ROIntArray borderTopExpansion =
+        new ROIntArray(new int[] {
+            PropNames.BORDER_TOP_STYLE
+            ,PropNames.BORDER_TOP_COLOR
+            ,PropNames.BORDER_TOP_WIDTH
+        });
+
+    public static final ROIntArray borderRightExpansion =
+        new ROIntArray(new int[] {
+            PropNames.BORDER_RIGHT_STYLE
+            ,PropNames.BORDER_RIGHT_COLOR
+            ,PropNames.BORDER_RIGHT_WIDTH
+        });
+
+    public static final ROIntArray borderBottomExpansion =
+        new ROIntArray(new int[] {
+            PropNames.BORDER_BOTTOM_STYLE
+            ,PropNames.BORDER_BOTTOM_COLOR
+            ,PropNames.BORDER_BOTTOM_WIDTH
+        });
+
+    public static final ROIntArray borderLeftExpansion =
+        new ROIntArray(new int[] {
+            PropNames.BORDER_LEFT_STYLE
+            ,PropNames.BORDER_LEFT_COLOR
+            ,PropNames.BORDER_LEFT_WIDTH
+        });
+
+    /**
+     * Watch this one.  <i>border-spacing</i> is a shorthand which expands
+     * into the components of the <tt>&lt;border-separation&gt;</tt> compound
+     * property.
+     */
+    public static final ROIntArray borderSpacingExpansion =
+        new ROIntArray(new int[] {
+            PropNames.BORDER_SEPARATION_BLOCK_PROGRESSION_DIRECTION
+            ,PropNames.BORDER_SEPARATION_INLINE_PROGRESSION_DIRECTION
+        });
+
+    public static final ROIntArray cueExpansion =
+        new ROIntArray(new int[] {
+            PropNames.CUE_BEFORE
+            ,PropNames.CUE_AFTER
+        });
+
+    /**
+     * Another nasty one.  <i>font</i> expands, in part, into
+     * <i>line-height</i>, which is itself a compound property with a
+     * <tt>&lt;space&gt;</tt> value.
+     */
+    public static final ROIntArray fontExpansion =
+        new ROIntArray(new int[] {
+            PropNames.FONT_FAMILY
+            ,PropNames.FONT_STYLE
+            ,PropNames.FONT_VARIANT
+            ,PropNames.FONT_WEIGHT
+            ,PropNames.FONT_SIZE
+            ,PropNames.LINE_HEIGHT_MINIMUM
+            ,PropNames.LINE_HEIGHT_OPTIMUM
+            ,PropNames.LINE_HEIGHT_MAXIMUM
+            ,PropNames.LINE_HEIGHT_PRECEDENCE
+            ,PropNames.LINE_HEIGHT_CONDITIONALITY
+        });
+
+    public static final ROIntArray marginExpansion =
+        new ROIntArray(new int[] {
+            PropNames.MARGIN_TOP
+            ,PropNames.MARGIN_RIGHT
+            ,PropNames.MARGIN_BOTTOM
+            ,PropNames.MARGIN_LEFT
+        });
+
+    public static final ROIntArray paddingExpansion =
+        new ROIntArray(new int[] {
+            PropNames.PADDING_TOP
+            ,PropNames.PADDING_RIGHT
+            ,PropNames.PADDING_BOTTOM
+            ,PropNames.PADDING_LEFT
+        });
+
+    private PropertySets (){}
+
+}