Example usage for javax.xml.stream XMLStreamWriter writeCharacters

List of usage examples for javax.xml.stream XMLStreamWriter writeCharacters

Introduction

In this page you can find the example usage for javax.xml.stream XMLStreamWriter writeCharacters.

Prototype

public void writeCharacters(String text) throws XMLStreamException;

Source Link

Document

Write text to the output

Usage

From source file:org.tolven.assembler.webxml.WebXMLAssembler.java

protected void addRootEJBLocalRefSelects(XMLStreamWriter xmlStreamWriter) throws XMLStreamException {
    xmlStreamWriter.writeStartElement("xsl:for-each");
    xmlStreamWriter.writeAttribute("select", "tp:ejb-local-ref");
    xmlStreamWriter.writeCharacters("\n");
    xmlStreamWriter.writeStartElement("xsl:copy-of");
    xmlStreamWriter.writeAttribute("select", ".");
    xmlStreamWriter.writeCharacters("\n");
    xmlStreamWriter.writeStartElement("xsl:apply-templates");
    xmlStreamWriter.writeAttribute("select", "* | @* | text() | comment()");
    xmlStreamWriter.writeEndElement();/*from  ww  w.j  a  v  a2  s .c  o  m*/
    xmlStreamWriter.writeCharacters("\n");
    xmlStreamWriter.writeEndElement();
    xmlStreamWriter.writeCharacters("\n");
    xmlStreamWriter.writeStartElement("xsl:variable");
    xmlStreamWriter.writeAttribute("name", "ejb-ref-name");
    xmlStreamWriter.writeStartElement("xsl:value-of");
    xmlStreamWriter.writeAttribute("select", "tp:ejb-ref-name");
    xmlStreamWriter.writeEndElement();
    xmlStreamWriter.writeCharacters("\n");
    xmlStreamWriter.writeEndElement();
    xmlStreamWriter.writeCharacters("\n");
    xmlStreamWriter.writeEndElement();
    xmlStreamWriter.writeCharacters("\n");
    xmlStreamWriter.writeStartElement("xsl:call-template");
    xmlStreamWriter.writeAttribute("name", "addEJBLocalRefs");
    xmlStreamWriter.writeEndElement();
    xmlStreamWriter.writeCharacters("\n");
}

From source file:org.tolven.assembler.webxml.WebXMLAssembler.java

protected void addRootEnvEntrySelects(XMLStreamWriter xmlStreamWriter) throws XMLStreamException {
    xmlStreamWriter.writeStartElement("xsl:for-each");
    xmlStreamWriter.writeAttribute("select", "tp:env-entry");
    xmlStreamWriter.writeCharacters("\n");
    xmlStreamWriter.writeStartElement("xsl:copy-of");
    xmlStreamWriter.writeAttribute("select", ".");
    xmlStreamWriter.writeCharacters("\n");
    xmlStreamWriter.writeStartElement("xsl:apply-templates");
    xmlStreamWriter.writeAttribute("select", "* | @* | text() | comment()");
    xmlStreamWriter.writeEndElement();//from  ww  w.j  av a 2s  . c  o  m
    xmlStreamWriter.writeCharacters("\n");
    xmlStreamWriter.writeEndElement();
    xmlStreamWriter.writeCharacters("\n");
    xmlStreamWriter.writeEndElement();
    xmlStreamWriter.writeCharacters("\n");
    xmlStreamWriter.writeStartElement("xsl:call-template");
    xmlStreamWriter.writeAttribute("name", "addEnvEntrys");
    xmlStreamWriter.writeEndElement();
    xmlStreamWriter.writeCharacters("\n");
}

From source file:org.tolven.assembler.webxml.WebXMLAssembler.java

