FileDocCategorySizeDatePackage
ElemDesc.javaAPI DocJava SE 5 API5400Fri Aug 26 14:56:02 BST 2005com.sun.org.apache.xml.internal.serializer

ElemDesc

public final class ElemDesc extends Object
This class has a series of flags (bit values) that describe an HTML element

Fields Summary
int
m_flags
Bit flags to tell about this element type.
StringToIntTable
m_attrs
Table of attribute names to integers, which contain bit flags telling about the attributes.
public static final int
EMPTY
Bit position if this element type is empty.
public static final int
FLOW
Bit position if this element type is a flow.
public static final int
BLOCK
Bit position if this element type is a block.
public static final int
BLOCKFORM
Bit position if this element type is a block form.
public static final int
BLOCKFORMFIELDSET
Bit position if this element type is a block form field set (?? -sb).
public static final int
CDATA
Bit position if this element type is CDATA.
public static final int
PCDATA
Bit position if this element type is PCDATA.
public static final int
RAW
Bit position if this element type is should be raw characters.
public static final int
INLINE
Bit position if this element type should be inlined.
public static final int
INLINEA
Bit position if this element type is INLINEA (?? -sb).
public static final int
INLINELABEL
Bit position if this element type is an inline label.
public static final int
FONTSTYLE
Bit position if this element type is a font style.
public static final int
PHRASE
Bit position if this element type is a phrase.
public static final int
FORMCTRL
Bit position if this element type is a form control.
public static final int
SPECIAL
Bit position if this element type is ???.
public static final int
ASPECIAL
Bit position if this element type is ???.
public static final int
HEADMISC
Bit position if this element type is an odd header element.
public static final int
HEAD
Bit position if this element type is a head element (i.e. H1, H2, etc.)
public static final int
LIST
Bit position if this element type is a list.
public static final int
PREFORMATTED
Bit position if this element type is a preformatted type.
public static final int
WHITESPACESENSITIVE
Bit position if this element type is whitespace sensitive.
public static final int
HEADELEM
Bit position if this element type is a header element (i.e. HEAD).
public static final int
ATTRURL
Bit position if this attribute type is a URL.
public static final int
ATTREMPTY
Bit position if this attribute type is an empty type.
Constructors Summary
public ElemDesc(int flags)
Construct an ElemDesc from a set of bit flags.

param
flags Bit flags that describe the basic properties of this element type.


                               
      
    
        m_flags = flags;
    
Methods Summary
public intgetFlags()

        return m_flags;
    
public booleanis(int flags)
Tell if this element type has the basic bit properties that are passed as an argument.

param
flags Bit flags that describe the basic properties of interest.
return
true if any of the flag bits are true.


        // int which = (m_flags & flags);
        return (m_flags & flags) != 0;
    
public booleanisAttrFlagSet(java.lang.String name, int flags)
Tell if any of the bits of interest are set for a named attribute type.

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

        return (null != m_attrs)
            ? ((m_attrs.getIgnoreCase(name) & flags) != 0)
            : false;
    
public voidsetAttr(java.lang.String name, int flags)
Set an attribute name and it's bit properties.

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


        if (null == m_attrs)
            m_attrs = new StringToIntTable();

        m_attrs.put(name, flags);