The following table lists specific problems and conditions that should be detected and handled.
File | Condition | Remarks |
---|---|---|
PR_UTF-8.xml | Valid | Valid file with UTF-8 encoding |
PR_UTF-8-BOM.xml | Valid | Valid file with UTF-8 encoding with Byte Order Mark |
PR_UTF-16.xml | Valid | Valid file with UTF-16 encoding |
| Invalid encoding | The document encoded in something besides UTF-8 or UTF-16 |
| Missing preamble |
|
| Invalid preamble |
|
| Encoding attribute invalid | The encoding attribute in the preamble something besides UTF-8 or UTF-16 |
| Encoding attribute inconsistent | The encoding attribute in the preamble valid, but not the same as the actual document encoding |
| Missing close tag |
|
| Missing / on close tag |
|
| Missing closing > on tag |
|
| Missing closing > on close tag | |
| Misspelled tag |
|
| Misspelled close tag |
|
| Misspelled tag and close tag |
|
| Missing required element |
|
| Unknown element |
|
| Required element with no data | as <tag></tag> |
| Required element with no data | as <tag/> |
| Optional element with no data | as <tag></tag> |
| Optional element with no data | as <tag/> |
| Invalid data type for element | Non-numeric data for an element specified as numeric in the XML Schema or non-date data in an element specified as date |
| Invalid data value for element | illogical data, such as 00 for gear code |