Package net.sf.saxon.om

Examples of net.sf.saxon.om.AxisIterator


          checkUnknownAttribute(nc);
        }
    }

    public void validate() throws XPathException {
        AxisIterator kids = iterateAxis(Axis.CHILD);
        while (true) {
            NodeInfo child = (NodeInfo)kids.next();
            if (child == null) {
                break;
            }
            if (child instanceof XSLWithParam || child instanceof XSLFallback) {
                // OK;
View Full Code Here


    public Element getDocumentElement() {
        NodeInfo root = node.getDocumentRoot();
        if (root==null) {
            return null;
        }
        AxisIterator children =
            root.iterateAxis(Axis.CHILD, NodeKindTest.ELEMENT);
        return (Element)wrap((NodeInfo)children.next());
    }   
View Full Code Here

            root.iterateAxis(Axis.CHILD, NodeKindTest.ELEMENT);
        return (Element)wrap((NodeInfo)children.next());
    }   

     protected static NodeList getElementsByTagName(NodeInfo node, String tagname) {
         AxisIterator allElements = node.iterateAxis(Axis.DESCENDANT);
         List<Node> nodes = new ArrayList<Node>(100);
         while(true) {
             NodeInfo next = (NodeInfo)allElements.next();
             if (next == null) {
                 break;
             }
             if (next.getNodeKind()==Type.ELEMENT) {
                 if (tagname.equals("*") || tagname.equals(next.getDisplayName())) {
View Full Code Here

         return getElementsByTagNameNS(node, namespaceURI, localName);
     }

     public static NodeList getElementsByTagNameNS(NodeInfo node, String namespaceURI, String localName) {
         String ns = (namespaceURI==null ? "" : namespaceURI);
         AxisIterator allElements = node.iterateAxis(Axis.DESCENDANT);
         List<Node> nodes = new ArrayList<Node>(100);
         while(true) {
             NodeInfo next = (NodeInfo)allElements.next();
             if (next == null) {
                 break;
             }
             if (next.getNodeKind()==Type.ELEMENT) {
                 if ((ns.equals("*") || ns.equals(next.getURI())) &&
View Full Code Here

        }
    }

    public void validate() throws XPathException {
        //checkWithinTemplate();
        AxisIterator kids = iterateAxis(Axis.CHILD);
        while (true) {
            NodeInfo child = (NodeInfo)kids.next();
            if (child == null) {
                break;
            }
            if (child instanceof XSLWithParam) {
                // OK;
View Full Code Here

        if (!((parent instanceof StyleElement) && ((StyleElement)parent).mayContainParam(null))) {
            compileError("xsl:param must be immediately within a template, function or stylesheet", "XTSE0010");
        }

        if (!global) {
            AxisIterator preceding = iterateAxis(Axis.PRECEDING_SIBLING);
            while (true) {
                NodeInfo node = (NodeInfo)preceding.next();
                if (node == null) {
                    break;
                }
                if (node instanceof XSLParam) {
                    if (this.getVariableQName().equals(((XSLParam)node).getVariableQName())) {
View Full Code Here

        base.close();
    }

    public SequenceIterator getAnother() {
        // System.err.println(this + " getAnother() ");
        AxisIterator newBase = (AxisIterator)base.getAnother();
        return new AxisAtomizingIterator(newBase);
    }
View Full Code Here

    }

    public void validate() throws TransformerConfigurationException {
        checkWithinTemplate();

        AxisIterator kids = iterateAxis(Axis.CHILD);
        while(true) {
            NodeInfo curr = (NodeInfo)kids.next();
            if (curr == null) {
                break;
            }
            if (curr instanceof XSLMatchingSubstring) {
                boolean b = curr.getLocalPart().equals("matching-substring");
View Full Code Here

    public boolean matches(NodeInfo node) {
        if (node.getNodeKind() != Type.DOCUMENT) {
            return false;
        }
        AxisIterator iter = node.iterateAxis(Axis.CHILD);
        // The match is true if there is exactly one element node child, no text node
        // children, and the element node matches the element test.
        boolean found = false;
        while (true) {
            NodeInfo n = (NodeInfo)iter.next();
            if (n==null) {
                return found;
            }
            int kind = n.getNodeKind();
            if (kind==Type.TEXT) {
View Full Code Here

        }
    }

    public void validate() throws TransformerConfigurationException {
        checkWithinTemplate();
        AxisIterator kids = iterateAxis(Axis.CHILD);
        while (true) {
            NodeInfo child = (NodeInfo)kids.next();
            if (child == null) break;
            if (!(child instanceof XSLFallback)) {
                compileError("The only child node allowed for xsl:sequence is an xsl:fallback instruction");
                break;
            }
View Full Code Here

TOP

Related Classes of net.sf.saxon.om.AxisIterator

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.