Examples of Stripper


Examples of client.net.sf.saxon.ce.event.Stripper

    */

    public void copy(Receiver out, int copyOptions) throws XPathException {
        // The underlying code does not do whitespace stripping. So we need to interpose
        // a stripper.
        Stripper stripper = ((SpaceStrippedDocument)docWrapper).getStripper().getAnother();
        stripper.setUnderlyingReceiver(out);
        node.copy(stripper, copyOptions);
    }
View Full Code Here

Examples of net.sf.saxon.event.Stripper

     *
     * @return the constructed Stripper object
     */

    public Stripper newStripper() {
        return new Stripper(stripperRules);
    }
View Full Code Here

Examples of net.sf.saxon.event.Stripper

        if (params != null) {
            int stripSpace = params.getStripSpace();
            switch (stripSpace) {
                case Whitespace.ALL: {
                    Stripper stripper = AllElementStripper.getInstance();
                    stripper.setStripAll();
                    source = AugmentedSource.makeAugmentedSource(source);
                    ((AugmentedSource)source).addFilter(stripper);
                    break;
                }
                case Whitespace.IGNORABLE:
View Full Code Here

Examples of net.sf.saxon.event.Stripper

    */

    public void copy(Receiver out, int whichNamespaces, boolean copyAnnotations, int locationId) throws XPathException {
        // The underlying code does not do whitespace stripping. So we need to interpose
        // a stripper.
        Stripper stripper = docWrapper.getStripper().getAnother();
        stripper.setUnderlyingReceiver(out);
        node.copy(stripper, whichNamespaces, copyAnnotations, locationId);
    }
View Full Code Here

Examples of net.sf.saxon.event.Stripper

                    }
                    if (parser != null) {
                        options.setXMLReader(parser);
                    }

                    Stripper stripper;
                    if (params != null) {
                        int stripSpace = params.getStripSpace();
                        switch (strip) {
                            case Whitespace.ALL: {
                                stripper = AllElementStripper.getInstance();
                                stripper.setStripAll();
                                options.addFilter(stripper);
                                break;
                            }
                            case Whitespace.IGNORABLE:
                            case Whitespace.NONE:
View Full Code Here

Examples of net.sf.saxon.event.Stripper

        if (source instanceof NodeInfo) {
            pool = ((NodeInfo)source).getNamePool();
        } else {
            pool = NamePool.getDefaultNamePool();
        }
        Stripper stripper = null;
        if (stripSpace) {
            stripper = AllElementStripper.getInstance();
        }
        Configuration config = new Configuration();
        config.setNamePool(pool);
View Full Code Here

Examples of net.sf.saxon.event.Stripper

    */

    public void copy(Receiver out, int whichNamespaces, boolean copyAnnotations, int locationId) throws XPathException {
        // The underlying code does not do whitespace stripping. So we need to interpose
        // a stripper.
        Stripper stripper = docWrapper.getStripper().getAnother();
        stripper.setUnderlyingReceiver(out);
        node.copy(stripper, whichNamespaces, copyAnnotations, locationId);
    }
View Full Code Here

Examples of net.sf.saxon.event.Stripper

        InputSource is = new InputSource(sr);
        is.setSystemId(baseURI);
        SAXSource source = new SAXSource(is);
        source.setSystemId(baseURI);
        Builder b = controller.makeBuilder();
        Stripper s = controller.makeStripper(b);
        try {
            new Sender(controller.getConfiguration()).send(source, s);
            return b.getCurrentDocument();
        } catch (XPathException err) {
            throw new DynamicError(err);
View Full Code Here

Examples of net.sf.saxon.event.Stripper

     * supply an {@link net.sf.saxon.AugmentedSource AugmentedSource} object and set appropriate options on the object.</p>
     * @return the DocumentInfo representing the root node of the resulting document object.
     */

    public DocumentInfo buildDocument(Source source) throws XPathException {
        Stripper stripper = null;
        if (config.isStripsAllWhiteSpace()) {
            stripper = AllElementStripper.getInstance();
            stripper.setStripAll();
        }
        try {
            NodeInfo contextNode = Builder.build(source, stripper, config);
            return contextNode.getDocumentRoot();
        } catch (XPathException err) {
View Full Code Here

Examples of net.sf.saxon.event.Stripper

    * Create a Stripper which handles whitespace stripping definitions
    * @return the constructed Stripper object
    */

    public Stripper newStripper() {
        return new Stripper(stripperRules);
    }
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.