| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.xalan.processor.XSLTElementDef
public class 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_attributesThe allowed attributes for this type. | 
| private  java.lang.Class | m_classObjectIf non-null, the class object that should in instantiated for a Xalan instance of this element. | 
| private  XSLTElementProcessor | m_elementProcessorIf non-null, the ContentHandler/TransformerFactory for this element. | 
| private  XSLTElementDef[] | m_elementsThe allowed elements for this type. | 
| private  boolean | m_has_requiredIf true, this has a required element. | 
| (package private)  boolean | m_isOrdered | 
| private  int | m_lastOrderthe highest order of child elements have appeared so far, or -1 if not ordered | 
| private  boolean | m_multiAllowedTrue if this element can appear multiple times | 
| private  java.lang.String | m_nameThe name of this element. | 
| private  java.lang.String | m_nameAliasThe name of this element. | 
| private  java.lang.String | m_namespaceThe allowed namespace for this element. | 
| private  int | m_orderthe order that this element should appear, or -1 if not ordered | 
| private  boolean | m_requiredIf true, this is a required element. | 
| (package private)  java.util.Hashtable | m_requiredFound | 
| private  int | m_typeThe type of this element. | 
| (package private) static int | T_ANYContent type enumerations | 
| (package private) static int | T_ELEMENTContent type enumerations | 
| (package private) static int | T_PCDATAContent type enumerations | 
| Constructor Summary | |
|---|---|
| XSLTElementDef()Construct an instance of XSLTElementDef. | |
| XSLTElementDef(java.lang.Class classObject,
                             XSLTElementProcessor contentHandler,
                             int type)Construct an instance of XSLTElementDef that represents text. | |
| XSLTElementDef(XSLTSchema schema,
                             java.lang.String namespace,
                             java.lang.String name,
                             java.lang.String nameAlias,
                             XSLTElementDef[] elements,
                             XSLTAttributeDef[] attributes,
                             XSLTElementProcessor contentHandler,
                             java.lang.Class classObject)Construct an instance of XSLTElementDef. | |
| XSLTElementDef(XSLTSchema schema,
                             java.lang.String namespace,
                             java.lang.String name,
                             java.lang.String nameAlias,
                             XSLTElementDef[] elements,
                             XSLTAttributeDef[] attributes,
                             XSLTElementProcessor contentHandler,
                             java.lang.Class classObject,
                             boolean has_required)Construct an instance of XSLTElementDef. | |
| XSLTElementDef(XSLTSchema schema,
                             java.lang.String namespace,
                             java.lang.String name,
                             java.lang.String nameAlias,
                             XSLTElementDef[] elements,
                             XSLTAttributeDef[] attributes,
                             XSLTElementProcessor contentHandler,
                             java.lang.Class classObject,
                             boolean has_required,
                             boolean required)Construct an instance of XSLTElementDef. | |
| XSLTElementDef(XSLTSchema schema,
                             java.lang.String namespace,
                             java.lang.String name,
                             java.lang.String nameAlias,
                             XSLTElementDef[] elements,
                             XSLTAttributeDef[] attributes,
                             XSLTElementProcessor contentHandler,
                             java.lang.Class classObject,
                             boolean has_required,
                             boolean required,
                             boolean has_order,
                             int order,
                             boolean multiAllowed)Construct an instance of XSLTElementDef. | |
| XSLTElementDef(XSLTSchema schema,
                             java.lang.String namespace,
                             java.lang.String name,
                             java.lang.String nameAlias,
                             XSLTElementDef[] elements,
                             XSLTAttributeDef[] attributes,
                             XSLTElementProcessor contentHandler,
                             java.lang.Class classObject,
                             boolean has_required,
                             boolean required,
                             int order,
                             boolean multiAllowed)Construct an instance of XSLTElementDef. | |
| XSLTElementDef(XSLTSchema schema,
                             java.lang.String namespace,
                             java.lang.String name,
                             java.lang.String nameAlias,
                             XSLTElementDef[] elements,
                             XSLTAttributeDef[] attributes,
                             XSLTElementProcessor contentHandler,
                             java.lang.Class classObject,
                             boolean has_order,
                             int order,
                             boolean multiAllowed)Construct an instance of XSLTElementDef. | |
| XSLTElementDef(XSLTSchema schema,
                             java.lang.String namespace,
                             java.lang.String name,
                             java.lang.String nameAlias,
                             XSLTElementDef[] elements,
                             XSLTAttributeDef[] attributes,
                             XSLTElementProcessor contentHandler,
                             java.lang.Class classObject,
                             int order,
                             boolean multiAllowed)Construct an instance of XSLTElementDef. | |
| Method Summary | |
|---|---|
| (package private)  void | build(java.lang.String namespace,
           java.lang.String name,
           java.lang.String nameAlias,
           XSLTElementDef[] elements,
           XSLTAttributeDef[] attributes,
           XSLTElementProcessor contentHandler,
           java.lang.Class classObject)Construct an instance of XSLTElementDef. | 
| private static boolean | equalsMayBeNull(java.lang.Object obj1,
                               java.lang.Object obj2)Tell if two objects are equal, when either one may be null. | 
