public void load(URI id, String media, InputStream content, long len) throws IOException { unzip(dfactory, id.toASCIIString(), content); } });
private void readStream(TreeWriter tree, URI id, InputStream stream, final DatatypeFactory dfactory) throws IOException { ZipInputStream zipStream = new ZipInputStream(stream); try { ZipEntry entry = zipStream.getNextEntry(); while (entry != null) { processEntry(tree, entry, dfactory); } } finally { zipStream.close(); } }
public void storeXML(FileToZip file, XdmNode doc, OutputStream out) throws SaxonApiException { Serializer serializer = makeSerializer(file.getOptions()); serializer.setOutputStream(out); S9apiUtils.serialize(runtime, doc, serializer); }
public void patchEnvironment(Environment env) { env.setDefaultReadablePort(getOutput("#current")); } }
public UntilUnchanged(XProcRuntime xproc, XdmNode node, String name) { super(xproc, node, name); declaration = this; stepType = XProcConstants.cx_until_unchanged; Output current = new Output(xproc, node); current.setPort("#current"); current.setSequence(true); addOutput(current); }
public void run() throws SaxonApiException { String cmethod = getOption(_compression_method, "gzip"); if ("gzip".equals(cmethod)) { method = CompressionMethod.GZIP; } else { throw XProcException.stepError(999, "The only compression method supported is 'gzip'."); } super.run(); } }
private byte[] textContent(final XdmNode doc) { Serializer serializer = makeSerializer(); serializer.setOutputProperty(Serializer.Property.METHOD, "text"); ByteArrayOutputStream baos = new ByteArrayOutputStream(); serializer.setOutputStream(baos); try { S9apiUtils.serialize(runtime, doc, serializer); } catch (SaxonApiException e) { throw new XProcException(e); } return baos.toByteArray(); }
public void storeXML(FileToZip file, XdmNode doc, OutputStream out) throws SaxonApiException { Serializer serializer = makeSerializer(file.getOptions()); serializer.setOutputStream(out); S9apiUtils.serialize(runtime, doc, serializer); }
public void patchEnvironment(Environment env) { env.setDefaultReadablePort(getOutput("#current")); } }
private void readStream(TreeWriter tree, URI id, InputStream stream, final DatatypeFactory dfactory) throws IOException { ZipInputStream zipStream = new ZipInputStream(stream); try { ZipEntry entry = zipStream.getNextEntry(); while (entry != null) { processEntry(tree, entry, dfactory); } } finally { zipStream.close(); } }
public UntilUnchanged(XProcRuntime xproc, XdmNode node, String name) { super(xproc, node, name); declaration = this; stepType = XProcConstants.cx_until_unchanged; Output current = new Output(xproc, node); current.setPort("#current"); current.setSequence(true); addOutput(current); }
public void load(URI id, String media, InputStream content, long len) throws IOException { unzip(dfactory, id.toASCIIString(), content); } });
public void run() throws SaxonApiException { String cmethod = getOption(_compression_method, "gzip"); if ("gzip".equals(cmethod)) { method = CompressionMethod.GZIP; } else { throw XProcException.stepError(999, "The only compression method supported is 'gzip'."); } super.run(); } }
private byte[] XmlContent(final XdmNode doc) { ByteArrayOutputStream baos = new ByteArrayOutputStream(); try { try { Serializer serializer = makeSerializer(); serializer.setOutputStream(baos); S9apiUtils.serialize(runtime, doc, serializer); } catch (SaxonApiException e) { throw new XProcException(e); } finally { baos.close(); } } catch (IOException e) { throw new XProcException(e); } return baos.toByteArray(); }
public Output getOutput(String portName) { if ("current".equals(portName)) { return getOutput("#current"); } else { return super.getOutput(portName); } }
public Output getOutput(String portName) { if ("current".equals(portName)) { return getOutput("#current"); } else { return super.getOutput(portName); } }