org.foray.fotree.xml
Class NamespaceXML

java.lang.Object
  extended by org.foray.fotree.Namespace
      extended by org.foray.fotree.xml.NamespaceXML

public class NamespaceXML
extends Namespace

This class manages the namespace that is used for elements with the "xml:" prefix.


Constructor Summary
NamespaceXML()
          Constructor.
 
Method Summary
protected  PropertyList createNewPropertyList(Attributes attlist)
          Return a newly-created appropriate PropertyList for this namespace.
 String getNamespaceURI()
          Returns the URI for this namespace.
 String getTypicalPrefix()
          Returns the typical prefix for this namespace, minus the ":".
 Property parseAttributeForNS(Attributes attributes, String attributeName, String attributeValue, FObj fobj, Locator locator)
          Parses one attribute in this namespace.
 void parseAttributes(PropertyList propertyList, Attributes attlist, FObj currentFObj, Locator locator, FOTreeBuilder builder)
          Parse the attributes for an element in this namespace.
 FObj parseElementForNS(String localName, FObj currentFObj, PropertyList list, Locator locator)
          The namespace-specific logic for paring an element.
 
Methods inherited from class org.foray.fotree.Namespace
formatLocator, makeList, parseAttribute, parseElement, reset, sortAttributes
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NamespaceXML

public NamespaceXML()
Constructor.

Method Detail

getNamespaceURI

public String getNamespaceURI()
Description copied from class: Namespace
Returns the URI for this namespace.

Specified by:
getNamespaceURI in class Namespace
Returns:
URI for this namespace.

getTypicalPrefix

public String getTypicalPrefix()
Description copied from class: Namespace
Returns the typical prefix for this namespace, minus the ":". For example, the SVG namespace should return "svg".

Specified by:
getTypicalPrefix in class Namespace
Returns:
The typical prefix for this namespace.

parseElementForNS

public FObj parseElementForNS(String localName,
                              FObj currentFObj,
                              PropertyList list,
                              Locator locator)
                       throws org.axsl.fo.FoTreeException
Description copied from class: Namespace
The namespace-specific logic for paring an element.

Specified by:
parseElementForNS in class Namespace
Parameters:
localName - The local name of the element.
currentFObj - The current FObj, that is, the parent of the one being parsed.
list - The property list into which properties for the new FObj should be placed.
locator - The SAX locator.
Returns:
The newly-created FObj instance.
Throws:
org.axsl.fo.FoTreeException - For parsing errors.

parseAttributes

public void parseAttributes(PropertyList propertyList,
                            Attributes attlist,
                            FObj currentFObj,
                            Locator locator,
                            FOTreeBuilder builder)
Description copied from class: Namespace
Parse the attributes for an element in this namespace.

Specified by:
parseAttributes in class Namespace
Parameters:
propertyList - The property list into which the parsed values should be placed.
attlist - The unparsed SAX attributes.
currentFObj - The FObj instance to whom the attributes belong.
locator - The SAX locator.
builder - The FOTree builder.

parseAttributeForNS

public Property parseAttributeForNS(Attributes attributes,
                                    String attributeName,
                                    String attributeValue,
                                    FObj fobj,
                                    Locator locator)
                             throws PropertyException
Description copied from class: Namespace
Parses one attribute in this namespace.

Specified by:
parseAttributeForNS in class Namespace
Parameters:
attributes - The unparsed SAX attributes.
attributeName - The name of the attribute to be parsed.
attributeValue - The value of the attribute to be parsed.
fobj - The FObj to which the properties belongs.
locator - The SAX locator.
Returns:
The parsed property.
Throws:
PropertyException - For errors during parsing.

createNewPropertyList

protected PropertyList createNewPropertyList(Attributes attlist)
Description copied from class: Namespace
Return a newly-created appropriate PropertyList for this namespace.

Specified by:
createNewPropertyList in class Namespace
Parameters:
attlist - The attributes that will become the properties in the list.
Returns:
The newly-created property list.


Copyright © 2017. All rights reserved.