66package gov .nist .secauto .metaschema .core .metapath ;
77
88/**
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.
1110 */
1211@ SuppressWarnings ("PMD.DataClass" )
1312public class StaticMetapathException
1413 extends AbstractCodedMetapathException {
1514 /**
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.
1918 */
2019 // TODO: need a Metapath grammar link
2120 public static final int INVALID_PATH_GRAMMAR = 3 ;
2221
2322 /**
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>.
3331 */
3432 public static final int NOT_DEFINED = 8 ;
3533 /**
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.
4138 */
4239 public static final int AXIS_NAMESPACE_UNSUPPORTED = 10 ;
4340
4441 /**
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>.
5548 */
5649 public static final int NO_FUNCTION_MATCH = 17 ;
5750
5851 /**
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>.
6758 */
6859 public static final int UNKNOWN_TYPE = 51 ;
6960
7061 /**
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.
7566 */
7667 public static final int CAST_UNKNOWN_TYPE = 52 ;
7768
7869 /**
7970 * <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.
8373 * <ul>
8474 * <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/.
9179 * </ul>
9280 */
9381 public static final int NAMESPACE_MISUSE = 70 ;
9482
9583 /**
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.
10087 */
10188 public static final int CAST_ANY_ATOMIC = 80 ;
10289
10390 /**
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>.
11095 */
11196 public static final int PREFIX_NOT_EXPANDABLE = 81 ;
11297
11398 /**
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.
116101 */
117102 public static final int AXIS_NAMESPACE_UNSUPPORTED_IN_TEST = 134 ;
118103
@@ -122,8 +107,7 @@ public class StaticMetapathException
122107 private static final long serialVersionUID = 2L ;
123108
124109 /**
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}.
127111 *
128112 * @param code
129113 * the error code value
@@ -137,8 +121,7 @@ public StaticMetapathException(int code, String message, Throwable cause) {
137121 }
138122
139123 /**
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.
142125 *
143126 * @param code
144127 * the error code value
@@ -150,8 +133,7 @@ public StaticMetapathException(int code, String message) {
150133 }
151134
152135 /**
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}.
155137 *
156138 * @param code
157139 * the error code value
0 commit comments