Search in sources :

Example 16 with MicroElement

use of com.helger.xml.microdom.MicroElement in project ph-schematron by phax.

the class PSExtends method getAsMicroElement.

@Nonnull
public IMicroElement getAsMicroElement() {
    final IMicroElement ret = new MicroElement(CSchematron.NAMESPACE_SCHEMATRON, CSchematronXML.ELEMENT_EXTENDS);
    ret.setAttribute(CSchematronXML.ATTR_RULE, m_sRule);
    if (m_aForeignAttrs != null)
        for (final Map.Entry<String, String> aEntry : m_aForeignAttrs.entrySet()) ret.setAttribute(aEntry.getKey(), aEntry.getValue());
    return ret;
}
Also used : MicroElement(com.helger.xml.microdom.MicroElement) IMicroElement(com.helger.xml.microdom.IMicroElement) IMicroElement(com.helger.xml.microdom.IMicroElement) Nonnull(javax.annotation.Nonnull)

Example 17 with MicroElement

use of com.helger.xml.microdom.MicroElement in project ph-schematron by phax.

the class PSLet method getAsMicroElement.

@Nonnull
public IMicroElement getAsMicroElement() {
    final IMicroElement ret = new MicroElement(CSchematron.NAMESPACE_SCHEMATRON, CSchematronXML.ELEMENT_LET);
    ret.setAttribute(CSchematronXML.ATTR_NAME, m_sName);
    ret.setAttribute(CSchematronXML.ATTR_VALUE, m_sValue);
    return ret;
}
Also used : IMicroElement(com.helger.xml.microdom.IMicroElement) MicroElement(com.helger.xml.microdom.MicroElement) IMicroElement(com.helger.xml.microdom.IMicroElement) Nonnull(javax.annotation.Nonnull)

Example 18 with MicroElement

use of com.helger.xml.microdom.MicroElement in project ph-schematron by phax.

the class PSActive method getAsMicroElement.

@Nonnull
public IMicroElement getAsMicroElement() {
    final IMicroElement ret = new MicroElement(CSchematron.NAMESPACE_SCHEMATRON, CSchematronXML.ELEMENT_ACTIVE);
    ret.setAttribute(CSchematronXML.ATTR_PATTERN, m_sPattern);
    if (m_aForeignElements != null)
        for (final IMicroElement aForeignElement : m_aForeignElements) ret.appendChild(aForeignElement.getClone());
    for (final Object aContent : m_aContent) if (aContent instanceof String)
        ret.appendText((String) aContent);
    else
        ret.appendChild(((IPSElement) aContent).getAsMicroElement());
    if (m_aForeignAttrs != null)
        for (final Map.Entry<String, String> aEntry : m_aForeignAttrs.entrySet()) ret.setAttribute(aEntry.getKey(), aEntry.getValue());
    return ret;
}
Also used : MicroElement(com.helger.xml.microdom.MicroElement) IMicroElement(com.helger.xml.microdom.IMicroElement) IMicroElement(com.helger.xml.microdom.IMicroElement) Nonnull(javax.annotation.Nonnull)

Aggregations

IMicroElement (com.helger.xml.microdom.IMicroElement)18 MicroElement (com.helger.xml.microdom.MicroElement)18 Nonnull (javax.annotation.Nonnull)17 Version (com.helger.commons.version.Version)1 ECSSSpecification (com.helger.css.ECSSSpecification)1 ECSSVendorPrefix (com.helger.css.ECSSVendorPrefix)1 ECSSVersion (com.helger.css.ECSSVersion)1 ECSSProperty (com.helger.css.property.ECSSProperty)1 EXMLSerializeVersion (com.helger.xml.serialize.write.EXMLSerializeVersion)1 XMLWriterSettings (com.helger.xml.serialize.write.XMLWriterSettings)1 File (java.io.File)1 Date (java.util.Date)1 Locale (java.util.Locale)1