Package net.sf.saxon.sort

Examples of net.sf.saxon.sort.IntIterator


        }
        IntHashSet slots = new IntHashSet(10);
        gatherSlotsUsed(this, slots);
        slotsUsed = new int[slots.size()];
        int i=0;
        IntIterator iter = slots.iterator();
        while (iter.hasNext()) {
            slotsUsed[i++] = iter.next();
        }
        Arrays.sort(slotsUsed);
        return slotsUsed;
    }
View Full Code Here


            compileError("xsl:result-document is disabled when extension functions are disabled");
        }
        href = typeCheck("href", href);
        formatExpression = typeCheck("format", formatExpression);

        IntIterator it = serializationAttributes.keyIterator();
        while (it.hasNext()) {
            int fp = it.next();
            String displayName = getNamePool().getDisplayName(fp);
            final Expression exp1 = serializationAttributes.get(fp);
            final Expression exp2 = typeCheck(displayName, exp1);
            if (exp1 != exp2) {
                serializationAttributes.put(fp, exp2);
View Full Code Here

        } else {

            try {
                int[] codes = new int[declared.size()];
                int i = 0;
                IntIterator ii = declared.iterator();
                while (ii.hasNext()) {
                    codes[i++] = ii.next();
                }
                return codes;
            } catch (ArrayIndexOutOfBoundsException e) {
                // Diagnostic patch for a rarely-occurring problem, observed in both 8.6 and 9.1
                System.err.println("*** Internal error in NamespaceIterator ***");
 
View Full Code Here

                }
            }
        }
        int[] n2 = new int[childNamespaces.size()];
        int j = 0;
        IntIterator ii = childNamespaces.iterator();
        while (ii.hasNext()) {
            n2[j++] = ii.next();
        }
        namespaceList = n2;
    }
View Full Code Here

            // anyway to extract the mimimum and maximum mapped characters.)

        charMap = new IntHashMap(64);
        for (int i = 0; i < maps.size(); i++) {
            IntHashMap hashMap = (IntHashMap)maps.get(i);
            IntIterator keys = hashMap.keyIterator();
            while (keys.hasNext()) {
                int next = keys.next();
                if (next < min) {
                    min = next;
                }
                if (next > max) {
                    max = next;
View Full Code Here

                unbound.add(i);
            }
        }
        QName[] unboundq = new QName[unbound.size()];
        int c = 0;
        IntIterator iter = unbound.iterator();
        while (iter.hasNext()) {
            int x = iter.next();
            unboundq[c++] = all[x];
        }
        return unboundq;
    }
View Full Code Here

                    omniMode.unnamedElementRuleChain==null ? null : new Rule(omniMode.unnamedElementRuleChain);
            unnamedAttributeRuleChain =
                    omniMode.unnamedAttributeRuleChain==null ? null : new Rule(omniMode.unnamedAttributeRuleChain);

            namedElementRuleChains = new IntHashMap(omniMode.namedElementRuleChains.size());
            IntIterator ii = omniMode.namedElementRuleChains.keyIterator();
            while (ii.hasNext()) {
                int fp = ii.next();
                Rule r = omniMode.namedElementRuleChains.get(fp);
                namedElementRuleChains.put(fp, new Rule(r));
            }
            ii = omniMode.namedAttributeRuleChains.keyIterator();
            while (ii.hasNext()) {
                int fp = ii.next();
                Rule r = omniMode.namedAttributeRuleChains.get(fp);
                namedAttributeRuleChains.put(fp, new Rule(r));
            }
            mostRecentRule = omniMode.mostRecentRule;
        }
View Full Code Here

     */

    public void processRules(RuleAction action) throws XPathException {
        processRuleChain(documentRuleChain, action);
        processRuleChain(unnamedElementRuleChain, action);
        IntIterator ii = namedElementRuleChains.keyIterator();
        while (ii.hasNext()) {
            Rule r = namedElementRuleChains.get(ii.next());
            processRuleChain(r, action);
        }
        processRuleChain(unnamedAttributeRuleChain, action);
        ii = namedAttributeRuleChains.keyIterator();
        while (ii.hasNext()) {
            Rule r = namedAttributeRuleChains.get(ii.next());
            processRuleChain(r, action);
        }
        processRuleChain(textRuleChain, action);
        processRuleChain(commentRuleChain, action);
        processRuleChain(processingInstructionRuleChain, action);
View Full Code Here

    * Iterator over the results of the expression
    */

    public SequenceIterator iterate(final XPathContext context) throws XPathException {
        final NodeInfo element = (NodeInfo)argument[0].evaluateItem(context);
        final IntIterator iter = NamespaceCodeIterator.iterateNamespaces(element);
        final NamePool pool = context.getNamePool();

        return new SequenceIterator() {
            private Item current = null;
            private int position = 0;

            public Item current() {
                return current;
            }

            public SequenceIterator getAnother() throws XPathException {
                return iterate(context);
            }

            public int getProperties() {
                return 0;
            }

            public Item next() throws XPathException {
                if (position == 0) {
                    current = new StringValue("xml");
                    position++;
                    return current;
                } else if (iter.hasNext()) {
                    String prefix = pool.getPrefixFromNamespaceCode(iter.next());
                    if (prefix.length() == 0) {
                        current = StringValue.EMPTY_STRING;
                    } else {
                        current = StringValue.makeRestrictedString(
                                prefix, BuiltInAtomicType.NCNAME, null).asAtomic();
View Full Code Here

                            }
//                            if (children.contains(-1)) {
//                                return this;
//                            }
                            if (children.size() == 1) {
                                IntIterator iter = children.iterator();
                                if (iter.hasNext()) {
                                    childElement = iter.next();
                                }
                            } else {
                                return this;
                            }
                        }
View Full Code Here

TOP

Related Classes of net.sf.saxon.sort.IntIterator

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.