com.sun.org.apache.xerces.internal.impl.xpath.XPathException Java Examples

The following examples show how to use com.sun.org.apache.xerces.internal.impl.xpath.XPathException. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: Field.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 6 votes vote down vote up
/** Constructs a field XPath expression. */
public XPath(String xpath,
             SymbolTable symbolTable,
             NamespaceContext context) throws XPathException {
    // NOTE: We have to prefix the field XPath with "./" in
    //       order to handle selectors such as "@attr" that
    //       select the attribute because the fields could be
    //       relative to the selector element. -Ac
    //       Unless xpath starts with a descendant node -Achille Fokoue
    //      ... or a / or a . - NG
    super(((xpath.trim().startsWith("/") ||xpath.trim().startsWith("."))?
            xpath:"./"+xpath),
          symbolTable, context);

    // verify that only one attribute is selected per branch
    for (int i=0;i<fLocationPaths.length;i++) {
        for(int j=0; j<fLocationPaths[i].steps.length; j++) {
            com.sun.org.apache.xerces.internal.impl.xpath.XPath.Axis axis =
                fLocationPaths[i].steps[j].axis;
            if (axis.type == XPath.Axis.ATTRIBUTE &&
                    (j < fLocationPaths[i].steps.length-1)) {
                throw new XPathException("c-fields-xpaths");
            }
        }
    }
}
 
Example #2
Source File: Field.java    From openjdk-8 with GNU General Public License v2.0 6 votes vote down vote up
/** Constructs a field XPath expression. */
public XPath(String xpath,
             SymbolTable symbolTable,
             NamespaceContext context) throws XPathException {
    // NOTE: We have to prefix the field XPath with "./" in
    //       order to handle selectors such as "@attr" that
    //       select the attribute because the fields could be
    //       relative to the selector element. -Ac
    //       Unless xpath starts with a descendant node -Achille Fokoue
    //      ... or a / or a . - NG
    super(((xpath.trim().startsWith("/") ||xpath.trim().startsWith("."))?
            xpath:"./"+xpath),
          symbolTable, context);

    // verify that only one attribute is selected per branch
    for (int i=0;i<fLocationPaths.length;i++) {
        for(int j=0; j<fLocationPaths[i].steps.length; j++) {
            com.sun.org.apache.xerces.internal.impl.xpath.XPath.Axis axis =
                fLocationPaths[i].steps[j].axis;
            if (axis.type == XPath.Axis.ATTRIBUTE &&
                    (j < fLocationPaths[i].steps.length-1)) {
                throw new XPathException("c-fields-xpaths");
            }
        }
    }
}
 
Example #3
Source File: Field.java    From openjdk-8-source with GNU General Public License v2.0 6 votes vote down vote up
/** Constructs a field XPath expression. */
public XPath(String xpath,
             SymbolTable symbolTable,
             NamespaceContext context) throws XPathException {
    // NOTE: We have to prefix the field XPath with "./" in
    //       order to handle selectors such as "@attr" that
    //       select the attribute because the fields could be
    //       relative to the selector element. -Ac
    //       Unless xpath starts with a descendant node -Achille Fokoue
    //      ... or a / or a . - NG
    super(((xpath.trim().startsWith("/") ||xpath.trim().startsWith("."))?
            xpath:"./"+xpath),
          symbolTable, context);

    // verify that only one attribute is selected per branch
    for (int i=0;i<fLocationPaths.length;i++) {
        for(int j=0; j<fLocationPaths[i].steps.length; j++) {
            com.sun.org.apache.xerces.internal.impl.xpath.XPath.Axis axis =
                fLocationPaths[i].steps[j].axis;
            if (axis.type == XPath.Axis.ATTRIBUTE &&
                    (j < fLocationPaths[i].steps.length-1)) {
                throw new XPathException("c-fields-xpaths");
            }
        }
    }
}
 
