Package net.sf.saxon.s9api

Examples of net.sf.saxon.s9api.Processor.newDocumentBuilder()


    config.debug = true;
    this.runtime = new XProcRuntime(config);
    //GenericConfig config = new GenericConfig();
    //this.runtime = new XProcRuntime(config);
    Processor proc = runtime.getProcessor();
    this.builder = proc.newDocumentBuilder();
    XsltCompiler comp = proc.newXsltCompiler();
    XsltExecutable exp = null;
    try {
      //xslStylesheet = getServeletContext().getResourceAsStream("/WEB-INF/proc.xsl");
      exp = comp.compile(new StreamSource(xslSheet));
View Full Code Here


    }
   
    public void write(XdmNode doc) {
        try {
            Processor qtproc = runtime.getProcessor();
            DocumentBuilder builder = qtproc.newDocumentBuilder();
            builder.setBaseURI(new URI("http://example.com/"));
            XQueryCompiler xqcomp = qtproc.newXQueryCompiler();
            XQueryExecutable xqexec = xqcomp.compile(".");
            XQueryEvaluator xqeval = xqexec.load();
            xqeval.setContextItem(doc);
View Full Code Here

    Processor proc = new Processor(false);
    XsltCompiler comp = proc.newXsltCompiler();
    XsltExecutable exp;
    try {
      exp = comp.compile(new StreamSource(styleSheetFile));
      XdmNode source = proc.newDocumentBuilder().build(
          new StreamSource(xmlFile));
      Serializer out = proc.newSerializer(outputStream);
      out.setOutputProperty(Serializer.Property.METHOD, "xml");
      out.setOutputProperty(Serializer.Property.INDENT, "yes");
      XsltTransformer trans = exp.load();
View Full Code Here

        XsltTransformer transformer = exec.load();

        //transformer.getUnderlyingController().setBaseOutputURI("http://example.com/");

        // No resolver, there isn't one here.
        DocumentBuilder builder = processor.newDocumentBuilder();
        SAXSource document = new SAXSource(new InputSource(new StringReader(textXML)));
        XdmNode context = builder.build(document);
        transformer.setInitialContextNode(context);
        XdmDestination result = new XdmDestination();
        transformer.setDestination(result);
View Full Code Here

    public void run() throws SaxonApiException {
        Processor processor = new Processor(true);
        SchemaManager manager = processor.getSchemaManager();

        // No resolver here, there isn't one.
        DocumentBuilder builder = processor.newDocumentBuilder();
        SAXSource source = new SAXSource(new InputSource("http://tests.xproc.org/tests/doc/compoundEntity.xml"));
        XdmNode document = builder.build(source);

        source = new SAXSource(new InputSource("http://tests.xproc.org/tests/doc/document.xsd"));
        XdmNode schema = builder.build(source);
View Full Code Here

    AnalysisPluginsManager.initialiseExtensions();
    ExtensionFunctions extFuncs = new ExtensionFunctions(fact, proc);
   
//    XPathCompiler xpath = proc.newXPathCompiler();
//    xpath.declareNamespace("cs", FunctionUtils.NAMESPACE);
    DocumentBuilder builder = proc.newDocumentBuilder();
    builder.setLineNumbering(true);
    builder.setWhitespaceStrippingPolicy(WhitespaceStrippingPolicy.ALL);

    //show progress dialog
    ProgressMonitorDialog dialog = new ProgressMonitorDialog(window.getShell());
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.