use of com.helger.xml.microdom.MicroElement in project ph-schematron by phax.
the class PSTitle method getAsMicroElement.
@Nonnull
public IMicroElement getAsMicroElement() {
final IMicroElement ret = new MicroElement(CSchematron.NAMESPACE_SCHEMATRON, CSchematronXML.ELEMENT_TITLE);
for (final Object aContent : m_aContent) if (aContent instanceof String)
ret.appendText((String) aContent);
else
ret.appendChild(((IPSElement) aContent).getAsMicroElement());
return ret;
}
use of com.helger.xml.microdom.MicroElement in project ph-schematron by phax.
the class PSNS method getAsMicroElement.
@Nonnull
public IMicroElement getAsMicroElement() {
final IMicroElement ret = new MicroElement(CSchematron.NAMESPACE_SCHEMATRON, CSchematronXML.ELEMENT_NS);
ret.setAttribute(CSchematronXML.ATTR_PREFIX, m_sPrefix);
ret.setAttribute(CSchematronXML.ATTR_URI, m_sUri);
if (m_aForeignAttrs != null)
for (final Map.Entry<String, String> aEntry : m_aForeignAttrs.entrySet()) ret.setAttribute(aEntry.getKey(), aEntry.getValue());
return ret;
}
use of com.helger.xml.microdom.MicroElement in project ph-schematron by phax.
the class PSParam method getAsMicroElement.
@Nonnull
public IMicroElement getAsMicroElement() {
final IMicroElement ret = new MicroElement(CSchematron.NAMESPACE_SCHEMATRON, CSchematronXML.ELEMENT_PARAM);
ret.setAttribute(CSchematronXML.ATTR_NAME, m_sName);
ret.setAttribute(CSchematronXML.ATTR_VALUE, m_sValue);
return ret;
}
use of com.helger.xml.microdom.MicroElement in project ph-schematron by phax.
the class PSPattern method getAsMicroElement.
@Nonnull
public IMicroElement getAsMicroElement() {
final IMicroElement ret = new MicroElement(CSchematron.NAMESPACE_SCHEMATRON, CSchematronXML.ELEMENT_PATTERN);
if (m_bAbstract)
ret.setAttribute(CSchematronXML.ATTR_ABSTRACT, "true");
ret.setAttribute(CSchematronXML.ATTR_ID, m_sID);
ret.setAttribute(CSchematronXML.ATTR_IS_A, m_sIsA);
if (m_aRich != null)
m_aRich.fillMicroElement(ret);
if (m_aForeignElements != null)
for (final IMicroElement aForeignElement : m_aForeignElements) ret.appendChild(aForeignElement.getClone());
for (final PSInclude aInclude : m_aIncludes) ret.appendChild(aInclude.getAsMicroElement());
if (m_aTitle != null)
ret.appendChild(m_aTitle.getAsMicroElement());
for (final IPSElement aContent : m_aContent) ret.appendChild(aContent.getAsMicroElement());
if (m_aForeignAttrs != null)
for (final Map.Entry<String, String> aEntry : m_aForeignAttrs.entrySet()) ret.setAttribute(aEntry.getKey(), aEntry.getValue());
return ret;
}
use of com.helger.xml.microdom.MicroElement in project ph-schematron by phax.
the class PSPhase method getAsMicroElement.
@Nonnull
public IMicroElement getAsMicroElement() {
final IMicroElement ret = new MicroElement(CSchematron.NAMESPACE_SCHEMATRON, CSchematronXML.ELEMENT_PHASE);
ret.setAttribute(CSchematronXML.ATTR_ID, m_sID);
if (m_aRich != null)
m_aRich.fillMicroElement(ret);
if (m_aForeignElements != null)
for (final IMicroElement aForeignElement : m_aForeignElements) ret.appendChild(aForeignElement.getClone());
for (final PSInclude aInclude : m_aIncludes) ret.appendChild(aInclude.getAsMicroElement());
for (final IPSElement aContent : m_aContent) ret.appendChild(aContent.getAsMicroElement());
if (m_aForeignAttrs != null)
for (final Map.Entry<String, String> aEntry : m_aForeignAttrs.entrySet()) ret.setAttribute(aEntry.getKey(), aEntry.getValue());
return ret;
}
Aggregations