Example #4
Source File: Field.java    From hottub with GNU General Public License v2.0 6 votes vote down vote up
/** Constructs a field XPath expression. */
public XPath(String xpath,
             SymbolTable symbolTable,
             NamespaceContext context) throws XPathException {
    // NOTE: We have to prefix the field XPath with "./" in
    //       order to handle selectors such as "@attr" that
    //       select the attribute because the fields could be
    //       relative to the selector element. -Ac
    //       Unless xpath starts with a descendant node -Achille Fokoue
    //      ... or a / or a . - NG
    super(((xpath.trim().startsWith("/") ||xpath.trim().startsWith("."))?
            xpath:"./"+xpath),
          symbolTable, context);

    // verify that only one attribute is selected per branch
    for (int i=0;i<fLocationPaths.length;i++) {
        for(int j=0; j<fLocationPaths[i].steps.length; j++) {
            com.sun.org.apache.xerces.internal.impl.xpath.XPath.Axis axis =
                fLocationPaths[i].steps[j].axis;
            if (axis.type == XPath.Axis.ATTRIBUTE &&
                    (j < fLocationPaths[i].steps.length-1)) {
                throw new XPathException("c-fields-xpaths");
            }
        }
    }
}
 
Example #5
Source File: Field.java    From openjdk-jdk9 with GNU General Public License v2.0 6 votes vote down vote up
/** Constructs a field XPath expression. */
public XPath(String xpath,
             SymbolTable symbolTable,
             NamespaceContext context) throws XPathException {
    super(fixupXPath(xpath), symbolTable, context);

    // verify that only one attribute is selected per branch
    for (int i=0;i<fLocationPaths.length;i++) {
        for(int j=0; j<fLocationPaths[i].steps.length; j++) {
            com.sun.org.apache.xerces.internal.impl.xpath.XPath.Axis axis =
                fLocationPaths[i].steps[j].axis;
            if (axis.type == XPath.Axis.ATTRIBUTE &&
                    (j < fLocationPaths[i].steps.length-1)) {
                throw new XPathException("c-fields-xpaths");
            }
        }
    }
}
 
Example #6
Source File: Field.java    From Bytecoder with Apache License 2.0 6 votes vote down vote up
/** Constructs a field XPath expression. */
public XPath(String xpath,
             SymbolTable symbolTable,
             NamespaceContext context) throws XPathException {
    super(fixupXPath(xpath), symbolTable, context);

    // verify that only one attribute is selected per branch
    for (int i=0;i<fLocationPaths.length;i++) {
        for(int j=0; j<fLocationPaths[i].steps.length; j++) {
            com.sun.org.apache.xerces.internal.impl.xpath.XPath.Axis axis =
                fLocationPaths[i].steps[j].axis;
            if (axis.type == XPath.Axis.ATTRIBUTE &&
                    (j < fLocationPaths[i].steps.length-1)) {
                throw new XPathException("c-fields-xpaths");
            }
        }
    }
}
 
Example #7
Source File: Field.java    From openjdk-jdk8u with GNU General Public License v2.0 6 votes vote down vote up
/** Constructs a field XPath expression. */
public XPath(String xpath,
             SymbolTable symbolTable,
             NamespaceContext context) throws XPathException {
    // NOTE: We have to prefix the field XPath with "./" in
    //       order to handle selectors such as "@attr" that
    //       select the attribute because the fields could be
    //       relative to the selector element. -Ac
    //       Unless xpath starts with a descendant node -Achille Fokoue
    //      ... or a / or a . - NG
    super(((xpath.trim().startsWith("/") ||xpath.trim().startsWith("."))?
            xpath:"./"+xpath),
          symbolTable, context);

    // verify that only one attribute is selected per branch
    for (int i=0;i<fLocationPaths.length;i++) {
        for(int j=0; j<fLocationPaths[i].steps.length; j++) {
            com.sun.org.apache.xerces.internal.impl.xpath.XPath.Axis axis =
                fLocationPaths[i].steps[j].axis;
            if (axis.type == XPath.Axis.ATTRIBUTE &&
                    (j < fLocationPaths[i].steps.length-1)) {
                throw new XPathException("c-fields-xpaths");
            }
        }
    }
}
 