protected void addRootErrorPageSelects(XMLStreamWriter xmlStreamWriter) throws XMLStreamException {
    xmlStreamWriter.writeStartElement("xsl:for-each");
    xmlStreamWriter.writeAttribute("select", "tp:error-page");
    xmlStreamWriter.writeCharacters("\n");
    xmlStreamWriter.writeStartElement("xsl:copy-of");
    xmlStreamWriter.writeAttribute("select", ".");
    xmlStreamWriter.writeCharacters("\n");
    xmlStreamWriter.writeStartElement("xsl:apply-templates");
    xmlStreamWriter.writeAttribute("select", "* | @* | text() | comment()");
    xmlStreamWriter.writeEndElement();//from   w  w w  . jav a 2s .c om
    xmlStreamWriter.writeCharacters("\n");
    xmlStreamWriter.writeEndElement();
    xmlStreamWriter.writeCharacters("\n");
    xmlStreamWriter.writeEndElement();
    xmlStreamWriter.writeCharacters("\n");
    xmlStreamWriter.writeStartElement("xsl:call-template");
    xmlStreamWriter.writeAttribute("name", "addErrorPages");
    xmlStreamWriter.writeEndElement();
    xmlStreamWriter.writeCharacters("\n");
}

From source file:org.tolven.assembler.webxml.WebXMLAssembler.java

protected void addRootFilterSelects(XMLStreamWriter xmlStreamWriter) throws XMLStreamException {
    xmlStreamWriter.writeStartElement("xsl:for-each");
    xmlStreamWriter.writeAttribute("select", "tp:filter");
    xmlStreamWriter.writeCharacters("\n");
    xmlStreamWriter.writeStartElement("xsl:copy-of");
    xmlStreamWriter.writeAttribute("select", ".");
    xmlStreamWriter.writeCharacters("\n");
    xmlStreamWriter.writeStartElement("xsl:apply-templates");
    xmlStreamWriter.writeAttribute("select", "* | @* | text() | comment()");
    xmlStreamWriter.writeEndElement();// www . java2s . c  o m
    xmlStreamWriter.writeCharacters("\n");
    xmlStreamWriter.writeEndElement();
    xmlStreamWriter.writeCharacters("\n");
    xmlStreamWriter.writeStartElement("xsl:variable");
    xmlStreamWriter.writeAttribute("name", "filter-name");
    xmlStreamWriter.writeStartElement("xsl:value-of");
    xmlStreamWriter.writeAttribute("select", "tp:filter-name");
    xmlStreamWriter.writeEndElement();
    xmlStreamWriter.writeCharacters("\n");
    xmlStreamWriter.writeEndElement();
    xmlStreamWriter.writeCharacters("\n");
    xmlStreamWriter.writeStartElement("xsl:copy-of");
    xmlStreamWriter.writeAttribute("select", "../tp:filter-mapping[tp:filter-name = $filter-name]");
    xmlStreamWriter.writeCharacters("\n");
    xmlStreamWriter.writeStartElement("xsl:apply-templates");
    xmlStreamWriter.writeAttribute("select", "* | @* | text() | comment()");
    xmlStreamWriter.writeEndElement();
    xmlStreamWriter.writeCharacters("\n");
    xmlStreamWriter.writeEndElement();
    xmlStreamWriter.writeCharacters("\n");
    xmlStreamWriter.writeEndElement();
    xmlStreamWriter.writeCharacters("\n");
    xmlStreamWriter.writeStartElement("xsl:call-template");
    xmlStreamWriter.writeAttribute("name", "addFilters");
    xmlStreamWriter.writeEndElement();
    xmlStreamWriter.writeCharacters("\n");
}

From source file:org.tolven.assembler.webxml.WebXMLAssembler.java

protected void addRootListenerSelects(XMLStreamWriter xmlStreamWriter) throws XMLStreamException {
    xmlStreamWriter.writeStartElement("xsl:for-each");
    xmlStreamWriter.writeAttribute("select", "tp:listener");
    xmlStreamWriter.writeCharacters("\n");
    xmlStreamWriter.writeStartElement("xsl:copy-of");
    xmlStreamWriter.writeAttribute("select", ".");
    xmlStreamWriter.writeCharacters("\n");
    xmlStreamWriter.writeStartElement("xsl:apply-templates");
    xmlStreamWriter.writeAttribute("select", "* | @* | text() | comment()");
    xmlStreamWriter.writeEndElement();//from w w  w . ja va 2 s  . co  m
    xmlStreamWriter.writeCharacters("\n");
    xmlStreamWriter.writeEndElement();
    xmlStreamWriter.writeCharacters("\n");
    xmlStreamWriter.writeEndElement();
    xmlStreamWriter.writeCharacters("\n");
    xmlStreamWriter.writeStartElement("xsl:call-template");
    xmlStreamWriter.writeAttribute("name", "addListeners");
    xmlStreamWriter.writeEndElement();
    xmlStreamWriter.writeCharacters("\n");
}

