private void contentSpecTree(int contentSpecIndex,XMLContentSpec contentSpec,ChildrenList children){
  getContentSpec(contentSpecIndex,contentSpec);
  if (contentSpec.type == XMLContentSpec.CONTENTSPECNODE_LEAF || (contentSpec.type & 0x0f) == XMLContentSpec.CONTENTSPECNODE_ANY || (contentSpec.type & 0x0f) == XMLContentSpec.CONTENTSPECNODE_ANY_LOCAL || (contentSpec.type & 0x0f) == XMLContentSpec.CONTENTSPECNODE_ANY_OTHER) {
    if (children.length == children.qname.length) {
      QName[] newQName=new QName[children.length * 2];
      System.arraycopy(children.qname,0,newQName,0,children.length);
      children.qname=newQName;
      int[] newType=new int[children.length * 2];
      System.arraycopy(children.type,0,newType,0,children.length);
      children.type=newType;
    }
    children.qname[children.length]=new QName(null,(String)contentSpec.value,(String)contentSpec.value,(String)contentSpec.otherValue);
    children.type[children.length]=contentSpec.type;
    children.length++;
    return;
  }
  final int leftNode=contentSpec.value != null ? ((int[])(contentSpec.value))[0] : -1;
  int rightNode=-1;
  if (contentSpec.otherValue != null)   rightNode=((int[])(contentSpec.otherValue))[0];
 else   return;
  if (contentSpec.type == XMLContentSpec.CONTENTSPECNODE_CHOICE || contentSpec.type == XMLContentSpec.CONTENTSPECNODE_SEQ) {
    contentSpecTree(leftNode,contentSpec,children);
    contentSpecTree(rightNode,contentSpec,children);
    return;
  }
  if (contentSpec.type == XMLContentSpec.CONTENTSPECNODE_ZERO_OR_ONE || contentSpec.type == XMLContentSpec.CONTENTSPECNODE_ZERO_OR_MORE || contentSpec.type == XMLContentSpec.CONTENTSPECNODE_ONE_OR_MORE) {
    contentSpecTree(leftNode,contentSpec,children);
    return;
  }
  throw new RuntimeException("Invalid content spec type seen in contentSpecTree() method of AbstractDTDGrammar class : " + contentSpec.type);
}

private void contentSpecTree ( int contentSpecIndex , XMLContentSpec contentSpec , ChildrenList children ) { getContentSpec ( contentSpecIndex , contentSpec ) ; if ( contentSpec . type == XMLContentSpec . CONTENTSPECNODE_LEAF || ( contentSpec . type & 0x0f ) == XMLContentSpec . CONTENTSPECNODE_ANY || ( contentSpec . type & 0x0f ) == XMLContentSpec . CONTENTSPECNODE_ANY_LOCAL || ( contentSpec . type & 0x0f ) == XMLContentSpec . CONTENTSPECNODE_ANY_OTHER ) { if ( children . length == children . qname . length ) { QName [ ] newQName = new QName [ children . length * 2 ] ; System . arraycopy ( children . qname , 0 , newQName , 0 , children . length ) ; children . qname = newQName ; int [ ] newType = new int [ children . length * 2 ] ; System . arraycopy ( children . type , 0 , newType , 0 , children . length ) ; children . type = newType ; } children . qname [ children . length ] = new QName ( null , ( String ) contentSpec . value , ( String ) contentSpec . value , ( String ) contentSpec . otherValue ) ; children . type [ children . length ] = contentSpec . type ; children . length ++ ; return ; } final int leftNode = contentSpec . value != null ? ( ( int [ ] ) ( contentSpec . value ) ) [ 0 ] : - 1 ; int rightNode = - 1 ; if ( contentSpec . otherValue != null ) rightNode = ( ( int [ ] ) ( contentSpec . otherValue ) ) [ 0 ] ; else return ; if ( contentSpec . type == XMLContentSpec . CONTENTSPECNODE_CHOICE || contentSpec . type == XMLContentSpec . CONTENTSPECNODE_SEQ ) { contentSpecTree ( leftNode , contentSpec , children ) ; contentSpecTree ( rightNode , contentSpec , children ) ; return ; } if ( contentSpec . type == XMLContentSpec . CONTENTSPECNODE_ZERO_OR_ONE || contentSpec . type == XMLContentSpec . CONTENTSPECNODE_ZERO_OR_MORE || contentSpec . type == XMLContentSpec . CONTENTSPECNODE_ONE_OR_MORE ) { contentSpecTree ( leftNode , contentSpec , children ) ; return ; } throw new RuntimeException ( "Invalid content spec type seen in contentSpecTree() method of AbstractDTDGrammar class : " + contentSpec . type ) ; }
build a vector of valid qnames from content spec table .
