use of org.eclipse.wst.xml.core.internal.contentmodel.CMNode in project webtools.sourceediting by eclipse.
the class CtdDetails method createContent.
protected void createContent() {
if (content != null)
// already created.
return;
if (collection == null)
return;
content = new CMGroupImpl(CMGroup.SEQUENCE, 1, 1);
// summary
CMNode dec = collection.getNamedItem(HTML50Namespace.ElementName.SUMMARY);
if (dec != null)
content.appendChild(dec);
CMGroupImpl group = new CMGroupImpl(CMGroup.CHOICE, 1, CMContentImpl.UNBOUNDED);
content.appendChild(group);
collection.getFlow(group);
}
use of org.eclipse.wst.xml.core.internal.contentmodel.CMNode in project webtools.sourceediting by eclipse.
the class CtdEmbed method createContent.
/**
* (NOEMBED).
*/
protected void createContent() {
if (content != null)
// already created.
return;
if (collection == null)
return;
// ( )
content = new CMGroupImpl(CMGroup.SEQUENCE, 1, 1);
// NOEMBED
CMNode noembed = collection.getNamedItem(HTML40Namespace.ElementName.NOEMBED);
if (noembed != null)
content.appendChild(noembed);
}
use of org.eclipse.wst.xml.core.internal.contentmodel.CMNode in project webtools.sourceediting by eclipse.
the class CtdSelect method createContent.
/**
* (OPTGROUP | OPTION)+.
*/
protected void createContent() {
if (content != null)
// already created.
return;
if (collection == null)
return;
// ( | )+
content = new CMGroupImpl(CMGroup.CHOICE, 1, CMContentImpl.UNBOUNDED);
// OPTGROUP
CMNode dec = collection.getNamedItem(HTML40Namespace.ElementName.OPTGROUP);
if (dec != null)
content.appendChild(dec);
// OPTION
dec = collection.getNamedItem(HTML40Namespace.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 CMNamedNodeMap getDeclarations(String[] names) {
CMNamedNodeMapImpl map = new CMNamedNodeMapImpl();
for (int i = 0; i < names.length; i++) {
String name = names[i];
CMNode node = getNamedItem(name);
if (node == null)
continue;
map.putNamedItem(name, node);
}
return map;
}
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;
}
Aggregations