From source file:org.tolven.assembler.webxml.WebXMLAssembler.java

protected void addRootLoginConfigSelects(XMLStreamWriter xmlStreamWriter) throws XMLStreamException {
    xmlStreamWriter.writeStartElement("xsl:for-each");
    xmlStreamWriter.writeAttribute("select", "tp:login-config");
    xmlStreamWriter.writeCharacters("\n");
    xmlStreamWriter.writeStartElement("xsl:copy-of");
    xmlStreamWriter.writeAttribute("select", ".");
    xmlStreamWriter.writeCharacters("\n");
    xmlStreamWriter.writeStartElement("xsl:apply-templates");
    xmlStreamWriter.writeAttribute("select", "* | @* | text() | comment()");
    xmlStreamWriter.writeEndElement();//from ww  w  .j ava2s . c  o m
    xmlStreamWriter.writeCharacters("\n");
    xmlStreamWriter.writeEndElement();
    xmlStreamWriter.writeCharacters("\n");
    xmlStreamWriter.writeEndElement();
    xmlStreamWriter.writeCharacters("\n");
    xmlStreamWriter.writeStartElement("xsl:call-template");
    xmlStreamWriter.writeAttribute("name", "addLoginConfigs");
    xmlStreamWriter.writeEndElement();
    xmlStreamWriter.writeCharacters("\n");
}

From source file:org.tolven.assembler.webxml.WebXMLAssembler.java

protected void addRootSecurityRoleSelects(XMLStreamWriter xmlStreamWriter) throws XMLStreamException {
    xmlStreamWriter.writeStartElement("xsl:for-each");
    xmlStreamWriter.writeAttribute("select", "tp:security-role");
    xmlStreamWriter.writeCharacters("\n");
    xmlStreamWriter.writeStartElement("xsl:copy-of");
    xmlStreamWriter.writeAttribute("select", ".");
    xmlStreamWriter.writeCharacters("\n");
    xmlStreamWriter.writeStartElement("xsl:apply-templates");
    xmlStreamWriter.writeAttribute("select", "* | @* | text() | comment()");
    xmlStreamWriter.writeEndElement();// w ww.  j a v a2 s .com
    xmlStreamWriter.writeCharacters("\n");
    xmlStreamWriter.writeEndElement();
    xmlStreamWriter.writeCharacters("\n");
    xmlStreamWriter.writeEndElement();
    xmlStreamWriter.writeCharacters("\n");
    xmlStreamWriter.writeStartElement("xsl:call-template");
    xmlStreamWriter.writeAttribute("name", "addSecurityRoles");
    xmlStreamWriter.writeEndElement();
    xmlStreamWriter.writeCharacters("\n");
}

From source file:org.tolven.assembler.webxml.WebXMLAssembler.java

protected void addRootServletSelects(XMLStreamWriter xmlStreamWriter) throws XMLStreamException {
    xmlStreamWriter.writeStartElement("xsl:for-each");
    xmlStreamWriter.writeAttribute("select", "tp:servlet");
    xmlStreamWriter.writeCharacters("\n");
    xmlStreamWriter.writeStartElement("xsl:copy-of");
    xmlStreamWriter.writeAttribute("select", ".");
    xmlStreamWriter.writeCharacters("\n");
    xmlStreamWriter.writeStartElement("xsl:apply-templates");
    xmlStreamWriter.writeAttribute("select", "* | @* | text() | comment()");
    xmlStreamWriter.writeEndElement();/*from   w w  w.  j av a 2  s . com*/
    xmlStreamWriter.writeCharacters("\n");
    xmlStreamWriter.writeEndElement();
    xmlStreamWriter.writeCharacters("\n");
    xmlStreamWriter.writeStartElement("xsl:variable");
    xmlStreamWriter.writeAttribute("name", "servlet-name");
    xmlStreamWriter.writeStartElement("xsl:value-of");
    xmlStreamWriter.writeAttribute("select", "tp:servlet-name");
    xmlStreamWriter.writeEndElement();
    xmlStreamWriter.writeCharacters("\n");
    xmlStreamWriter.writeEndElement();
    xmlStreamWriter.writeCharacters("\n");
    xmlStreamWriter.writeStartElement("xsl:copy-of");
    xmlStreamWriter.writeAttribute("select", "../tp:servlet-mapping[tp:servlet-name = $servlet-name]");
    xmlStreamWriter.writeCharacters("\n");
    xmlStreamWriter.writeStartElement("xsl:apply-templates");
    xmlStreamWriter.writeAttribute("select", "* | @* | text() | comment()");
    xmlStreamWriter.writeEndElement();
    xmlStreamWriter.writeEndElement();
    xmlStreamWriter.writeCharacters("\n");
    xmlStreamWriter.writeEndElement();
    xmlStreamWriter.writeCharacters("\n");
    xmlStreamWriter.writeStartElement("xsl:call-template");
    xmlStreamWriter.writeAttribute("name", "addServlets");
    xmlStreamWriter.writeEndElement();
    xmlStreamWriter.writeCharacters("\n");
}

From source file:org.tolven.assembler.webxml.WebXMLAssembler.java

protected void addRootSessionConfigSelects(XMLStreamWriter xmlStreamWriter) throws XMLStreamException {
    xmlStreamWriter.writeStartElement("xsl:for-each");
    xmlStreamWriter.writeAttribute("select", "tp:session-config");
    xmlStreamWriter.writeCharacters("\n");
    xmlStreamWriter.writeStartElement("xsl:copy-of");
    xmlStreamWriter.writeAttribute("select", ".");
    xmlStreamWriter.writeCharacters("\n");
    xmlStreamWriter.writeStartElement("xsl:apply-templates");
    xmlStreamWriter.writeAttribute("select", "* | @* | text() | comment()");
    xmlStreamWriter.writeEndElement();//  w w w .  ja  va2s .c o  m
    xmlStreamWriter.writeCharacters("\n");
    xmlStreamWriter.writeEndElement();
    xmlStreamWriter.writeCharacters("\n");
    xmlStreamWriter.writeEndElement();
    xmlStreamWriter.writeCharacters("\n");
    xmlStreamWriter.writeStartElement("xsl:call-template");
    xmlStreamWriter.writeAttribute("name", "addSessionConfigs");
    xmlStreamWriter.writeEndElement();
    xmlStreamWriter.writeCharacters("\n");
}

From source file:org.tolven.assembler.webxml.WebXMLAssembler.java

protected void addRootTemplate(XMLStreamWriter xmlStreamWriter) throws XMLStreamException {
    xmlStreamWriter.writeStartElement("xsl:template");
    xmlStreamWriter.writeAttribute("match", "tp:web-app");
    xmlStreamWriter.writeCharacters("\n");
    xmlStreamWriter.writeStartElement("web-app");
    xmlStreamWriter.writeAttribute("version", "{@version}");
    xmlStreamWriter.writeAttribute("xmlns", "http://java.sun.com/xml/ns/javaee");
    xmlStreamWriter.writeAttribute("xmlns:xsi", "http://www.w3.org/2001/XMLSchema-instance");
    xmlStreamWriter.writeAttribute("xsi:schemaLocation",
            "http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd");
    xmlStreamWriter.writeCharacters("\n");
    addRootContextParameterSelects(xmlStreamWriter);
    addRootListenerSelects(xmlStreamWriter);
    addRootFilterSelects(xmlStreamWriter);
    addRootServletSelects(xmlStreamWriter);
    addRootEJBLocalRefSelects(xmlStreamWriter);
    addRootSessionConfigSelects(xmlStreamWriter);
    addRootWelcomeFileListSelects(xmlStreamWriter);
    addRootWebSecurityConstraintSelects(xmlStreamWriter);
    addRootLoginConfigSelects(xmlStreamWriter);
    addRootSecurityRoleSelects(xmlStreamWriter);
    addRootEnvEntrySelects(xmlStreamWriter);
    addRootErrorPageSelects(xmlStreamWriter);
    xmlStreamWriter.writeEndElement();// w ww.  j a  v  a  2  s . c  om
    xmlStreamWriter.writeCharacters("\n");
    xmlStreamWriter.writeEndElement();
    xmlStreamWriter.writeCharacters("\n");
}