Example #8
Source File: Field.java    From JDKSourceCode1.8 with MIT License 6 votes vote down vote up
/** Constructs a field XPath expression. */
public XPath(String xpath,
             SymbolTable symbolTable,
             NamespaceContext context) throws XPathException {
    // NOTE: We have to prefix the field XPath with "./" in
    //       order to handle selectors such as "@attr" that
    //       select the attribute because the fields could be
    //       relative to the selector element. -Ac
    //       Unless xpath starts with a descendant node -Achille Fokoue
    //      ... or a / or a . - NG
    super(((xpath.trim().startsWith("/") ||xpath.trim().startsWith("."))?
            xpath:"./"+xpath),
          symbolTable, context);

    // verify that only one attribute is selected per branch
    for (int i=0;i<fLocationPaths.length;i++) {
        for(int j=0; j<fLocationPaths[i].steps.length; j++) {
            com.sun.org.apache.xerces.internal.impl.xpath.XPath.Axis axis =
                fLocationPaths[i].steps[j].axis;
            if (axis.type == XPath.Axis.ATTRIBUTE &&
                    (j < fLocationPaths[i].steps.length-1)) {
                throw new XPathException("c-fields-xpaths");
            }
        }
    }
}
 
Example #9
Source File: Field.java    From jdk8u60 with GNU General Public License v2.0 6 votes vote down vote up
/** Constructs a field XPath expression. */
public XPath(String xpath,
             SymbolTable symbolTable,
             NamespaceContext context) throws XPathException {
    // NOTE: We have to prefix the field XPath with "./" in
    //       order to handle selectors such as "@attr" that
    //       select the attribute because the fields could be
    //       relative to the selector element. -Ac
    //       Unless xpath starts with a descendant node -Achille Fokoue
    //      ... or a / or a . - NG
    super(((xpath.trim().startsWith("/") ||xpath.trim().startsWith("."))?
            xpath:"./"+xpath),
          symbolTable, context);

    // verify that only one attribute is selected per branch
    for (int i=0;i<fLocationPaths.length;i++) {
        for(int j=0; j<fLocationPaths[i].steps.length; j++) {
            com.sun.org.apache.xerces.internal.impl.xpath.XPath.Axis axis =
                fLocationPaths[i].steps[j].axis;
            if (axis.type == XPath.Axis.ATTRIBUTE &&
                    (j < fLocationPaths[i].steps.length-1)) {
                throw new XPathException("c-fields-xpaths");
            }
        }
    }
}
 
Example #10
Source File: Field.java    From TencentKona-8 with GNU General Public License v2.0 6 votes vote down vote up
/** Constructs a field XPath expression. */
public XPath(String xpath,
             SymbolTable symbolTable,
             NamespaceContext context) throws XPathException {
    // NOTE: We have to prefix the field XPath with "./" in
    //       order to handle selectors such as "@attr" that
    //       select the attribute because the fields could be
    //       relative to the selector element. -Ac
    //       Unless xpath starts with a descendant node -Achille Fokoue
    //      ... or a / or a . - NG
    super(((xpath.trim().startsWith("/") ||xpath.trim().startsWith("."))?
            xpath:"./"+xpath),
          symbolTable, context);

    // verify that only one attribute is selected per branch
    for (int i=0;i<fLocationPaths.length;i++) {
        for(int j=0; j<fLocationPaths[i].steps.length; j++) {
            com.sun.org.apache.xerces.internal.impl.xpath.XPath.Axis axis =
                fLocationPaths[i].steps[j].axis;
            if (axis.type == XPath.Axis.ATTRIBUTE &&
                    (j < fLocationPaths[i].steps.length-1)) {
                throw new XPathException("c-fields-xpaths");
            }
        }
    }
}
 
