Examples of ParentNodeConstructor


Examples of net.sf.saxon.instruct.ParentNodeConstructor

        if (item == null) {
            // we've reached the end of the children
            if (stripDepth == constructorStack.size()) {
                stripDepth = -1;
            }
            ParentNodeConstructor inst = (ParentNodeConstructor)constructorStack.pop();
            if (inst instanceof DocumentInstr) {
                iteratorStack.pop();
                if (iteratorStack.isEmpty()) {
                    currentEvent = END_DOCUMENT;
                    nameCode = -1;
                    return currentEvent;
                }
                // skip the END_DOCUMENT event for a nested document node
                return next();
            } else {
                currentEvent = END_ELEMENT;
                nameCode = -1;
                iteratorStack.pop();
                return currentEvent;
            }


        } else if (item instanceof UnconstructedParent) {
            // this represents a nested element or document node constructor
            UnconstructedParent parent = (UnconstructedParent)item;
            ParentNodeConstructor inst = parent.getInstruction();

            constructorStack.push(inst);
            if (stripDepth < 0 && inst.getValidationMode() == Validation.STRIP) {
                 stripDepth = constructorStack.size();
            }
            SequenceIterator content = inst.getContentExpression().iterate(parent.getXPathContext());
            if (inst instanceof DocumentInstr) {
                iteratorStack.push(content);
                // skip the START_DOCUMENT event
                return next();
            } else {
View Full Code Here

Examples of org.pdf4j.saxon.instruct.ParentNodeConstructor

        if (item == null) {
            // we've reached the end of the children
            if (stripDepth == constructorStack.size()) {
                stripDepth = -1;
            }
            ParentNodeConstructor inst = (ParentNodeConstructor)constructorStack.pop();
            if (inst instanceof DocumentInstr) {
                iteratorStack.pop();
                if (iteratorStack.isEmpty()) {
                    currentEvent = END_DOCUMENT;
                    nameCode = -1;
                    return currentEvent;
                }
                // skip the END_DOCUMENT event for a nested document node
                return next();
            } else {
                currentEvent = END_ELEMENT;
                nameCode = -1;
                iteratorStack.pop();
                return currentEvent;
            }


        } else if (item instanceof UnconstructedParent) {
            // this represents a nested element or document node constructor
            UnconstructedParent parent = (UnconstructedParent)item;
            ParentNodeConstructor inst = parent.getInstruction();

            constructorStack.push(inst);
            if (stripDepth < 0 && inst.getValidationMode() == Validation.STRIP) {
                 stripDepth = constructorStack.size();
            }
            SequenceIterator content = inst.getContentExpression().iterate(parent.getXPathContext());
            if (inst instanceof DocumentInstr) {
                iteratorStack.push(content);
                // skip the START_DOCUMENT event
                return next();
            } else {
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.