com.sun.tools.xjc.reader.xmlschema.bindinfo.binding.rng Maven / Gradle / Ivy
]>
import com.sun.codemodel.*;
import com.sun.tools.xjc.generator.bean.field.*;
import com.sun.tools.xjc.model.*;
import com.sun.xml.bind.api.impl.NameConverter;
import com.sun.xml.bind.v2.WellKnownNamespace;
import com.sun.xml.bind.marshaller.SAX2DOMEx;
import com.sun.tools.xjc.reader.xmlschema.bindinfo.*;
import com.sun.tools.xjc.reader.Const;
import org.xml.sax.*;
import org.w3c.dom.Document;
import org.xml.sax.helpers.DefaultHandler;
import java.util.*;
import javax.xml.namespace.QName;
import javax.xml.parsers.ParserConfigurationException;
import java.io.StringWriter;
import com.sun.xml.bind.marshaller.DataWriter;
// customization declarations
public BindInfo bi;
private StringWriter w;
private SAX2DOMEx sax2dom;
bi = new BindInfo($runtime.copyLocator());
$runtime.currentBindInfo = bi;
result =
bi.addDecl(result);
if($runtime.isExtensionURI($uri)) {
// parse this sub-tree as an extension
try {
sax2dom = new SAX2DOMEx();
} catch( ParserConfigurationException e ) {
throw new Error(e); // impossible
}
$runtime.redirectSubtree(sax2dom,$uri,$localName,$qname);
} else {
// ignore this sub-tree
sax2dom = null;
$runtime.redirectSubtree(new DefaultHandler(),$uri,$localName,$qname);
}
if(sax2dom!=null) {
bi.addDecl(new BIXPluginCustomization(((Document)sax2dom.getDOM()).getDocumentElement(),$runtime.copyLocator()));
}
msg =
bi.appendDocumentation($runtime.truncateDocComment(msg),true);
w = new StringWriter();
DataWriter xw = new DataWriter(w,"UTF-8");
xw.setXmlDecl(false);
$runtime.redirectSubtree(xw,$uri,$localName,$qname);
"+
$runtime.escapeMarkup($runtime.truncateDocComment(w.toString()))+
"
",
false );
w=null;
]]>