Package net.sf.saxon.event

Examples of net.sf.saxon.event.NamespaceReducer


     */

    public void writeXdmValue(XdmValue value, Destination destination) throws SaxonApiException {
        try {
            Receiver out = destination.getReceiver(config);
            out = new NamespaceReducer(out);
            TreeReceiver tree = new TreeReceiver(out);
            tree.open();
            tree.startDocument(0);
            for (Iterator<XdmItem> it = value.iterator(); it.hasNext();) {
                XdmItem item = it.next();
View Full Code Here


    public static DocumentInfo wrap(SequenceIterator iterator, Configuration config) throws XPathException {
        NamePool pool = config.getNamePool();
        TinyBuilder builder = new TinyBuilder();

        NamespaceReducer reducer = new NamespaceReducer();
        reducer.setUnderlyingReceiver(builder);
        Receiver tree = reducer;

        tree.setConfiguration(config);
        builder.setConfiguration(config);
        tree.open();
View Full Code Here

            Receiver receiver =
                    ResultWrapper.getReceiver(destination,
                                              config,
                                              outputProperties,
                                              null);
            NamespaceReducer reducer = new NamespaceReducer();
            reducer.setUnderlyingReceiver(receiver);
            reducer.setConfiguration(config);
            sender.send(reducer);
        } else {
            throw new DynamicError("Node to be serialized must be a Document or Element node");
        }
    }
View Full Code Here

    public void transform(Source source, Result result)
    throws TransformerException {
        try {
            Receiver receiver = ResultWrapper.getReceiver(
                    result, getConfiguration(), getOutputProperties(), null);
            NamespaceReducer reducer = new NamespaceReducer();
            reducer.setUnderlyingReceiver(receiver);
            new Sender(getConfiguration()).send(source, reducer, true);
        } catch (XPathException err) {
            Throwable cause = err.getException();
            if (cause != null && cause instanceof SAXParseException) {
                // This generally means the error was already reported.
View Full Code Here

        try {
            Configuration config = proc.getUnderlyingConfiguration();
            PipelineConfiguration pipeConfig = config.makePipelineConfiguration();

            Receiver out = destination.getReceiver(config);
            out = new NamespaceReducer(out);
            TreeReceiver tree = new TreeReceiver(out);
            tree.setPipelineConfiguration(pipeConfig);
            if (baseURI != null) {
                tree.setSystemId(baseURI.toASCIIString());
            }
View Full Code Here

            Processor proc = runtime.getProcessor();
            Configuration config = proc.getUnderlyingConfiguration();
            PipelineConfiguration pipeConfig = config.makePipelineConfiguration();

            Receiver out = destination.getReceiver(config);
            out = new NamespaceReducer(out);
            TreeReceiver tree = new TreeReceiver(out);
            tree.setPipelineConfiguration(pipeConfig);
            if (baseURI != null) {
                tree.setSystemId(baseURI.toASCIIString());
            }
View Full Code Here

        seenRoot = false;
        try {
            exec = new Executable(controller.getConfiguration());
            destination = new XdmDestination();
            receiver = destination.getReceiver(controller.getConfiguration());
            receiver = new NamespaceReducer(receiver);
           
            PipelineConfiguration pipe = controller.makePipelineConfiguration();
            pipe.setLocationProvider(xLocationProvider);
            receiver.setPipelineConfiguration(pipe);
View Full Code Here

            matcher = xeval.createPattern(match.getString());

            destination = new XdmDestination();
            receiver = destination.getReceiver(saxonConfig);
            receiver = new NamespaceReducer(receiver);
            PipelineConfiguration pipe = controller.makePipelineConfiguration();
            pipe.setLocationProvider(xLocationProvider);

            receiver.setPipelineConfiguration(pipe);
            receiver.setSystemId(doc.getBaseURI().toASCIIString());
View Full Code Here

TOP

Related Classes of net.sf.saxon.event.NamespaceReducer

Copyright © 2018 www.massapicom. 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.