Example #11
Source File: Field.java    From jdk1.8-source-analysis with Apache License 2.0 6 votes vote down vote up
/** Constructs a field XPath expression. */
public XPath(String xpath,
             SymbolTable symbolTable,
             NamespaceContext context) throws XPathException {
    // NOTE: We have to prefix the field XPath with "./" in
    //       order to handle selectors such as "@attr" that
    //       select the attribute because the fields could be
    //       relative to the selector element. -Ac
    //       Unless xpath starts with a descendant node -Achille Fokoue
    //      ... or a / or a . - NG
    super(((xpath.trim().startsWith("/") ||xpath.trim().startsWith("."))?
            xpath:"./"+xpath),
          symbolTable, context);

    // verify that only one attribute is selected per branch
    for (int i=0;i<fLocationPaths.length;i++) {
        for(int j=0; j<fLocationPaths[i].steps.length; j++) {
            com.sun.org.apache.xerces.internal.impl.xpath.XPath.Axis axis =
                fLocationPaths[i].steps[j].axis;
            if (axis.type == XPath.Axis.ATTRIBUTE &&
                    (j < fLocationPaths[i].steps.length-1)) {
                throw new XPathException("c-fields-xpaths");
            }
        }
    }
}
 
Example #12
Source File: Selector.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
/** Constructs a selector XPath expression. */
public XPath(String xpath, SymbolTable symbolTable,
             NamespaceContext context) throws XPathException {
    super(normalize(xpath), symbolTable, context);
    // verify that an attribute is not selected
    for (int i=0;i<fLocationPaths.length;i++) {
        com.sun.org.apache.xerces.internal.impl.xpath.XPath.Axis axis =
        fLocationPaths[i].steps[fLocationPaths[i].steps.length-1].axis;
        if (axis.type == XPath.Axis.ATTRIBUTE) {
            throw new XPathException("c-selector-xpath");
        }
    }

}
 
Example #13
Source File: Selector.java    From JDKSourceCode1.8 with MIT License 5 votes vote down vote up
/** Constructs a selector XPath expression. */
public XPath(String xpath, SymbolTable symbolTable,
             NamespaceContext context) throws XPathException {
    super(normalize(xpath), symbolTable, context);
    // verify that an attribute is not selected
    for (int i=0;i<fLocationPaths.length;i++) {
        com.sun.org.apache.xerces.internal.impl.xpath.XPath.Axis axis =
        fLocationPaths[i].steps[fLocationPaths[i].steps.length-1].axis;
        if (axis.type == XPath.Axis.ATTRIBUTE) {
            throw new XPathException("c-selector-xpath");
        }
    }

}
 
Example #14
Source File: Selector.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
/** Constructs a selector XPath expression. */
public XPath(String xpath, SymbolTable symbolTable,
             NamespaceContext context) throws XPathException {
    super(normalize(xpath), symbolTable, context);
    // verify that an attribute is not selected
    for (int i=0;i<fLocationPaths.length;i++) {
        com.sun.org.apache.xerces.internal.impl.xpath.XPath.Axis axis =
        fLocationPaths[i].steps[fLocationPaths[i].steps.length-1].axis;
        if (axis.type == XPath.Axis.ATTRIBUTE) {
            throw new XPathException("c-selector-xpath");
        }
    }

}
 
Example #15
Source File: Selector.java    From jdk1.8-source-analysis with Apache License 2.0 5 votes vote down vote up
/** Constructs a selector XPath expression. */
public XPath(String xpath, SymbolTable symbolTable,
             NamespaceContext context) throws XPathException {
    super(normalize(xpath), symbolTable, context);
    // verify that an attribute is not selected
    for (int i=0;i<fLocationPaths.length;i++) {
        com.sun.org.apache.xerces.internal.impl.xpath.XPath.Axis axis =
        fLocationPaths[i].steps[fLocationPaths[i].steps.length-1].axis;
        if (axis.type == XPath.Axis.ATTRIBUTE) {
            throw new XPathException("c-selector-xpath");
        }
    }

}
 
Example #16
Source File: Selector.java    From Bytecoder with Apache License 2.0 5 votes vote down vote up
/** Constructs a selector XPath expression. */
public XPath(String xpath, SymbolTable symbolTable,
             NamespaceContext context) throws XPathException {
    super(normalize(xpath), symbolTable, context);
    // verify that an attribute is not selected
    for (int i=0;i<fLocationPaths.length;i++) {
        com.sun.org.apache.xerces.internal.impl.xpath.XPath.Axis axis =
        fLocationPaths[i].steps[fLocationPaths[i].steps.length-1].axis;
        if (axis.type == XPath.Axis.ATTRIBUTE) {
            throw new XPathException("c-selector-xpath");
        }
    }

}
 
