6
6
package gov .nist .secauto .metaschema .core .metapath ;
7
7
8
8
/**
9
- * MPST: Exceptions related to the Metapath static context and static
10
- * evaluation.
9
+ * MPST: Exceptions related to the Metapath static context and static evaluation.
11
10
*/
12
11
@ SuppressWarnings ("PMD.DataClass" )
13
12
public class StaticMetapathException
14
13
extends AbstractCodedMetapathException {
15
14
/**
16
- * <a href= "https://www.w3.org/TR/xpath-31/#ERRXPST0003">err:MPST0003</a>: It
17
- * is a <a href="https://www.w3.org/TR/xpath-31/#dt-static-error">static
18
- * error</a> if an expression is not a valid instance of the Metapath grammar.
15
+ * <a href= "https://www.w3.org/TR/xpath-31/#ERRXPST0003">err:MPST0003</a>: It is a
16
+ * <a href="https://www.w3.org/TR/xpath-31/#dt-static-error">static error</a> if an expression is
17
+ * not a valid instance of the Metapath grammar.
19
18
*/
20
19
// TODO: need a Metapath grammar link
21
20
public static final int INVALID_PATH_GRAMMAR = 3 ;
22
21
23
22
/**
24
- * <a href= "https://www.w3.org/TR/xpath-31/#ERRXPST0008">err:MPST0008</a>: It
25
- * is a <a href="https://www.w3.org/TR/xpath-31/#dt-static-error">static
26
- * error</a> if an expression refers to an element name, attribute name, schema
27
- * type name, namespace prefix, or variable name that is not defined in the
28
- * <a href="https://www.w3.org/TR/xpath-31/#dt-static-context">static
29
- * context</a>, except for an ElementName in an <a href=
30
- * "https://www.w3.org/TR/xpath-31/#doc-xpath31-ElementTest">ElementTest</a> or
31
- * an AttributeName in an <a href=
32
- * "https://www.w3.org/TR/xpath-31/#doc-xpath31-AttributeTest">AttributeTest</a>.
23
+ * <a href= "https://www.w3.org/TR/xpath-31/#ERRXPST0008">err:MPST0008</a>: It is a
24
+ * <a href="https://www.w3.org/TR/xpath-31/#dt-static-error">static error</a> if an expression
25
+ * refers to an element name, attribute name, schema type name, namespace prefix, or variable name
26
+ * that is not defined in the <a href="https://www.w3.org/TR/xpath-31/#dt-static-context">static
27
+ * context</a>, except for an ElementName in an
28
+ * <a href= "https://www.w3.org/TR/xpath-31/#doc-xpath31-ElementTest">ElementTest</a> or an
29
+ * AttributeName in an
30
+ * <a href= "https://www.w3.org/TR/xpath-31/#doc-xpath31-AttributeTest">AttributeTest</a>.
33
31
*/
34
32
public static final int NOT_DEFINED = 8 ;
35
33
/**
36
- * <a href= "https://www.w3.org/TR/xpath-31/#ERRXPST0010">err:MPST0010</a>: An
37
- * implementation that does not support the namespace axis must raise a
38
- * <a href="https://www.w3.org/TR/xpath-31/#dt-static-error">static error</a> if
39
- * it encounters a reference to the namespace axis and XPath 1.0 compatibility
40
- * mode is false.
34
+ * <a href= "https://www.w3.org/TR/xpath-31/#ERRXPST0010">err:MPST0010</a>: An implementation that
35
+ * does not support the namespace axis must raise a
36
+ * <a href="https://www.w3.org/TR/xpath-31/#dt-static-error">static error</a> if it encounters a
37
+ * reference to the namespace axis and XPath 1.0 compatibility mode is false.
41
38
*/
42
39
public static final int AXIS_NAMESPACE_UNSUPPORTED = 10 ;
43
40
44
41
/**
45
- * <a href= "https://www.w3.org/TR/xpath-31/#ERRXPST0017">err:MPST0017</a>: It
46
- * is a <a href="https://www.w3.org/TR/xpath-31/#dt-static-error">static
47
- * error</a> if the
48
- * <a href="https://www.w3.org/TR/xpath-31/#dt-expanded-qname">expanded
49
- * QName</a> and number of arguments in a static function call do not match the
50
- * name and arity of a
51
- * <a href="https://www.w3.org/TR/xpath-31/#dt-known-func-signatures">function
52
- * signature</a> in the
53
- * <a href="https://www.w3.org/TR/xpath-31/#dt-static-context">static
54
- * context</a>.
42
+ * <a href= "https://www.w3.org/TR/xpath-31/#ERRXPST0017">err:MPST0017</a>: It is a
43
+ * <a href="https://www.w3.org/TR/xpath-31/#dt-static-error">static error</a> if the
44
+ * <a href="https://www.w3.org/TR/xpath-31/#dt-expanded-qname">expanded QName</a> and number of
45
+ * arguments in a static function call do not match the name and arity of a
46
+ * <a href="https://www.w3.org/TR/xpath-31/#dt-known-func-signatures">function signature</a> in the
47
+ * <a href="https://www.w3.org/TR/xpath-31/#dt-static-context">static context</a>.
55
48
*/
56
49
public static final int NO_FUNCTION_MATCH = 17 ;
57
50
58
51
/**
59
- * <a href= "https://www.w3.org/TR/xpath-31/#ERRXPST0051">err:MPST0051</a>: It
60
- * is a static error if the
61
- * <a href="https://www.w3.org/TR/xpath-31/#dt-expanded-qname">expanded
62
- * QName</a> for an AtomicOrUnionType in a SequenceType is not defined in the
63
- * <a href="https://www.w3.org/TR/xpath-31/#dt-is-types">in-scope schema
64
- * types</a> as a <a href=
65
- * "https://www.w3.org/TR/xpath-31/#dt-generalized-atomic-type">generalized
66
- * atomic type</a>.
52
+ * <a href= "https://www.w3.org/TR/xpath-31/#ERRXPST0051">err:MPST0051</a>: It is a static error if
53
+ * the <a href="https://www.w3.org/TR/xpath-31/#dt-expanded-qname">expanded QName</a> for an
54
+ * AtomicOrUnionType in a SequenceType is not defined in the
55
+ * <a href="https://www.w3.org/TR/xpath-31/#dt-is-types">in-scope schema types</a> as a
56
+ * <a href= "https://www.w3.org/TR/xpath-31/#dt-generalized-atomic-type">generalized atomic
57
+ * type</a>.
67
58
*/
68
59
public static final int UNKNOWN_TYPE = 51 ;
69
60
70
61
/**
71
- * <a href= "https://www.w3.org/TR/xpath-31/#ERRXQST0052">err:MQST0052</a>: The
72
- * type named in a cast or castable expression must be the name of a type
73
- * defined in the <a href="https://www.w3.org/TR/xpath-31/#dt-is-types">in-scope
74
- * schema types</a>, and the type must be simple.
62
+ * <a href= "https://www.w3.org/TR/xpath-31/#ERRXQST0052">err:MQST0052</a>: The type named in a cast
63
+ * or castable expression must be the name of a type defined in the
64
+ * <a href="https://www.w3.org/TR/xpath-31/#dt-is-types">in-scope schema types</a>, and the type
65
+ * must be simple.
75
66
*/
76
67
public static final int CAST_UNKNOWN_TYPE = 52 ;
77
68
78
69
/**
79
70
* <a href= "https://www.w3.org/TR/xpath-31/#ERRXQST0070">err:MQST0070</a>: A
80
- * <a href="https://www.w3.org/TR/xpath-31/#dt-static-error">static error</a> is
81
- * raised if any of the following conditions is statically detected in any
82
- * expression.
71
+ * <a href="https://www.w3.org/TR/xpath-31/#dt-static-error">static error</a> is raised if any of
72
+ * the following conditions is statically detected in any expression.
83
73
* <ul>
84
74
* <li>The prefix xml is bound to some namespace URI other than
85
- * http://www.w3.org/XML/1998/namespace.</li>
86
- * <li>A prefix other than xml is bound to the namespace URI
87
- * http://www.w3.org/XML/1998/namespace.</li>
88
- * <li>The prefix xmlns is bound to any namespace URI.</li>
89
- * <li>A prefix other than xmlns is bound to the namespace URI
90
- * http://www.w3.org/2000/xmlns/.</li>
75
+ * http://www.w3.org/XML/1998/namespace.
76
+ * <li>A prefix other than xml is bound to the namespace URI http://www.w3.org/XML/1998/namespace.
77
+ * <li>The prefix xmlns is bound to any namespace URI.
78
+ * <li>A prefix other than xmlns is bound to the namespace URI http://www.w3.org/2000/xmlns/.
91
79
* </ul>
92
80
*/
93
81
public static final int NAMESPACE_MISUSE = 70 ;
94
82
95
83
/**
96
- * <a href= "https://www.w3.org/TR/xpath-31/#ERRXPST0080">err:MPST0080</a>: It
97
- * is a <a href="https://www.w3.org/TR/xpath-31/#dt-static-error">static
98
- * error</a> if the target type of a cast or castable expression is
99
- * meta:anyAtomicType.
84
+ * <a href= "https://www.w3.org/TR/xpath-31/#ERRXPST0080">err:MPST0080</a>: It is a
85
+ * <a href="https://www.w3.org/TR/xpath-31/#dt-static-error">static error</a> if the target type of
86
+ * a cast or castable expression is meta:anyAtomicType.
100
87
*/
101
88
public static final int CAST_ANY_ATOMIC = 80 ;
102
89
103
90
/**
104
- * <a href= "https://www.w3.org/TR/xpath-31/#ERRXQST0070">err:MPST0070</a>: It
105
- * is a <a href="https://www.w3.org/TR/xpath-31/#dt-static-error">static
106
- * error</a> if a QName used in an expression contains a namespace prefix that
107
- * cannot be expanded into a namespace URI by using the
108
- * <a href="https://www.w3.org/TR/xpath-31/#dt-static-namespaces">statically
109
- * known namespaces</a>.
91
+ * <a href= "https://www.w3.org/TR/xpath-31/#ERRXQST0070">err:MPST0070</a>: It is a
92
+ * <a href="https://www.w3.org/TR/xpath-31/#dt-static-error">static error</a> if a QName used in an
93
+ * expression contains a namespace prefix that cannot be expanded into a namespace URI by using the
94
+ * <a href="https://www.w3.org/TR/xpath-31/#dt-static-namespaces">statically known namespaces</a>.
110
95
*/
111
96
public static final int PREFIX_NOT_EXPANDABLE = 81 ;
112
97
113
98
/**
114
- * <a href= "https://www.w3.org/TR/xpath-31/#ERRXQST0134">err:MPST0134</a>: The
115
- * namespace axis is not supported.
99
+ * <a href= "https://www.w3.org/TR/xpath-31/#ERRXQST0134">err:MPST0134</a>: The namespace axis is
100
+ * not supported.
116
101
*/
117
102
public static final int AXIS_NAMESPACE_UNSUPPORTED_IN_TEST = 134 ;
118
103
@@ -122,8 +107,7 @@ public class StaticMetapathException
122
107
private static final long serialVersionUID = 2L ;
123
108
124
109
/**
125
- * Constructs a new exception with the provided {@code code}, {@code message},
126
- * and {@code cause}.
110
+ * Constructs a new exception with the provided {@code code}, {@code message}, and {@code cause}.
127
111
*
128
112
* @param code
129
113
* the error code value
@@ -137,8 +121,7 @@ public StaticMetapathException(int code, String message, Throwable cause) {
137
121
}
138
122
139
123
/**
140
- * Constructs a new exception with the provided {@code code}, {@code message},
141
- * and no cause.
124
+ * Constructs a new exception with the provided {@code code}, {@code message}, and no cause.
142
125
*
143
126
* @param code
144
127
* the error code value
@@ -150,8 +133,7 @@ public StaticMetapathException(int code, String message) {
150
133
}
151
134
152
135
/**
153
- * Constructs a new exception with the provided {@code code}, no message, and
154
- * the {@code cause}.
136
+ * Constructs a new exception with the provided {@code code}, no message, and the {@code cause}.
155
137
*
156
138
* @param code
157
139
* the error code value
0 commit comments