Class Declarations

  • All Implemented Interfaces:
    java.lang.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 Detail

      • Declarations

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

      • 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​(org.xml.sax.Locator loc,
                                         java.lang.String nsURI,
                                         java.lang.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 FONode
        Throws:
        FOPException - if there's a problem during processing
      • getLocalName

        public java.lang.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
      • getColorProfile

        public ColorProfile getColorProfile​(java.lang.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