com.sun.msv.grammar.relax
Class ElementRule

java.lang.Object
  |
  +--com.sun.msv.grammar.Expression
        |
        +--com.sun.msv.grammar.ElementExp
              |
              +--com.sun.msv.grammar.relax.ElementRule
All Implemented Interfaces:
NameClassAndExpression, Serializable

public class ElementRule
extends ElementExp

ElementRule declaration of RELAX.

Author:
Kohsuke KAWAGUCHI
See Also:
Serialized Form

Field Summary
 Expression attributeFreeContentModel
          Attribute-free content model
 TagClause clause
          constraints over start tag of the element
 
Fields inherited from class com.sun.msv.grammar.ElementExp
contentModel, ignoreUndeclaredAttributes
 
Fields inherited from class com.sun.msv.grammar.Expression
anyString, epsilon, nullSet, verifierTag
 
Constructor Summary
ElementRule(ExpressionPool pool, TagClause clause, Expression contentModel)
           
 
Method Summary
 NameClass getNameClass()
          obtains a constraint over tag name.
 ElementRules getParent()
          gets the parent ElementRules object.
 
Methods inherited from class com.sun.msv.grammar.ElementExp
equals, getContentModel, visit, visit, visit, visit
 
Methods inherited from class com.sun.msv.grammar.Expression
hashCode, isEpsilonReducible, visit, visit, visit, visit
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

clause

public final TagClause clause
constraints over start tag of the element

attributeFreeContentModel

public final Expression attributeFreeContentModel
Attribute-free content model
Constructor Detail

ElementRule

public ElementRule(ExpressionPool pool,
                   TagClause clause,
                   Expression contentModel)
Method Detail

getParent

public ElementRules getParent()
gets the parent ElementRules object. when this object is used as a named, no-inline elementRule, this variable holds a reference to the parent ElementRules object. otherwise, null

getNameClass

public final NameClass getNameClass()
Description copied from class: ElementExp
obtains a constraint over tag name. ElementExp is cannot be shared because NameClass has to be mutable to absorb the difference of RELAX and TREX. In case of TREX, name class will be determined when parsing ElementExp itself. Thus effectively it's immutable. In case of RELAX, name class will be determined when its corresponding Clause object is parsed.
Overrides:
getNameClass in class ElementExp