| 1 | //////////////////////////////////////////////////////////////////////////////////////////////////////////////////// |
| 2 | // Copyright (c) 2018 Saxonica Limited. |
| 3 | // This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. |
| 4 | // If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. |
| 5 | // This Source Code Form is "Incompatible With Secondary Licenses", as defined by the Mozilla Public License, v. 2.0. |
| 6 | //////////////////////////////////////////////////////////////////////////////////////////////////////////////////// |
| 7 | |
| 8 | package net.sf.saxon.trans; |
| 9 | |
| 10 | import net.sf.saxon.lib.FeatureKeys; |
| 11 | |
| 12 | /** |
| 13 | * The class acts as a register of Saxon-specific error codes. |
| 14 | * <p>Technically, these codes should be in their own namespace. At present, however, they share the |
| 15 | * same namespace as system-defined error codes.</p> |
| 16 | */ |
| 17 | public class SaxonErrorCode { |
| 18 | |
| 19 | /** |
| 20 | * SXLM0001: stylesheet or query appears to be looping/recursing indefinitely |
| 21 | */ |
| 22 | |
| 23 | public static final String SXLM0001 = "SXLM0001"; |
| 24 | |
| 25 | /** |
| 26 | * SXCH0002: cannot supply output to ContentHandler because it is not well-formed |
| 27 | */ |
| 28 | |
| 29 | public static final String SXCH0002 = "SXCH0002"; |
| 30 | |
| 31 | /** |
| 32 | * SXCH0003: error reported by the ContentHandler (SAXResult) to which the result tree was sent |
| 33 | */ |
| 34 | |
| 35 | public static final String SXCH0003 = "SXCH0003"; |
| 36 | |
| 37 | /** |
| 38 | * SXCH0004: cannot load user-supplied ContentHandler |
| 39 | */ |
| 40 | |
| 41 | public static final String SXCH0004 = "SXCH0004"; |
| 42 | |
| 43 | /** |
| 44 | * SXRE0001: stack overflow within regular expression evaluation |
| 45 | */ |
| 46 | |
| 47 | public static final String SXRE0001 = "SXRE0001"; |
| 48 | |
| 49 | |
| 50 | /** |
| 51 | * SXSE0001: cannot use character maps in an environment with no Controller |
| 52 | */ |
| 53 | |
| 54 | public static final String SXSE0001 = "SXSE0001"; |
| 55 | |
| 56 | /** |
| 57 | * SXSE0002: cannot use output property saxon:supply-source-locator unless tracing was enabled at compile time |
| 58 | */ |
| 59 | |
| 60 | public static final String SXSE0002 = "SXSE0002"; |
| 61 | |
| 62 | /** |
| 63 | * SXXP0003: error reported by XML parser while parsing source document. This error code means that an |
| 64 | * error occurred at the XML parsing level; the error was not detected by Saxon itself, but rather by |
| 65 | * the underlying parser. It usually means either that the document (or one of its component entities) |
| 66 | * could not be found, or that the content was not well formed, or it might be an encoding problem. |
| 67 | */ |
| 68 | |
| 69 | public static final String SXXP0003 = "SXXP0003"; |
| 70 | |
| 71 | /** |
| 72 | * SXXP0004: externally supplied node belongs to the wrong Configuration. Saxon requires that when |
| 73 | * a stylesheet or query is run against a particular source document, the Configuration used to build |
| 74 | * that source document is the same Configuration, or a compatible Configuration, as the one used to |
| 75 | * compile the stylesheet or query. Two different configurations are compatible if they share the same |
| 76 | * NamePool. The purpose of the rule is to ensure that the mapping from QNames to integer fingerprints |
| 77 | * used in the stylesheet or query is the same as the mapping used in the source document. The constraint |
| 78 | * applies to all nodes used in the stylesheet or query, whether in the initial source document, in a |
| 79 | * document returned by the doc() or collection() function, or a node returned by a call on an external |
| 80 | * (extension) function. |
| 81 | */ |
| 82 | |
| 83 | public static final String SXXP0004 = "SXXP0004"; |
| 84 | |
| 85 | /** |
| 86 | * SXXP0005: namespace of source document doesn't match namespace of the template rules in the stylesheet. |
| 87 | * This is a warning suggesting that the stylesheet might be making the common mistake of using unprefixed |
| 88 | * element names in match patterns and path expressions, when the source document actually uses a default |
| 89 | * namespace. Often the problem can be solved by adding to the xsl:stylesheet element the attribute |
| 90 | * xpath-default-namespace="URI", where URI is the namespace declared in the source document. |
| 91 | * |
| 92 | * <p>The check that generates this warning can be suppressed by setting the Configuration option |
| 93 | * {@link FeatureKeys#SUPPRESS_XSLT_NAMESPACE_CHECK}. On the command line this can be done |
| 94 | * by writing "--suppressXsltNamespaceCheck:on".</p> |
| 95 | * |
| 96 | * <p>The actual test that results in this warning is as follows. The root element of the principal |
| 97 | * source document must be in a namespace N; and the set of template rules in the initial mode must |
| 98 | * include no match pattern that explicitly matches a named element in namespace N, but must contain |
| 99 | * at least one match pattern that matches named elements in some other namespace, or in no namespace.</p> |
| 100 | */ |
| 101 | |
| 102 | public static final String SXXP0005 = "SXXP0005"; |
| 103 | |
| 104 | /** |
| 105 | * SXSQ0001: value of argument to SQL instruction is not a JDBC Connection object |
| 106 | */ |
| 107 | |
| 108 | public static final String SXSQ0001 = "SXSQ0001"; |
| 109 | |
| 110 | /** |
| 111 | * SXSQ0002: failed to close JDBC Connection |
| 112 | */ |
| 113 | |
| 114 | public static final String SXSQ0002 = "SXSQ0002"; |
| 115 | |
| 116 | /** |
| 117 | * SXSQ0003: failed to open JDBC Connection |
| 118 | */ |
| 119 | |
| 120 | public static final String SXSQ0003 = "SXSQ0003"; |
| 121 | |
| 122 | /** |
| 123 | * SXSQ0004: SQL Insert/Update/Delete action failed |
| 124 | */ |
| 125 | |
| 126 | public static final String SXSQ0004 = "SXSQ0004"; |
| 127 | |
| 128 | /** |
| 129 | * SXJE0001: Must supply an argument for a non-static extension function |
| 130 | */ |
| 131 | |
| 132 | public static final String SXJE0001 = "SXJE0001"; |
| 133 | |
| 134 | /** |
| 135 | * SXJE0005: cannot convert xs:string to Java char unless the length is exactly one |
| 136 | */ |
| 137 | |
| 138 | public static final String SXJE0005 = "SXJE0005"; |
| 139 | |
| 140 | /** |
| 141 | * SXJE0051: supplied Java List/Array contains a member that cannot be converted to an Item |
| 142 | */ |
| 143 | |
| 144 | public static final String SXJE0051 = "SXJE0051"; |
| 145 | |
| 146 | /** |
| 147 | * SXJE0052: exception thrown by extension function |
| 148 | */ |
| 149 | |
| 150 | public static final String SXJE0052 = "SXJE0052"; |
| 151 | |
| 152 | /** |
| 153 | * SXJE0053: I/O error in saxon-read-binary-resource |
| 154 | */ |
| 155 | |
| 156 | public static final String SXJE0053 = "SXJE0053"; |
| 157 | |
| 158 | /** |
| 159 | * SXJM0001: Error in arguments to saxon:send-mail |
| 160 | */ |
| 161 | |
| 162 | public static final String SXJM0001 = "SXJM0001"; |
| 163 | |
| 164 | /** |
| 165 | * SXJM0002: Failure in saxon:send-mail reported by mail service |
| 166 | */ |
| 167 | |
| 168 | public static final String SXJM0002 = "SXJM0002"; |
| 169 | |
| 170 | /** |
| 171 | * SXJX0001: integer in input to octets-to-base64Binary or octets-to-hexBinary is out of range 0-255 |
| 172 | */ |
| 173 | |
| 174 | public static final String SXJX0001 = "SXJX0001"; |
| 175 | |
| 176 | /** |
| 177 | * SXJS0001: Cannot export for Javascript if the stylesheet uses unsupported features |
| 178 | */ |
| 179 | |
| 180 | public static final String SXJS0001 = "SXJS0001"; |
| 181 | |
| 182 | /** |
| 183 | * SXPK0001: No binding available for call-template instruction |
| 184 | */ |
| 185 | |
| 186 | public static final String SXPK0001 = "SXPK0001"; |
| 187 | |
| 188 | /** |
| 189 | * SXPK0002: invalid content found in compiled package |
| 190 | */ |
| 191 | |
| 192 | public static final String SXPK0002 = "SXPK0002"; |
| 193 | |
| 194 | /** |
| 195 | * SXPK0003: stylesheet package has unsatisfied schema dependency |
| 196 | */ |
| 197 | |
| 198 | public static final String SXPK0003 = "SXPK0003"; |
| 199 | |
| 200 | /** |
| 201 | * SXPK0004: documentation namespace can be used only for documentation |
| 202 | */ |
| 203 | |
| 204 | public static final String SXPK0004 = "SXPK0004"; |
| 205 | |
| 206 | /** |
| 207 | * SXRD0001: URI supplied to xsl:result-document does not identify a writable destination |
| 208 | */ |
| 209 | |
| 210 | public static final String SXRD0001 = "SXRD0001"; |
| 211 | |
| 212 | /** |
| 213 | * SXRD0002: Base output URI for xsl:result-document is unknown |
| 214 | */ |
| 215 | |
| 216 | public static final String SXRD0002 = "SXRD0002"; |
| 217 | |
| 218 | /** |
| 219 | * SXRD0003: Failure while closing the xsl:result-document destination after writing |
| 220 | */ |
| 221 | |
| 222 | public static final String SXRD0003 = "SXRD0003"; |
| 223 | |
| 224 | /** |
| 225 | * SXRD0004: Failure to create an output stream for an output destination |
| 226 | */ |
| 227 | |
| 228 | public static final String SXRD0004 = "SXRD0004"; |
| 229 | |
| 230 | /** |
| 231 | * SXST0060: Template in a streaming mode is not streamable |
| 232 | */ |
| 233 | |
| 234 | public static final String SXST0060 = "SXST0060"; |
| 235 | |
| 236 | /** |
| 237 | * SXST0061: Requested initial mode is streamable; must supply SAXSource or StreamSource |
| 238 | */ |
| 239 | |
| 240 | public static final String SXST0061 = "SXST0061"; |
| 241 | |
| 242 | /** |
| 243 | * SXST0062: Component cannot be streamed, though it should be streamable |
| 244 | */ |
| 245 | |
| 246 | public static final String SXST0062 = "SXST0062"; |
| 247 | |
| 248 | /** |
| 249 | * SXST0065: Cannot use tracing with streaming templates |
| 250 | */ |
| 251 | |
| 252 | public static final String SXST0065 = "SXST0065"; |
| 253 | |
| 254 | /** |
| 255 | * SXST0066: Cannot disable optimization when xsl:stream is used |
| 256 | */ |
| 257 | |
| 258 | public static final String SXST0066 = "SXST0066"; |
| 259 | |
| 260 | /** |
| 261 | * SXST0067: Internal problem executing expression in streaming mode |
| 262 | */ |
| 263 | |
| 264 | public static final String SXST0067 = "SXST0067"; |
| 265 | |
| 266 | /** |
| 267 | * SXST0068: This configuration does not allow streaming |
| 268 | */ |
| 269 | |
| 270 | public static final String SXST0068 = "SXST0068"; |
| 271 | |
| 272 | /** |
| 273 | * SXST0069: Exporting a stylesheet containing static references to XQuery functions |
| 274 | */ |
| 275 | |
| 276 | public static final String SXST0069 = "SXST0069"; |
| 277 | |
| 278 | |
| 279 | /** |
| 280 | * SXTA0001: unresolved type alias |
| 281 | */ |
| 282 | public static final String SXTA0001 = "SXTA0001"; |
| 283 | |
| 284 | /** |
| 285 | * SXTM0001: tabulate-maps: selecting an item with no pedigree |
| 286 | */ |
| 287 | public static final String SXTM0001 = "SXTM0001"; |
| 288 | |
| 289 | |
| 290 | /** |
| 291 | * SXTT0001: field name not defined in tuple type |
| 292 | */ |
| 293 | public static final String SXTT0001 = "SXTT0001"; |
| 294 | |
| 295 | |
| 296 | /** |
| 297 | * SXUP0081: attempt to update a non-updateable node |
| 298 | */ |
| 299 | |
| 300 | public static final String SXUP0081 = "SXUP0081"; |
| 301 | |
| 302 | /** |
| 303 | * SXWN9000: miscellaneous warning message |
| 304 | */ |
| 305 | |
| 306 | public static final String SXWN9000 = "SXWN9000"; |
| 307 | |
| 308 | /** |
| 309 | * SXWN9001: a variable declaration with no following siblings has no effect |
| 310 | */ |
| 311 | |
| 312 | public static final String SXWN9001 = "SXWN9001"; |
| 313 | |
| 314 | /** |
| 315 | * SXWN9002: saxon:indent-spaces must be a positive integer |
| 316 | */ |
| 317 | |
| 318 | public static final String SXWN9002 = "SXWN9002"; |
| 319 | |
| 320 | /** |
| 321 | * SXWN9003: saxon:require-well-formed must be "yes" or "no" |
| 322 | */ |
| 323 | |
| 324 | public static final String SXWN9003 = "SXWN9003"; |
| 325 | |
| 326 | /** |
| 327 | * SXWN9004: saxon:next-in-chain cannot be specified dynamically |
| 328 | */ |
| 329 | |
| 330 | public static final String SXWN9004 = "SXWN9004"; |
| 331 | |
| 332 | /** |
| 333 | * SXWN9005: The 'default' attribute of saxon:collation no longer has any effect |
| 334 | */ |
| 335 | |
| 336 | public static final String SXWN9005 = "SXWN9005"; |
| 337 | |
| 338 | /** |
| 339 | * SXWN9006: No schema-location was specified, and no schema with the requested target namespace |
| 340 | * is known, so the schema import was ignored |
| 341 | */ |
| 342 | |
| 343 | public static final String SXWN9006 = "SXWN9006"; |
| 344 | |
| 345 | /** |
| 346 | * SXWN9007: Cannot use reserved namespace in extension-element-prefixes |
| 347 | */ |
| 348 | |
| 349 | public static final String SXWN9007 = "SXWN9007"; |
| 350 | |
| 351 | |
| 352 | /** |
| 353 | * SXWN9008: Saxon extension element not recognized because namespace not declared |
| 354 | * in extension-element-prefixes |
| 355 | */ |
| 356 | |
| 357 | public static final String SXWN9008 = "SXWN9008"; |
| 358 | |
| 359 | /** |
| 360 | * SXWN9009: an empty xsl:for-each or xsl:for-each-group has no effect |
| 361 | */ |
| 362 | |
| 363 | public static final String SXWN9009 = "SXWN9009"; |
| 364 | |
| 365 | /** |
| 366 | * SXWN9010: saxon:recognize-binary must be "yes" or "no" |
| 367 | */ |
| 368 | |
| 369 | public static final String SXWN9010 = "SXWN9010"; |
| 370 | |
| 371 | /** |
| 372 | * SXWN9011: saxon:memo-function ignored under Saxon-HE |
| 373 | */ |
| 374 | |
| 375 | public static final String SXWN9011 = "SXWN9011"; |
| 376 | |
| 377 | /** |
| 378 | * SXWN9012: saxon:threads ignored when compiling with trace enabled |
| 379 | */ |
| 380 | |
| 381 | public static final String SXWN9012 = "SXWN9012"; |
| 382 | |
| 383 | /** |
| 384 | * SXWN9013: saxon:threads ignored when not running under Saxon-EE |
| 385 | */ |
| 386 | |
| 387 | public static final String SXWN9013 = "SXWN9013"; |
| 388 | |
| 389 | /** |
| 390 | * SXWN9014: xsl:function/@override is deprecated in 3.0 |
| 391 | */ |
| 392 | |
| 393 | public static final String SXWN9014 = "SXWN9014"; |
| 394 | |
| 395 | /** |
| 396 | * SXWN9015: Pattern will never match anything |
| 397 | */ |
| 398 | |
| 399 | public static final String SXWN9015 = "SXWN9015"; |
| 400 | |
| 401 | /** |
| 402 | * SXWN9016: saxon:assign used with multi-threading enabled |
| 403 | */ |
| 404 | |
| 405 | public static final String SXWN9016 = "SXWN9016"; |
| 406 | |
| 407 | /** |
| 408 | * SXWN9017: saxon:copy-of copying accumulators pointlessly |
| 409 | */ |
| 410 | |
| 411 | public static final String SXWN9017 = "SXWN9017"; |
| 412 | |
| 413 | |
| 414 | } |
| 415 |