Search in sources :

Example 1 with Prettify

use of easik.xml.Prettify in project fql by CategoricalData.

the class XMLSchema method toString.

/**
 * XML string of the Schema.
 *
 * @see Prettify
 * @return the prettied string
 */
@Override
public String toString() {
    final StringBuilder ret = new StringBuilder("<?xml version='1.0' ?>");
    final String lineSep = EasikTools.systemLineSeparator();
    ret.append(lineSep).append('<').append(getXsNSPrefix()).append("schema ").append(xsNS.toString()).append(attributeFormDefaultUnQualified ? " attributeFormDefault=\"unqualified\" " : " attributeFormDefault=\"qualified\" ").append(elementFormDefaultUnQualified ? " elementFormDefault=\"unqualified\" " : " elementFormDefault=\"qualified\" ").append(targetNS.prettyString("       ", lineSep)).append(" >").append(lineSep);
    for (final XSDType t : types) {
        ret.append(t.toString()).append(lineSep);
    }
    for (final XSDBaseNode e : elements) {
        ret.append(e.toString()).append(lineSep);
    }
    ret.append("</").append(getXsNSPrefix()).append("schema>").append(lineSep);
    return new Prettify(ret).toString();
}
Also used : XSDBaseNode(easik.xml.xsd.nodes.XSDBaseNode) XSDType(easik.xml.xsd.nodes.types.XSDType) Prettify(easik.xml.Prettify)

Aggregations

Prettify (easik.xml.Prettify)1 XSDBaseNode (easik.xml.xsd.nodes.XSDBaseNode)1 XSDType (easik.xml.xsd.nodes.types.XSDType)1