| private static boolean | equalsMayBeNullOrZeroLen(java.lang.String s1,
                                                 java.lang.String s2)Tell if the two string refs are equal, equality being defined as: 1) Both strings are null. | 
| (package private)  XSLTAttributeDef | getAttributeDef(java.lang.String uri,
                               java.lang.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)  java.lang.Class | getClassObject()Return the class object that should in instantiated for a Xalan instance of this element. | 
|  XSLTElementProcessor | getElementProcessor()Return the XSLTElementProcessor for this element. | 
|  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)  java.lang.String | getName()Get the local name of this element. | 
| (package private)  java.lang.String | getNameAlias()Get the name of this element. | 
| (package private)  java.lang.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(java.lang.String uri,
                               java.lang.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(java.lang.String uri,
                                             java.lang.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)  java.lang.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(java.lang.String uri,
                       java.lang.String localName)Tell if the namespace URI and local name match this element. | 
|  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(java.lang.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 java.lang.String m_namespace
private java.lang.String m_name
private java.lang.String m_nameAlias
private XSLTElementDef[] m_elements
private XSLTAttributeDef[] m_attributes
private XSLTElementProcessor m_elementProcessor
private java.lang.Class m_classObject
private boolean m_has_required
private boolean m_required
java.util.Hashtable m_requiredFound
boolean m_isOrdered
private int m_order
private int m_lastOrder
private boolean m_multiAllowed
| Constructor Detail | 
|---|
XSLTElementDef()
XSLTElementDef(XSLTSchema schema,
               java.lang.String namespace,
               java.lang.String name,
               java.lang.String nameAlias,
               XSLTElementDef[] elements,
               XSLTAttributeDef[] attributes,
               XSLTElementProcessor contentHandler,
               java.lang.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,
               java.lang.String namespace,
               java.lang.String name,
               java.lang.String nameAlias,
               XSLTElementDef[] elements,
               XSLTAttributeDef[] attributes,
               XSLTElementProcessor contentHandler,
               java.lang.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,
               java.lang.String namespace,
               java.lang.String name,
               java.lang.String nameAlias,
               XSLTElementDef[] elements,
               XSLTAttributeDef[] attributes,
               XSLTElementProcessor contentHandler,
               java.lang.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,
               java.lang.String namespace,
               java.lang.String name,
               java.lang.String nameAlias,
               XSLTElementDef[] elements,
               XSLTAttributeDef[] attributes,
               XSLTElementProcessor contentHandler,
               java.lang.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 once
XSLTElementDef(XSLTSchema schema,
               java.lang.String namespace,
               java.lang.String name,
               java.lang.String nameAlias,
               XSLTElementDef[] elements,
               XSLTAttributeDef[] attributes,
               XSLTElementProcessor contentHandler,
               java.lang.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 once
XSLTElementDef(XSLTSchema schema,
               java.lang.String namespace,
               java.lang.String name,
               java.lang.String nameAlias,
               XSLTElementDef[] elements,
               XSLTAttributeDef[] attributes,
               XSLTElementProcessor contentHandler,
               java.lang.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 once
XSLTElementDef(XSLTSchema schema,
               java.lang.String namespace,
               java.lang.String name,
               java.lang.String nameAlias,
               XSLTElementDef[] elements,
               XSLTAttributeDef[] attributes,
               XSLTElementProcessor contentHandler,
               java.lang.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 once
XSLTElementDef(java.lang.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(java.lang.String namespace,
           java.lang.String name,
           java.lang.String nameAlias,
           XSLTElementDef[] elements,
           XSLTAttributeDef[] attributes,
           XSLTElementProcessor contentHandler,
           java.lang.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(java.lang.Object obj1,
                                       java.lang.Object obj2)
obj1 - A reference to the first object, or null.obj2 - A reference to the second object, or null.
private static boolean equalsMayBeNullOrZeroLen(java.lang.String s1,
                                                java.lang.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.java.lang.String getNamespace()
java.lang.String getName()
java.lang.String getNameAlias()
public XSLTElementDef[] getElements()
void setElements(XSLTElementDef[] defs)
defs - An array of allowed child element defs, or null.
private boolean QNameEquals(java.lang.String uri,
                            java.lang.String localName)
uri - The namespace uri, which may be null.localName - The local name of an element, which may be null.
XSLTElementProcessor getProcessorFor(java.lang.String uri,
                                     java.lang.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(java.lang.String uri,
                                            java.lang.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.ProcessorUnknownXSLTAttributeDef[] getAttributes()
XSLTAttributeDef getAttributeDef(java.lang.String uri,
                                 java.lang.String localName)
uri - The Namespace URI, or an empty string.localName - The local name (without prefix), or empty string if not namespace processing.
public XSLTElementProcessor getElementProcessor()
public void setElementProcessor(XSLTElementProcessor handler)
handler - The element processor for this element.java.lang.Class getClassObject()
boolean hasRequired()
boolean getRequired()
void setRequiredFound(java.lang.String elem,
                      boolean found)
boolean getRequiredFound()
java.lang.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 | |||||||||