|
fop 0.95 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.fop.fo.FONode
org.apache.fop.fo.XMLObj
public abstract class XMLObj
Abstract class modelling generic, non-XSL-FO XML objects. Such objects are stored in a DOM.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.apache.fop.fo.FONode |
---|
FONode.FONodeIterator |
Field Summary | |
---|---|
protected org.w3c.dom.Document |
doc
DOM document containing this node |
protected org.w3c.dom.Element |
element
DOM element representing this node |
protected java.lang.String |
name
Name of the node |
Fields inherited from class org.apache.fop.fo.FONode |
---|
FO_URI, FOX_URI, locator, log, parent, siblings |
Constructor Summary | |
---|---|
XMLObj(FONode parent)
|
Method Summary | |
---|---|
protected void |
addCharacters(char[] data,
int start,
int length,
PropertyList pList,
org.xml.sax.Locator locator)
Add parsed characters to this object |
protected void |
addChildNode(FONode child)
Adds a node as a child of this node. |
void |
addElement(org.w3c.dom.Document doc,
org.w3c.dom.Element parent)
Add an element to the DOM document |
void |
buildTopLevel(org.w3c.dom.Document doc,
org.w3c.dom.Element svgRoot)
Add the top-level element to the DOM document |
org.w3c.dom.Document |
createBasicDocument()
Create an empty DOM document |
java.awt.geom.Point2D |
getDimension(java.awt.geom.Point2D view)
Returns the dimensions of the generated area in pts. |
org.w3c.dom.Document |
getDOMDocument()
|
Length |
getIntrinsicAlignmentAdjust()
Retrieve the intrinsic alignment-adjust of the child element. |
java.lang.String |
getLocalName()
Returns the local name (i.e. |
void |
notifyObjectBuilt(java.lang.Object obj)
Notifies the listener when the object is fully built. |
void |
processNode(java.lang.String elementName,
org.xml.sax.Locator locator,
org.xml.sax.Attributes attlist,
PropertyList propertyList)
Initialize the node with its name, location information, and attributes The attributes must be used immediately as the sax attributes will be altered for the next element. |
protected void |
validateChildNode(org.xml.sax.Locator loc,
java.lang.String nsURI,
java.lang.String localName)
Checks to make sure, during SAX processing of input document, that the incoming node is valid for the 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 . |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected org.w3c.dom.Element element
protected org.w3c.dom.Document doc
protected java.lang.String name
Constructor Detail |
---|
public XMLObj(FONode parent)
parent
- the parent formatting objectMethod Detail |
---|
protected void validateChildNode(org.xml.sax.Locator loc, java.lang.String nsURI, java.lang.String localName) throws ValidationException
fo:table
is not an immediate child of fo:root
)
called from FOTreeBuilder.startElement(String, String, String, Attributes)
before constructing the child FObj
.
here, blocks XSL FO's from having non-FO parents.
validateChildNode
in class FONode
loc
- location in the FO source filensURI
- namespace of incoming nodelocalName
- name of the incoming node (without namespace prefix)
ValidationException
- if incoming node not valid for parentpublic void processNode(java.lang.String elementName, org.xml.sax.Locator locator, org.xml.sax.Attributes attlist, PropertyList propertyList) throws FOPException
processNode
in class FONode
elementName
- element name (e.g., "fo:block")locator
- Locator object (ignored by default)attlist
- Collection of attributes passed to us from the parser.propertyList
- the property list of the parent node
FOPException
- for errors or inconsistencies in the attributespublic org.w3c.dom.Document getDOMDocument()
public java.awt.geom.Point2D getDimension(java.awt.geom.Point2D view)
view
- Point2D instance to receive the dimensions
public Length getIntrinsicAlignmentAdjust()
public java.lang.String getLocalName()
getLocalName
in class FONode
public void addElement(org.w3c.dom.Document doc, org.w3c.dom.Element parent)
doc
- DOM document to which to add an elementparent
- the parent element of the element that is being addedpublic void buildTopLevel(org.w3c.dom.Document doc, org.w3c.dom.Element svgRoot)
doc
- DOM documentsvgRoot
- non-XSL-FO element to be added as the root of this documentpublic org.w3c.dom.Document createBasicDocument()
protected void addChildNode(FONode child)
addChildNode
in class FONode
child
- child node to be added to the childNodes of this nodeprotected void addCharacters(char[] data, int start, int length, PropertyList pList, org.xml.sax.Locator locator)
addCharacters
in class FONode
data
- array of characters contaning the text to addstart
- starting array element to addlength
- number of characters from the array to addpList
- the currently applicable property listlocator
- location in fo source file.public void notifyObjectBuilt(java.lang.Object obj)
notifyObjectBuilt
in interface ContentHandlerFactory.ObjectBuiltListener
obj
- the newly built object
|
fop 0.95 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |