public static SAXWriter getSAXWriter(Result result) throws TransformerConfigurationException { return getSAXWriter(result, null); }
public void setXSLT(URL xslt) throws Exception { tpls = SAXTransformer.newTemplates( new StreamSource(xslt.openStream(), xslt.toExternalForm())); }
public static Attributes transform(Attributes ds, Templates templates, boolean includeNameSpaceDeclaration, boolean includeKeword) throws SAXException, TransformerConfigurationException { return transform(ds, templates, includeNameSpaceDeclaration, includeKeword, null); }
public static SAXWriter getSAXWriter(Templates templates, Attributes result) throws TransformerConfigurationException { return getSAXWriter(templates, result, null); }
public Templates get(String uri) throws TransformerConfigurationException { Templates tpl = map.get(uri); if (tpl == null) map.put(uri, tpl = SAXTransformer.newTemplates(new StreamSource(uri))); return tpl; } }
@Override public void coerce(Attributes attrs, Attributes modified) { Attributes newAttrs; try { newAttrs = SAXTransformer.transform( attrs, templates, includeNameSpaceDeclaration, includeKeyword, setupTransformer); } catch (Exception e) { throw new RuntimeException(e); } if (modified != null) { attrs.update(Attributes.UpdatePolicy.OVERWRITE, newAttrs, modified); } else { attrs.addAll(newAttrs); } if (next != null) next.coerce(attrs, modified); }
public static SAXWriter getSAXWriter(Templates templates, Result result) throws TransformerConfigurationException { return getSAXWriter(templates, result, null); }
public void setXSLT(URL xslt) throws Exception { tpls = SAXTransformer.newTemplates( new StreamSource(xslt.openStream(), xslt.toExternalForm())); }
public static SAXWriter getSAXWriter(Templates templates, Result result, SetupTransformer setup) throws TransformerConfigurationException { return getSAXWriter(factory.newTransformerHandler(templates), result, setup); }
public static SAXWriter getSAXWriter(Result result, SetupTransformer setup) throws TransformerConfigurationException { return getSAXWriter(factory.newTransformerHandler(), result, setup); }
public static SAXWriter getSAXWriter(Templates templates, Attributes result, SetupTransformer setup) throws TransformerConfigurationException { return getSAXWriter(templates, new SAXResult(new ContentHandlerAdapter(result)), setup); }
SAXTransformer.getSAXWriter(new StreamResult(bOut)).write(instance.metadataList.get(0)); else try (JsonGenerator gen = Json.createGenerator(bOut)) {
SAXTransformer.getSAXWriter(new StreamResult(bOut)).write(instance.metadataList.get(0)); else try (JsonGenerator gen = Json.createGenerator(bOut)) {
public static Attributes transform(Attributes ds, Templates templates, boolean includeNameSpaceDeclaration, boolean includeKeword, SetupTransformer setup) throws SAXException, TransformerConfigurationException { Attributes modify = new Attributes(); SAXWriter w = SAXTransformer.getSAXWriter( templates, modify, setup); w.setIncludeNamespaceDeclaration(includeNameSpaceDeclaration); w.setIncludeKeyword(includeKeword); w.write(ds); return modify; }