From: Peter Bernard West Date: Tue, 7 May 2002 05:17:52 +0000 (+0000) Subject: Initial commit of experimental version. X-Git-Tag: FOP_Alt-Design_Migration~35 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=070e7a1db8315af620f512d734d75fd6b6fb16ac;p=xmlgraphics-fop.git Initial commit of experimental version. git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/FOP_0-20-0_Alt-Design@194772 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/src/org/apache/fop/fo/FOAttributes.java b/src/org/apache/fop/fo/FOAttributes.java new file mode 100644 index 000000000..624102df4 --- /dev/null +++ b/src/org/apache/fop/fo/FOAttributes.java @@ -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 Peter B. West + * @version $Revision$ $Name$ + */ +/** + * The FO Attributes data structures and methods needed to manage the + * Attributes associated with FO nodes. + */ + +public class FOAttributes { + + /** + * nSpaceAttrLists is an ArrayList to hold the array of + * HashMaps which contain the attribute lists for each + * namespace which may be active for a particular FO element. The + * ArrayList is indexed by the URIIndex for this namespace + * which is statically maintained by XMLEvent. The + * values in the HashMaps are indexed by the local name of the + * attribute. + * The ArrayList will not be created for a particular instance + * of FOAttributes unless a namespace other than the standard + * XSL namespace is activated for this instance. + * See foAttrList. + */ + private ArrayList nSpaceAttrLists; + + /** + * foAttrList is a HashMap to hold the FO namespace + * attribute list specified in the FO element with which this list is + * associated. The String attribute value is stored + * indexed by the integer constant property identifier from + * PropertyConsts. + */ + private HashMap foAttrList = new HashMap(0); + + private int DefAttrNSIndex = XMLEvent.DefAttrNSIndex; + + /** + * Construct an FOAttributes object from the startElement + * XMLEvent which triggered the construction of its parent + * element. + *

The Attributes 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 foAttrList Hashmap>/tt> indexed by the property + * index. + *

If the attribute does not belong to the default namespace, its + * value is entered into the appropriate HashMap in the + * ArrayList nSpaceAttrLists, indexed by the attribute's + * local name. + *

+ */ + 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 Map containing the the attribute + * values for all of the default attribute namespace attributes in this + * attribute list, indexed by the property name index from + * PropNames. + */ + public Map getFoAttrList() { + return Collections.unmodifiableMap((Map)foAttrList); + } + + /** + * A convenience method for accessing attribute values from the default + * attribute namespace. + * @param property an int containing the property name index + * from PropNames. + * @return a String 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 String containing the property name. + * @return a String containing the associated property value. + */ + public String getFoAttrValue(String propertyName) + throws PropertyException + { + return getFoAttrValue + (PropertyConsts.getPropertyIndex(propertyName)); + } + + /** + * @param uriIndex an int containing the index of the attribute + * values namespace, maintained in an XMLEvent static + * array. + * @return an unmodifiable Map of the attribute values + * within the indexed namespace, for this attribute list, indexed by the + * local name of the attribute. The Map returned is + * derived from the one maintained in nSpaceAttrLists. + */ + 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 int index of the URIs maintained + * by XMLEvent. + * @param localName a String with the local name of the + * attribute. In the case of the default attribute namespace, this + * will be the fo property name. + * @return a String 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 nSpaceAttrLists ArrayList + * containing attribute namespaces active in this set of attributes. + * N.B. this may be zero if only the default attribute + * namespace has been seen in the attribute set. + * @return an int 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 index 000000000..279bc50f2 --- /dev/null +++ b/src/org/apache/fop/fo/FOTree.java @@ -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 Peter B. West + * @version $Id$ + */ +/** + * FOTree is the class that generates and maintains the FO Tree. + * It runs as a thread, so it implements the run() method. + */ + +public class FOTree extends Tree implements Runnable { + + /** + * The buffer from which the XMLEvents from the parser will + * be read. protected 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. + *

+ * 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. + *

+ * 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 XMLEvents 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 Numeric containing the current font size + * @exception PropertyException if current font size is not defined, + * or is not expressed as a Numeric. + */ + 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 TextDecorations object containing the current + * text decorations + * @exception PropertyException if current text decorations are not + * defined, or are not expressed as TextDecorations. + */ + 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: int property index. + * @return a PropertyTriplet containing the latest property + * value elements for the indexed property. + */ + public PropertyTriplet getCurrentPropertyTriplet(int index) + throws PropertyException + { + return (PropertyTriplet)(propertyStacks[index].getLast()); + } + + /** + * @param index: int property index. + * @return a PropertyTriplet 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: int property index. + * @return a PropertyTriplet 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: int property index. + * @param value a PropertyTriplet 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: int property index. + * @return a PropertyValue 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 run method() invoked by the call of start + * 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 index 000000000..4895cf07c --- /dev/null +++ b/src/org/apache/fop/fo/FObject.java @@ -0,0 +1,30 @@ +/* + * FObject.java + * Created: Sun Jan 27 01:35:24 2002 + * + * @author Peter B. West + * @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 index 000000000..762144aaf --- /dev/null +++ b/src/org/apache/fop/fo/FObjectNames.java @@ -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 Peter B. West + * @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 XSLFO. + */ + 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 + * FO namespace. The array is effectively 1-based as the zero + * index does not correspond to any FO element. The list of + * int 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 index 000000000..70639cde6 --- /dev/null +++ b/src/org/apache/fop/fo/FObjects.java @@ -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 Peter B. West + * @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 HashSets indexed by the integer FO + * element constants. + * Each HashSet contains the set of properties that apply + * to the corresponding formatting object.. This array, and each + * HashSet 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 index 000000000..d7ff2dcfb --- /dev/null +++ b/src/org/apache/fop/fo/FoRoot.java @@ -0,0 +1,119 @@ +/** + * $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 Peter B. West + * @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; + +/**

+ * FoRoot is the class which processes the fo:root start element + * XML event. + *

+ * 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 + * buildFoTree() method of this class instance. + *

+ */ + +public class FoRoot extends FONode { + + private FoLayoutMasterSet layoutMasters; + + /** + * @param foTree the FO tree being built + * @param event the XMLEvent 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); + } + + /**

+ * 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. + *

+ * fo:root contents are
+ * (layout-master-set,declarations?,page-sequence+) + *

+ * I.e. the element is the parent of a two-element sequence: + * (layout-master-set-declarations),(page-sequence-sequence) + *

+ * '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. + *

+ * 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 index 000000000..b7d48bb6e --- /dev/null +++ b/src/org/apache/fop/fo/PropNames.java @@ -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 Peter B. West + * @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 XSLFO. */ + + 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 int index of the FO property. + * @return String 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 index 000000000..f217c6244 --- /dev/null +++ b/src/org/apache/fop/fo/Properties.java @@ -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 Peter B. West + * @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 int bitmap of datatype(s). + * @return String 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 ""; + if ((datatypes & INTEGER) != 0) typeNames += "|"; + if ((datatypes & NUMBER) != 0) typeNames += "|"; + if ((datatypes & LENGTH) != 0) typeNames += "|"; + if ((datatypes & ANGLE) != 0) typeNames += "|"; + if ((datatypes & PERCENTAGE) != 0) typeNames += "|"; + if ((datatypes & CHARACTER_T) != 0) typeNames += "|"; + if ((datatypes & STRING) != 0) typeNames += "|"; + if ((datatypes & NAME) != 0) typeNames += "|"; + if ((datatypes & COLOR_T) != 0) typeNames += "|"; + if ((datatypes & COUNTRY_T) != 0) typeNames += "|"; + if ((datatypes & LANGUAGE_T) != 0) typeNames += "|"; + if ((datatypes & SCRIPT_T) != 0) typeNames += "