org.apache.xalan.serialize
Class ElemDesc

java.lang.Object
  extended byorg.apache.xalan.serialize.ElemDesc

class ElemDesc
extends Object

This class is in support of SerializerToHTML, and acts as a sort of element representative for HTML elements.


Field Summary
(package private) static int ASPECIAL
          Bit position if this element type is ???.
(package private) static int ATTREMPTY
          Bit position if this attribute type is an empty type.
(package private) static int ATTRURL
          Bit position if this attribute type is a URL.
(package private) static int BLOCK
          Bit position if this element type is a block.
(package private) static int BLOCKFORM
          Bit position if this element type is a block form.
(package private) static int BLOCKFORMFIELDSET
          Bit position if this element type is a block form field set (??
(package private) static int CDATA
          Bit position if this element type is CDATA.
(package private) static int EMPTY
          Bit position if this element type is empty.
(package private) static int FLOW
          Bit position if this element type is a flow.
(package private) static int FONTSTYLE
          Bit position if this element type is a font style.
(package private) static int FORMCTRL
          Bit position if this element type is a form control.
(package private) static int HEAD
          Bit position if this element type is a head element (i.e.
(package private) static int HEADELEM
          Bit position if this element type is a header element (i.e.
(package private) static int HEADMISC
          Bit position if this element type is an odd header element.
(package private) static int INLINE
          Bit position if this element type should be inlined.
(package private) static int INLINEA
          Bit position if this element type is INLINEA (??
(package private) static int INLINELABEL
          Bit position if this element type is an inline label.
(package private) static int LIST
          Bit position if this element type is a list.
(package private)  StringToIntTable m_attrs
          Table of attribute names to integers, which contain bit flags telling about the attributes.
(package private)  int m_flags
          Bit flags to tell about this element type.
(package private) static int PCDATA
          Bit position if this element type is PCDATA.
(package private) static int PHRASE
          Bit position if this element type is a phrase.
(package private) static int PREFORMATTED
          Bit position if this element type is a preformatted type.
(package private) static int RAW
          Bit position if this element type is should be raw characters.
(package private) static int SPECIAL
          Bit position if this element type is ???.
(package private) static int WHITESPACESENSITIVE
          Bit position if this element type is whitespace sensitive.
 
Constructor Summary
(package private) ElemDesc(int flags)
          Construct an ElemDesc from a set of bit flags.
 
Method Summary
(package private)  boolean is(int flags)
          Tell if this element type has the basic bit properties that are passed as an argument.
(package private)  boolean isAttrFlagSet(String name, int flags)
          Tell if any of the bits of interest are set for a named attribute type.
(package private)  void setAttr(String name, int flags)
          Set an attribute name and it's bit properties.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_flags

int m_flags
Bit flags to tell about this element type.


m_attrs

StringToIntTable m_attrs
Table of attribute names to integers, which contain bit flags telling about the attributes.


EMPTY

static final int EMPTY
Bit position if this element type is empty.

See Also:
Constant Field Values

FLOW

static final int FLOW
Bit position if this element type is a flow.

See Also:
Constant Field Values

BLOCK

static final int BLOCK
Bit position if this element type is a block.

See Also:
Constant Field Values

BLOCKFORM

static final int BLOCKFORM
Bit position if this element type is a block form.

See Also:
Constant Field Values

BLOCKFORMFIELDSET

static final int BLOCKFORMFIELDSET
Bit position if this element type is a block form field set (?? -sb).

See Also:
Constant Field Values

CDATA

static final int CDATA
Bit position if this element type is CDATA.

See Also:
Constant Field Values

PCDATA

static final int PCDATA
Bit position if this element type is PCDATA.

See Also:
Constant Field Values

RAW

static final int RAW
Bit position if this element type is should be raw characters.

See Also:
Constant Field Values

INLINE

static final int INLINE
Bit position if this element type should be inlined.

See Also:
Constant Field Values

INLINEA

static final int INLINEA
Bit position if this element type is INLINEA (?? -sb).

See Also:
Constant Field Values

INLINELABEL

static final int INLINELABEL
Bit position if this element type is an inline label.

See Also:
Constant Field Values

FONTSTYLE

static final int FONTSTYLE
Bit position if this element type is a font style.

See Also:
Constant Field Values

PHRASE

static final int PHRASE
Bit position if this element type is a phrase.

See Also:
Constant Field Values

FORMCTRL

static final int FORMCTRL
Bit position if this element type is a form control.

See Also:
Constant Field Values

SPECIAL

static final int SPECIAL
Bit position if this element type is ???.

See Also:
Constant Field Values

ASPECIAL

static final int ASPECIAL
Bit position if this element type is ???.

See Also:
Constant Field Values

HEADMISC

static final int HEADMISC
Bit position if this element type is an odd header element.

See Also:
Constant Field Values

HEAD

static final int HEAD
Bit position if this element type is a head element (i.e. H1, H2, etc.)

See Also:
Constant Field Values

LIST

static final int LIST
Bit position if this element type is a list.

See Also:
Constant Field Values

PREFORMATTED

static final int PREFORMATTED
Bit position if this element type is a preformatted type.

See Also:
Constant Field Values

WHITESPACESENSITIVE

static final int WHITESPACESENSITIVE
Bit position if this element type is whitespace sensitive.

See Also:
Constant Field Values

HEADELEM

static final int HEADELEM
Bit position if this element type is a header element (i.e. HEAD).

See Also:
Constant Field Values

ATTRURL

static final int ATTRURL
Bit position if this attribute type is a URL.

See Also:
Constant Field Values

ATTREMPTY

static final int ATTREMPTY
Bit position if this attribute type is an empty type.

See Also:
Constant Field Values
Constructor Detail

ElemDesc

ElemDesc(int flags)
Construct an ElemDesc from a set of bit flags.

Parameters:
flags - Bit flags that describe the basic properties of this element type.
Method Detail

is

boolean is(int flags)
Tell if this element type has the basic bit properties that are passed as an argument.

Parameters:
flags - Bit flags that describe the basic properties of interest.
Returns:
true if any of the flag bits are true.

setAttr

void setAttr(String name,
             int flags)
Set an attribute name and it's bit properties.

Parameters:
name - non-null name of attribute, in upper case.
flags - flag bits.

isAttrFlagSet

boolean isAttrFlagSet(String name,
                      int flags)
Tell if any of the bits of interest are set for a named attribute type.

Parameters:
name - non-null reference to attribute name, in any case.
flags - flag mask.
Returns:
true if any of the flags are set for the named attribute.