use of org.eclipse.wst.xml.core.internal.contentmodel.CMNode in project webtools.sourceediting by eclipse.
the class CtdRuby method createContent.
/**
* (RT)+.
*/
protected void createContent() {
if (content != null)
// already created.
return;
if (collection == null)
return;
content = new CMGroupImpl(CMGroup.SEQUENCE, 1, CMContentImpl.UNBOUNDED);
CMGroupImpl phraseGroup = new CMGroupImpl(CMGroup.CHOICE, 0, CMContentImpl.UNBOUNDED);
if (phraseGroup == null)
return;
content.appendChild(phraseGroup);
collection.getPhrase(phraseGroup);
CMGroupImpl rtrpgroup = new CMGroupImpl(CMGroup.CHOICE, 1, 1);
if (rtrpgroup == null)
return;
content.appendChild(rtrpgroup);
// RT
CMNode dec = collection.getNamedItem(HTML50Namespace.ElementName.RT);
if (dec != null)
rtrpgroup.appendChild(dec);
CMGroupImpl rpgroup = new CMGroupImpl(CMGroup.SEQUENCE, 1, 1);
if (rpgroup == null)
return;
rtrpgroup.appendChild(rpgroup);
// RP
dec = collection.getNamedItem(HTML50Namespace.ElementName.RP);
if (dec != null)
rpgroup.appendChild(dec);
// RT
dec = collection.getNamedItem(HTML50Namespace.ElementName.RT);
if (dec != null)
rpgroup.appendChild(dec);
dec = collection.getNamedItem(HTML50Namespace.ElementName.RP);
if (dec != null)
rpgroup.appendChild(dec);
}
use of org.eclipse.wst.xml.core.internal.contentmodel.CMNode in project webtools.sourceediting by eclipse.
the class CtdFigure method createContent.
/**
* (FIGCAPTION)+.
*/
protected void createContent() {
if (content != null)
// already created.
return;
if (collection == null)
return;
// ( | )+
content = new CMGroupImpl(CMGroup.CHOICE, 1, 1);
CMGroupImpl group1 = new CMGroupImpl(CMGroup.SEQUENCE, 1, 1);
if (group1 != null) {
content.appendChild(group1);
}
// FIGCAPTION, FLOW
CMNode dec = collection.getNamedItem(HTML50Namespace.ElementName.FIGCAPTION);
if (dec != null)
group1.appendChild(dec);
CMGroupImpl flowgroup = new CMGroupImpl(CMGroup.SEQUENCE, 1, 1);
group1.appendChild(flowgroup);
collection.getFlow(flowgroup);
CMGroupImpl group2 = new CMGroupImpl(CMGroup.SEQUENCE, 1, 1);
if (group2 != null) {
content.appendChild(group2);
}
// FLOW , FIGCAPTION
CMGroupImpl flowgroup2 = new CMGroupImpl(CMGroup.SEQUENCE, 1, 1);
group2.appendChild(flowgroup2);
collection.getFlow(flowgroup2);
CMNode dec1 = collection.getNamedItem(HTML50Namespace.ElementName.FIGCAPTION);
if (dec1 != null)
group2.appendChild(dec1);
// FLOW
CMGroupImpl group3 = new CMGroupImpl(CMGroup.SEQUENCE, 1, 1);
if (group3 != null) {
content.appendChild(group3);
}
collection.getFlow(group3);
}
use of org.eclipse.wst.xml.core.internal.contentmodel.CMNode in project webtools.sourceediting by eclipse.
the class CtdMap method createContent.
/**
* ((%block;) | AREA)+.
*/
protected void createContent() {
if (content != null)
// already created.
return;
if (collection == null)
return;
// ( | )+
content = new CMGroupImpl(CMGroup.CHOICE, 1, CMContentImpl.UNBOUNDED);
// (%block;)
CMGroupImpl blocks = new CMGroupImpl(CMGroup.CHOICE, 1, 1);
if (blocks == null)
return;
collection.getBlock(blocks);
content.appendChild(blocks);
// AREA
CMNode area = collection.getNamedItem(HTML40Namespace.ElementName.AREA);
if (area != null)
content.appendChild(area);
}
use of org.eclipse.wst.xml.core.internal.contentmodel.CMNode in project webtools.sourceediting by eclipse.
the class CtdNoframesContent method createContent.
/**
* (BODY).
*/
protected void createContent() {
if (content != null)
// already created.
return;
if (collection == null)
return;
// ( )
content = new CMGroupImpl(CMGroup.SEQUENCE, 1, 1);
// BODY
CMNode dec = collection.getNamedItem(HTML40Namespace.ElementName.BODY);
if (dec != null)
content.appendChild(dec);
}
use of org.eclipse.wst.xml.core.internal.contentmodel.CMNode in project webtools.sourceediting by eclipse.
the class HedDETAILS method createAttributeDeclarations.
protected void createAttributeDeclarations() {
if (attributes != null)
// already created.
return;
if (attributeCollection == null)
// fatal
return;
attributes = new CMNamedNodeMapImpl();
// %attrs;
attributeCollection.getAttrs(attributes);
CMNode node = attributeCollection.getDeclaration(HTML50Namespace.ATTR_NAME_OPEN);
if (node != null)
attributes.putNamedItem(HTML50Namespace.ATTR_NAME_OPEN, node);
}
Aggregations