Java 类org.jdom2.output.support.FormatStack 实例源码

项目:mycore    文件:MCRLayoutUtilities.java   
@Override
protected org.w3c.dom.Element printElement(FormatStack fstack, NamespaceStack nstack,
    org.w3c.dom.Document basedoc, Element element) {
    Attribute href = element.getAttribute("href");
    return (href == null || itemAccess(PERMISSION_READ, element, true)) ? super.printElement(fstack, nstack,
        basedoc, element) : null;
}
项目:jodtemplate    文件:StandaloneOutputProcessor.java   
@Override
protected void printDeclaration(final Writer out, final FormatStack fstack) throws IOException {
    if (fstack.isOmitDeclaration()) {
        return;
    }
    if (fstack.isOmitEncoding()) {
        write(out, "<?xml version=\"1.0");
    } else {
        write(out, "<?xml version=\"1.0\"");
        write(out, " encoding=\"");
        write(out, fstack.getEncoding());
    }
    write(out, "\" standalone=\"yes\"?>");
    write(out, "\n");
}
项目:epubfx    文件:XHTMLOutputProcessor.java   
protected void printTextRemoveBreaks(final Writer out, final FormatStack fstack,
                                     final String text) throws IOException
{
    if (fstack.getEscapeOutput())
    {
        textRawRemoveBreaks(out, Format.escapeText(fstack.getEscapeStrategy(),
                fstack.getLineSeparator(), text));

        return;
    }
    textRawRemoveBreaks(out, text);
}
项目:easyxml    文件:CustomStAXStreamProcessor.java   
@Override
protected void printNamespace(final XMLStreamWriter out, final FormatStack fstack, final Namespace ns)
    throws XMLStreamException {
    final String prefix = ns.getPrefix();
    final String uri = ns.getURI();
    // TODO handle namespace
    if (!ns.equals(namespace)) {
        out.writeNamespace(prefix, uri);
    }

}