use of org.eclipse.wst.xml.core.internal.contentmodel.CMNode in project webtools.sourceediting by eclipse.
the class HedFORM method getExclusion.
/**
* Exclusion.
* <code>FORM</code> has the exclusion.
* It is <code>FORM</code> itself.
*/
public CMContent getExclusion() {
if (exclusion != null)
// already created.
return exclusion;
if (elementCollection == null)
// fatal
return null;
exclusion = new CMGroupImpl(CMGroup.CHOICE, 1, 1);
CMNode form = elementCollection.getNamedItem(CHTMLNamespace.ElementName.FORM);
if (form != null)
exclusion.appendChild(form);
return exclusion;
}
use of org.eclipse.wst.xml.core.internal.contentmodel.CMNode in project webtools.sourceediting by eclipse.
the class CtdOptionContainer method createContent.
/**
* (OPTION)+.
*/
protected void createContent() {
if (content != null)
// already created.
return;
if (collection == null)
return;
// ( )+
content = new CMGroupImpl(CMGroup.SEQUENCE, 1, CMContentImpl.UNBOUNDED);
// OPTION
CMNode dec = collection.getNamedItem(CHTMLNamespace.ElementName.OPTION);
if (dec != null)
content.appendChild(dec);
}
use of org.eclipse.wst.xml.core.internal.contentmodel.CMNode in project webtools.sourceediting by eclipse.
the class DeclCollection method getDeclarations.
public void getDeclarations(CMGroupImpl group, Iterator names) {
while (names.hasNext()) {
String entityName = (String) names.next();
CMNode dec = getNamedItem(entityName);
if (dec != null)
group.appendChild(dec);
}
}
use of org.eclipse.wst.xml.core.internal.contentmodel.CMNode in project webtools.sourceediting by eclipse.
the class DeclCollection method item.
/**
* item method
*
* @return CMNode
* @param index
* int
*/
public CMNode item(int index) {
if (!isValidID(index))
return null;
CMNode decl = fDecls[index];
if (decl != null)
// already exist.
return decl;
decl = create(getName(index));
fDecls[index] = decl;
return decl;
}
use of org.eclipse.wst.xml.core.internal.contentmodel.CMNode in project webtools.sourceediting by eclipse.
the class HedPROGRESS method getExclusion.
public CMContent getExclusion() {
if (exclusion != null)
return exclusion;
if (elementCollection == null)
return null;
exclusion = new CMGroupImpl(CMGroup.CHOICE, 1, 1);
CMNode progress = elementCollection.getNamedItem(HTML50Namespace.ElementName.PROGRESS);
if (progress != null) {
exclusion.appendChild(progress);
}
return exclusion;
}
Aggregations