Class Declarations

java.lang.Object
org.apache.fop.fo.FONode
org.apache.fop.fo.FObj
org.apache.fop.fo.pagination.Declarations
All Implemented Interfaces:
Cloneable, Constants

public class Declarations extends FObj
Class modelling the fo:declarations object. A declarations formatting object holds a set of color-profiles and optionally additional non-XSL namespace elements. The color-profiles are held in a hashmap for use with color-profile references.
  • Constructor Details

    • Declarations

      public Declarations(FONode parent)
      Parameters:
      parent - FONode that is the parent of this object
  • Method Details

    • bind

      public void bind(PropertyList pList) throws FOPException
      Bind property values from the property list to the FO node. Must be overridden in all FObj subclasses that have properties applying to it.
      Overrides:
      bind in class FObj
      Parameters:
      pList - the PropertyList where the properties can be found.
      Throws:
      FOPException - if there is a problem binding the values
    • validateChildNode

      protected void validateChildNode(Locator loc, String nsURI, String localName) throws ValidationException
      Checks to make sure, during SAX processing of input document, that the incoming node is valid for this (parent) node (e.g., checking to see that fo:table is not an immediate child of fo:root) called from FOTreeBuilder.startElement(String, String, String, Attributes) before constructing the child FObj.
      XSL 1.0: (color-profile)+ (and non-XSL NS nodes)
      FOP/XSL 1.1: (color-profile)* (and non-XSL NS nodes)
      Overrides:
      validateChildNode in class FONode
      Parameters:
      loc - location in the FO source file
      nsURI - namespace of incoming node
      localName - name of the incoming node (without namespace prefix)
      Throws:
      ValidationException - if incoming node not valid for parent
    • endOfNode

      public void endOfNode() throws FOPException
      At the end of this element sort out the children into a hashmap of color profiles and a list of extension attachments.
      Overrides:
      endOfNode in class FObj
      Throws:
      FOPException - if there's a problem during processing
    • getLocalName

      public String getLocalName()
      Returns the local name (i.e. without namespace prefix) of the node
      Specified by:
      getLocalName in class FONode
      Returns:
      the local name of this node
    • getNameId

      public int getNameId()
      Returns the Constants class integer value of this node
      Overrides:
      getNameId in class FONode
      Returns:
      Constants.FO_DECLARATIONS
    • getColorProfile

      public ColorProfile getColorProfile(String cpName)
      Return ColorProfile with given name.
      Parameters:
      cpName - Name of ColorProfile, i.e. the value of the color-profile-name attribute of the fo:color-profile element
      Returns:
      The org.apache.fop.fo.pagination.ColorProfile object associated with this color-profile-name or null