org.merlotxml.util.xml
Interface DTDContentSpecNode


public interface DTDContentSpecNode

Interface to specify a ContentSpecification node.

This is used to describe the content specification of what a DTD element can contain.

Example from a DTD: (el1?, el2+ (el3 | el4 | el5)*)

Each node is part of a tree and has a type. CONTENT_GROUP nodes correspond to a ( ) delimted container, a CONTENT_SINGLE node would be a single element leaf with no ordinality specified. (like 'el3' in the above example)

 Possible types:
 CONTENT_GROUP:    ( stuff between parens ) getLeft returns the first node
                                            getRight returns null
 CONTENT_OR:       el3 | el4                getLeft returns the first leaf
                                            getRight returns a leaf or
                                              another non-leaf
 CONTENT_CONCAT    el1?, el2+               getLeft, getRight acts the same
                                              as in CONTENT_OR

 Possible ordinalities:
 CONTENT_SINGLE:   node with no ordinality  i.e. 'el3'
 CONTENT_STAR:     node with zero to many   i.e. '(el3 | el4 | el5)*'
 CONTENT_PLUS:     node with at least one   i.e. 'el2+'
 CONTENT_ONEMAX:   node with at most one    i.e. 'el1?'
 

Author:
Kelly A. Campbell

Method Summary
 DTDContentSpecNode getLeft()
           
 java.lang.String getName()
           
 int getOrdinality()
           
 DTDContentSpecNode getRight()
           
 int getType()
           
 boolean isLeaf()
           
 

Method Detail

getName

public java.lang.String getName()

getType

public int getType()

getOrdinality

public int getOrdinality()

isLeaf

public boolean isLeaf()

getLeft

public DTDContentSpecNode getLeft()

getRight

public DTDContentSpecNode getRight()