|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.xalan.processor.XSLTElementDef
This class defines the allowed structure for an element in a XSLT stylesheet, is meant to reflect the structure defined in http://www.w3.org/TR/xslt#dtd, and the mapping between Xalan classes and the markup elements in the XSLT instance. This actually represents both text nodes and elements.
Field Summary | |
private XSLTAttributeDef[] |
m_attributes
The allowed attributes for this type. |
private Class |
m_classObject
If non-null, the class object that should in instantiated for a Xalan instance of this element. |
private XSLTElementProcessor |
m_elementProcessor
If non-null, the ContentHandler/TransformerFactory for this element. |
private XSLTElementDef[] |
m_elements
The allowed elements for this type. |
private boolean |
m_has_required
If true, this has a required element. |
(package private) boolean |
m_isOrdered
|
private int |
m_lastOrder
the highest order of child elements have appeared so far, or -1 if not ordered |
private boolean |
m_multiAllowed
True if this element can appear multiple times |
private String |
m_name
The name of this element. |
private String |
m_nameAlias
The name of this element. |
private String |
m_namespace
The allowed namespace for this element. |
private int |
m_order
the order that this element should appear, or -1 if not ordered |
private boolean |
m_required
If true, this is a required element. |
(package private) Hashtable |
m_requiredFound
|
private int |
m_type
The type of this element. |
(package private) static int |
T_ANY
Content type enumerations |
(package private) static int |
T_ELEMENT
Content type enumerations |
(package private) static int |
T_PCDATA
Content type enumerations |
Constructor Summary | |
(package private) |
XSLTElementDef()
Construct an instance of XSLTElementDef. |
(package private) |
XSLTElementDef(Class classObject,
XSLTElementProcessor contentHandler,
int type)
Construct an instance of XSLTElementDef that represents text. |
(package private) |
XSLTElementDef(XSLTSchema schema,
String namespace,
String name,
String nameAlias,
XSLTElementDef[] elements,
XSLTAttributeDef[] attributes,
XSLTElementProcessor contentHandler,
Class classObject)
Construct an instance of XSLTElementDef. |
(package private) |
XSLTElementDef(XSLTSchema schema,
String namespace,
String name,
String nameAlias,
XSLTElementDef[] elements,
XSLTAttributeDef[] attributes,
XSLTElementProcessor contentHandler,
Class classObject,
boolean has_required)
Construct an instance of XSLTElementDef. |
(package private) |
XSLTElementDef(XSLTSchema schema,
String namespace,
String name,
String nameAlias,
XSLTElementDef[] elements,
XSLTAttributeDef[] attributes,
XSLTElementProcessor contentHandler,
Class classObject,
boolean has_required,
boolean required)
Construct an instance of XSLTElementDef. |
(package private) |
XSLTElementDef(XSLTSchema schema,
String namespace,
String name,
String nameAlias,
XSLTElementDef[] elements,
XSLTAttributeDef[] attributes,
XSLTElementProcessor contentHandler,
Class classObject,
boolean has_required,
boolean required,
boolean has_order,
int order,
boolean multiAllowed)
Construct an instance of XSLTElementDef. |
(package private) |
XSLTElementDef(XSLTSchema schema,
String namespace,
String name,
String nameAlias,
XSLTElementDef[] elements,
XSLTAttributeDef[] attributes,
XSLTElementProcessor contentHandler,
Class classObject,
boolean has_required,
boolean required,
int order,
boolean multiAllowed)
Construct an instance of XSLTElementDef. |
(package private) |
XSLTElementDef(XSLTSchema schema,
String namespace,
String name,
String nameAlias,
XSLTElementDef[] elements,
XSLTAttributeDef[] attributes,
XSLTElementProcessor contentHandler,
Class classObject,
boolean has_order,
int order,
boolean multiAllowed)
Construct an instance of XSLTElementDef. |
(package private) |
XSLTElementDef(XSLTSchema schema,
String namespace,
String name,
String nameAlias,
XSLTElementDef[] elements,
XSLTAttributeDef[] attributes,
XSLTElementProcessor contentHandler,
Class classObject,
int order,
boolean multiAllowed)
Construct an instance of XSLTElementDef. |
Method Summary | |
(package private) void |
build(String namespace,
String name,
String nameAlias,
XSLTElementDef[] elements,
XSLTAttributeDef[] attributes,
XSLTElementProcessor contentHandler,
Class classObject)
Construct an instance of XSLTElementDef. |
private static boolean |
equalsMayBeNull(Object obj1,
Object obj2)
Tell if two objects are equal, when either one may be null. |
private static boolean |
equalsMayBeNullOrZeroLen(String s1,
String s2)
Tell if the two string refs are equal, equality being defined as: 1) Both strings are null. 2) One string is null and the other is empty. 3) Both strings are non-null, and equal. |
(package private) XSLTAttributeDef |
getAttributeDef(String uri,
String localName)
Given a namespace URI, and a local name, return the element's attribute definition, if it has one. |
(package private) XSLTAttributeDef[] |
getAttributes()
Get the allowed attributes for this type. |
(package private) Class |
getClassObject()
Return the class object that should in instantiated for a Xalan instance of this element. |
(package private) XSLTElementProcessor |
getElementProcessor()
Return the XSLTElementProcessor for this element. |
(package private) XSLTElementDef[] |
getElements()
Get the allowed elements for this type. |
(package private) int |
getLastOrder()
Get the highest order of child elements have appeared so far . |
(package private) boolean |
getMultiAllowed()
Get whether this element can appear multiple times |
(package private) String |
getName()
Get the local name of this element. |
(package private) String |
getNameAlias()
Get the name of this element. |
(package private) String |
getNamespace()
Get the allowed namespace for this element. |
(package private) int |
getOrder()
Get the order that this element should appear . |
(package private) XSLTElementProcessor |
getProcessorFor(String uri,
String localName)
Given a namespace URI, and a local name, get the processor for the element, or return null if not allowed. |
(package private) XSLTElementProcessor |
getProcessorForUnknown(String uri,
String localName)
Given an unknown element, get the processor for the element. |
(package private) boolean |
getRequired()
Get whether or not this is a required element. |
(package private) String |
getRequiredElem()
Get required elements that were not found. |
(package private) boolean |
getRequiredFound()
Get whether all required elements were found. |
(package private) int |
getType()
Get the type of this element. |
(package private) boolean |
hasRequired()
Get whether or not this has a required element. |
(package private) boolean |
isOrdered()
Get whether this element requires ordered children. |
private boolean |
QNameEquals(String uri,
String localName)
Tell if the namespace URI and local name match this element. |
(package private) void |
setElementProcessor(XSLTElementProcessor handler)
Set the XSLTElementProcessor for this element. |
(package private) void |
setElements(XSLTElementDef[] defs)
Set the allowed elements for this type. |
(package private) void |
setLastOrder(int order)
Set the highest order of child elements have appeared so far . |
(package private) void |
setRequiredFound(String elem,
boolean found)
Set this required element found. |
(package private) void |
setType(int t)
Set the type of this element. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
static final int T_ELEMENT
static final int T_PCDATA
static final int T_ANY
private int m_type
private String m_namespace
private String m_name
private String m_nameAlias
private XSLTElementDef[] m_elements
private XSLTAttributeDef[] m_attributes
private XSLTElementProcessor m_elementProcessor
private Class m_classObject
private boolean m_has_required
private boolean m_required
Hashtable m_requiredFound
boolean m_isOrdered
private int m_order
private int m_lastOrder
private boolean m_multiAllowed
Constructor Detail |
XSLTElementDef()
XSLTElementDef(XSLTSchema schema, String namespace, String name, String nameAlias, XSLTElementDef[] elements, XSLTAttributeDef[] attributes, XSLTElementProcessor contentHandler, Class classObject)
namespace
- The Namespace URI, "*", or null.name
- The local name (without prefix), "*", or null.nameAlias
- A potential alias for the name, or null.elements
- An array of allowed child element defs, or null.attributes
- An array of allowed attribute defs, or null.contentHandler
- The element processor for this element.classObject
- The class of the object that this element def should produce.XSLTElementDef(XSLTSchema schema, String namespace, String name, String nameAlias, XSLTElementDef[] elements, XSLTAttributeDef[] attributes, XSLTElementProcessor contentHandler, Class classObject, boolean has_required)
namespace
- The Namespace URI, "*", or null.name
- The local name (without prefix), "*", or null.nameAlias
- A potential alias for the name, or null.elements
- An array of allowed child element defs, or null.attributes
- An array of allowed attribute defs, or null.contentHandler
- The element processor for this element.classObject
- The class of the object that this element def should produce.has_required
- true if this element has required elements by the XSLT specification.XSLTElementDef(XSLTSchema schema, String namespace, String name, String nameAlias, XSLTElementDef[] elements, XSLTAttributeDef[] attributes, XSLTElementProcessor contentHandler, Class classObject, boolean has_required, boolean required)
namespace
- The Namespace URI, "*", or null.name
- The local name (without prefix), "*", or null.nameAlias
- A potential alias for the name, or null.elements
- An array of allowed child element defs, or null.attributes
- An array of allowed attribute defs, or null.contentHandler
- The element processor for this element.classObject
- The class of the object that this element def should produce.has_required
- true if this element has required elements by the XSLT specification.required
- true if this element is required by the XSLT specification.XSLTElementDef(XSLTSchema schema, String namespace, String name, String nameAlias, XSLTElementDef[] elements, XSLTAttributeDef[] attributes, XSLTElementProcessor contentHandler, Class classObject, boolean has_required, boolean required, int order, boolean multiAllowed)
namespace
- The Namespace URI, "*", or null.name
- The local name (without prefix), "*", or null.nameAlias
- A potential alias for the name, or null.elements
- An array of allowed child element defs, or null.attributes
- An array of allowed attribute defs, or null.contentHandler
- The element processor for this element.classObject
- The class of the object that this element def should produce.has_required
- true if this element has required elements by the XSLT specification.required
- true if this element is required by the XSLT specification.order
- the order this element should appear according to the XSLT specification.multiAllowed
- whether this element is allowed more than onceXSLTElementDef(XSLTSchema schema, String namespace, String name, String nameAlias, XSLTElementDef[] elements, XSLTAttributeDef[] attributes, XSLTElementProcessor contentHandler, Class classObject, boolean has_required, boolean required, boolean has_order, int order, boolean multiAllowed)
namespace
- The Namespace URI, "*", or null.name
- The local name (without prefix), "*", or null.nameAlias
- A potential alias for the name, or null.elements
- An array of allowed child element defs, or null.attributes
- An array of allowed attribute defs, or null.contentHandler
- The element processor for this element.classObject
- The class of the object that this element def should produce.has_required
- true if this element has required elements by the XSLT specification.required
- true if this element is required by the XSLT specification.has_order
- whether this element has ordered child elementsorder
- the order this element should appear according to the XSLT specification.multiAllowed
- whether this element is allowed more than onceXSLTElementDef(XSLTSchema schema, String namespace, String name, String nameAlias, XSLTElementDef[] elements, XSLTAttributeDef[] attributes, XSLTElementProcessor contentHandler, Class classObject, boolean has_order, int order, boolean multiAllowed)
namespace
- The Namespace URI, "*", or null.name
- The local name (without prefix), "*", or null.nameAlias
- A potential alias for the name, or null.elements
- An array of allowed child element defs, or null.attributes
- An array of allowed attribute defs, or null.contentHandler
- The element processor for this element.classObject
- The class of the object that this element def should produce.has_order
- whether this element has ordered child elementsorder
- the order this element should appear according to the XSLT specification.multiAllowed
- whether this element is allowed more than onceXSLTElementDef(XSLTSchema schema, String namespace, String name, String nameAlias, XSLTElementDef[] elements, XSLTAttributeDef[] attributes, XSLTElementProcessor contentHandler, Class classObject, int order, boolean multiAllowed)
namespace
- The Namespace URI, "*", or null.name
- The local name (without prefix), "*", or null.nameAlias
- A potential alias for the name, or null.elements
- An array of allowed child element defs, or null.attributes
- An array of allowed attribute defs, or null.contentHandler
- The element processor for this element.classObject
- The class of the object that this element def should produce.order
- the order this element should appear according to the XSLT specification.multiAllowed
- whether this element is allowed more than onceXSLTElementDef(Class classObject, XSLTElementProcessor contentHandler, int type)
classObject
- The class of the object that this element def should produce.contentHandler
- The element processor for this element.type
- Content type, one of T_ELEMENT, T_PCDATA, or T_ANY.Method Detail |
void build(String namespace, String name, String nameAlias, XSLTElementDef[] elements, XSLTAttributeDef[] attributes, XSLTElementProcessor contentHandler, Class classObject)
namespace
- The Namespace URI, "*", or null.name
- The local name (without prefix), "*", or null.nameAlias
- A potential alias for the name, or null.elements
- An array of allowed child element defs, or null.attributes
- An array of allowed attribute defs, or null.contentHandler
- The element processor for this element.classObject
- The class of the object that this element def should produce.private static boolean equalsMayBeNull(Object obj1, Object obj2)
obj1
- A reference to the first object, or null.obj2
- A reference to the second object, or null.
private static boolean equalsMayBeNullOrZeroLen(String s1, String s2)
s1
- A reference to the first string, or null.s2
- A reference to the second string, or null.
int getType()
void setType(int t)
t
- Content type, one of T_ELEMENT, T_PCDATA, or T_ANY.String getNamespace()
String getName()
String getNameAlias()
XSLTElementDef[] getElements()
void setElements(XSLTElementDef[] defs)
defs
- An array of allowed child element defs, or null.private boolean QNameEquals(String uri, String localName)
uri
- The namespace uri, which may be null.localName
- The local name of an element, which may be null.
XSLTElementProcessor getProcessorFor(String uri, String localName)
uri
- The Namespace URI, or an empty string.localName
- The local name (without prefix), or empty string if not namespace processing.
XSLTElementProcessor getProcessorForUnknown(String uri, String localName)
uri
- The Namespace URI, or an empty string.localName
- The local name (without prefix), or empty string if not namespace processing.
ProcessorUnknown
reference.ProcessorUnknown
XSLTAttributeDef[] getAttributes()
XSLTAttributeDef getAttributeDef(String uri, String localName)
uri
- The Namespace URI, or an empty string.localName
- The local name (without prefix), or empty string if not namespace processing.
XSLTElementProcessor getElementProcessor()
void setElementProcessor(XSLTElementProcessor handler)
handler
- The element processor for this element.Class getClassObject()
boolean hasRequired()
boolean getRequired()
void setRequiredFound(String elem, boolean found)
boolean getRequiredFound()
String getRequiredElem()
boolean isOrdered()
int getOrder()
int getLastOrder()
void setLastOrder(int order)
order
- the highest order of child elements have appeared so far.boolean getMultiAllowed()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |