|
fop 1.1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.fop.util.XMLUtil
public final class XMLUtil
A collection of utility method for XML handling.
| Field Summary |
|---|
| Fields inherited from interface org.apache.fop.util.XMLConstants |
|---|
CDATA, XLINK_HREF, XLINK_NAMESPACE, XLINK_PREFIX, XML_NAMESPACE, XML_PREFIX, XML_SPACE, XMLNS_NAMESPACE_URI, XMLNS_PREFIX |
| Method Summary | |
|---|---|
static void |
addAttribute(org.xml.sax.helpers.AttributesImpl atts,
org.apache.xmlgraphics.util.QName attribute,
java.lang.String value)
Adds an attribute to a given AttributesImpl instance. |
static void |
addAttribute(org.xml.sax.helpers.AttributesImpl atts,
java.lang.String localName,
java.lang.String value)
Adds an attribute to a given AttributesImpl instance. |
static int[][] |
decodePositionAdjustments(java.lang.String value)
Decode a string as a glyph position adjustments array, where the string shall adhere to the syntax specified by encodePositionAdjustments(int[][], int). |
static java.lang.String |
encodePositionAdjustments(int[][] dp)
Encode a glyph position adjustments array as a string, where the string value adheres to the following syntax: count ( 'Z' repeat | number ) where each token is separated by whitespace, except that 'Z' followed by repeat are considered to be a single token with no intervening whitespace. |
static java.lang.String |
encodePositionAdjustments(int[][] dp,
int paCount)
Encode a glyph position adjustments array as a string, where the string value adheres to the following syntax: count ( 'Z' repeat | number ) where each token is separated by whitespace, except that 'Z' followed by repeat are considered to be a single token with no intervening whitespace, and where 'Z' repeat encodes repeated zeroes. |
static boolean |
getAttributeAsBoolean(org.xml.sax.Attributes attributes,
java.lang.String name,
boolean defaultValue)
Returns an attribute value as a boolean value. |
static int |
getAttributeAsInt(org.xml.sax.Attributes attributes,
java.lang.String name)
Returns an attribute value as a int value. |
static int |
getAttributeAsInt(org.xml.sax.Attributes attributes,
java.lang.String name,
int defaultValue)
Returns an attribute value as a int value. |
static int[] |
getAttributeAsIntArray(org.xml.sax.Attributes attributes,
java.lang.String name)
Returns an attribute value as a integer array. |
static java.lang.Integer |
getAttributeAsInteger(org.xml.sax.Attributes attributes,
java.lang.String name)
Returns an attribute value as a Integer value. |
static int[][] |
getAttributeAsPositionAdjustments(org.xml.sax.Attributes attributes,
java.lang.String name)
Returns an attribute value as a glyph position adjustments array. |
static java.awt.Rectangle |
getAttributeAsRectangle(org.xml.sax.Attributes attributes,
java.lang.String name)
Returns an attribute value as a Rectangle value. |
static java.awt.geom.Rectangle2D |
getAttributeAsRectangle2D(org.xml.sax.Attributes attributes,
java.lang.String name)
Returns an attribute value as a Rectangle2D value. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static boolean getAttributeAsBoolean(org.xml.sax.Attributes attributes,
java.lang.String name,
boolean defaultValue)
attributes - the Attributes objectname - the name of the attributedefaultValue - the default value if the attribute is not specified
public static int getAttributeAsInt(org.xml.sax.Attributes attributes,
java.lang.String name,
int defaultValue)
attributes - the Attributes objectname - the name of the attributedefaultValue - the default value if the attribute is not specified
public static int getAttributeAsInt(org.xml.sax.Attributes attributes,
java.lang.String name)
throws org.xml.sax.SAXException
attributes - the Attributes objectname - the name of the attribute
org.xml.sax.SAXException - if the attribute is missing
public static java.lang.Integer getAttributeAsInteger(org.xml.sax.Attributes attributes,
java.lang.String name)
attributes - the Attributes objectname - the name of the attribute
public static java.awt.geom.Rectangle2D getAttributeAsRectangle2D(org.xml.sax.Attributes attributes,
java.lang.String name)
attributes - the Attributes objectname - the name of the attribute
public static java.awt.Rectangle getAttributeAsRectangle(org.xml.sax.Attributes attributes,
java.lang.String name)
attributes - the Attributes objectname - the name of the attribute
public static int[] getAttributeAsIntArray(org.xml.sax.Attributes attributes,
java.lang.String name)
attributes - the Attributes objectname - the name of the attribute
public static void addAttribute(org.xml.sax.helpers.AttributesImpl atts,
org.apache.xmlgraphics.util.QName attribute,
java.lang.String value)
AttributesImpl instance.
atts - the attributes collectionattribute - the attribute to addvalue - the attribute's CDATA value
public static void addAttribute(org.xml.sax.helpers.AttributesImpl atts,
java.lang.String localName,
java.lang.String value)
AttributesImpl instance. The attribute will be
added in the default namespace.
atts - the attributes collectionlocalName - the local name of the attributevalue - the attribute's CDATA value
public static java.lang.String encodePositionAdjustments(int[][] dp,
int paCount)
dp - the adjustments arraypaCount - the number of entries to encode from adjustments array
public static java.lang.String encodePositionAdjustments(int[][] dp)
dp - the adjustments array
public static int[][] decodePositionAdjustments(java.lang.String value)
encodePositionAdjustments(int[][], int).
value - the encoded value
public static int[][] getAttributeAsPositionAdjustments(org.xml.sax.Attributes attributes,
java.lang.String name)
attributes - the Attributes objectname - the name of the attribute
|
fop 1.1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||