Guide to parser messages
This guide explains some of the messages that you may be presented with
when your catalogue documents are processed by the Parser.
The parser will retrieve your document, validate it against the Document
Type Definition, and report any problems under the heading: 'Validate
against DTD' errors. The parser is strict and any problems are
comprehensively reported.
The parser will read your file as a stream of sequential characters.
When the parser encounters the pattern of an opening tag of an element,
e.g. <description>, it will run a process to validate this element's
relationship to the structure specified by the DTD. Similar processes will
run when it encounters the closing tag to ensure that all required
children elements were present. At the close of some elements, the content
is compared to the relevant authority list.
These are explanations of some sample errors may be reported by the
parser:
Please report any parsing and
validating problems that are not related to your specific document
content.
When reading the error messages you will need to bear in mind that the
parser is processing the flow of your document, character by character and
line by line.
If you have used the W3C HTML
Validation service, then you will recognise these error messages
that come directly from the wonderful 'nsgmls'
parser.
- In the example error messages below:
- - column #2 is the line number in the SGML file
- - column #3 is the character number on that line
- Missing the closing tag </li>
- Error message:
- dataset/test.sgm:21:11:E: end tag for "li"
omitted, but OMITTAG NO was specified
- dataset/test.sgm:12:2: start tag was here
- Explanation: Every element must have a closing XML tag <li>
... </li>
- Missing the closing tag </p>
- Error message:
- dataset/test.sgm:26:20:E: document type does not allow
element "p" here
- dataset/test.sgm:27:21:E: document type does not allow
element "ul" here
- dataset/test.sgm:33:12:E: end tag for "p"
omitted, but OMITTAG NO was specified
- dataset/test.sgm:25:3: start tag was here
- Explanation: In this example, the <expertise>
element comprised two paragraph elements <p> followed by an
unnumbered list <ul>. The closing tag </p> was missing
on the first paragraph, so the parser complains about the second
paragraph and the list element.
- Element "B" undefined
- Error message:
- dataset/test.sgm:26:19:E: element "B"
undefined
- Explanation: All element names must be lowercase - e.g. <b>bold
word</b>. Consult the help about how to add a
limited set of HTML elements.
- Tried to add an unsupported element
- Error message:
- dataset/test.sgm:26:19:E: element "h2"
undefined
- Explanation: You included an element that is not defined
in the DTD. You can only use a limited
set of HTML elements to enhance the presentation of particular
fields of the document and to link to other web pages.
Sometimes the content of a field can cause the post-processor to die.
These errors are at the document production and formatting stage of the
process.
- Couldn't word-wrap because string too long
- Error message:
- couldn't wrap
'ThisLineIsWayLoooooooooooooooooooonnnnnnnnnnnnnnnnnnnngggggggggggggggggggg'
at /usr/lib/perl5/Text/Wrap.pm line 87, STDIN chunk 334.
- Explanation: The post-processor attempts to format the
output for the TEXT file to 70 columns. To do this it needs to
word-wrap the paragraphs so that the words are kept whole. The most
common source of long words is URLs.
- Solution: If your URL is very long then you could use a
Persistent URL (PURL) where
you can assign a simple URL which would be automatically redirected
to your long URL.
URL:http://www.indexgeo.com.au/ec/help/parser-guide.html
Last Modified: 21 September 2001