Example #17
Source File: Selector.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
/** Constructs a selector XPath expression. */
public XPath(String xpath, SymbolTable symbolTable,
             NamespaceContext context) throws XPathException {
    super(normalize(xpath), symbolTable, context);
    // verify that an attribute is not selected
    for (int i=0;i<fLocationPaths.length;i++) {
        com.sun.org.apache.xerces.internal.impl.xpath.XPath.Axis axis =
        fLocationPaths[i].steps[fLocationPaths[i].steps.length-1].axis;
        if (axis.type == XPath.Axis.ATTRIBUTE) {
            throw new XPathException("c-selector-xpath");
        }
    }

}
 
Example #18
Source File: Selector.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
/** Constructs a selector XPath expression. */
public XPath(String xpath, SymbolTable symbolTable,
             NamespaceContext context) throws XPathException {
    super(normalize(xpath), symbolTable, context);
    // verify that an attribute is not selected
    for (int i=0;i<fLocationPaths.length;i++) {
        com.sun.org.apache.xerces.internal.impl.xpath.XPath.Axis axis =
        fLocationPaths[i].steps[fLocationPaths[i].steps.length-1].axis;
        if (axis.type == XPath.Axis.ATTRIBUTE) {
            throw new XPathException("c-selector-xpath");
        }
    }

}
 
Example #19
Source File: Selector.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
/** Constructs a selector XPath expression. */
public XPath(String xpath, SymbolTable symbolTable,
             NamespaceContext context) throws XPathException {
    super(normalize(xpath), symbolTable, context);
    // verify that an attribute is not selected
    for (int i=0;i<fLocationPaths.length;i++) {
        com.sun.org.apache.xerces.internal.impl.xpath.XPath.Axis axis =
        fLocationPaths[i].steps[fLocationPaths[i].steps.length-1].axis;
        if (axis.type == XPath.Axis.ATTRIBUTE) {
            throw new XPathException("c-selector-xpath");
        }
    }

}
 
Example #20
Source File: Selector.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
/** Constructs a selector XPath expression. */
public XPath(String xpath, SymbolTable symbolTable,
             NamespaceContext context) throws XPathException {
    super(normalize(xpath), symbolTable, context);
    // verify that an attribute is not selected
    for (int i=0;i<fLocationPaths.length;i++) {
        com.sun.org.apache.xerces.internal.impl.xpath.XPath.Axis axis =
        fLocationPaths[i].steps[fLocationPaths[i].steps.length-1].axis;
        if (axis.type == XPath.Axis.ATTRIBUTE) {
            throw new XPathException("c-selector-xpath");
        }
    }

}
 
Example #21
Source File: Selector.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
/** Constructs a selector XPath expression. */
public XPath(String xpath, SymbolTable symbolTable,
             NamespaceContext context) throws XPathException {
    super(normalize(xpath), symbolTable, context);
    // verify that an attribute is not selected
    for (int i=0;i<fLocationPaths.length;i++) {
        com.sun.org.apache.xerces.internal.impl.xpath.XPath.Axis axis =
        fLocationPaths[i].steps[fLocationPaths[i].steps.length-1].axis;
        if (axis.type == XPath.Axis.ATTRIBUTE) {
            throw new XPathException("c-selector-xpath");
        }
    }

}
 
Example #22
Source File: Selector.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
/** Constructs a selector XPath expression. */
public XPath(String xpath, SymbolTable symbolTable,
             NamespaceContext context) throws XPathException {
    super(normalize(xpath), symbolTable, context);
    // verify that an attribute is not selected
    for (int i=0;i<fLocationPaths.length;i++) {
        com.sun.org.apache.xerces.internal.impl.xpath.XPath.Axis axis =
        fLocationPaths[i].steps[fLocationPaths[i].steps.length-1].axis;
        if (axis.type == XPath.Axis.ATTRIBUTE) {
            throw new XPathException("c-selector-xpath");
        }
    }

}