Download XML Editor 10.3 User Manual for Eclipse
Transcript
Editing documents Clicking on a marker will highlight the corresponding text area in the editor. The error message is displayed both in the tool tip and in the error area on the bottom of the editor panel. Status messages from every validation action are logged into the Console view. Validation Example Example 4.5. Validation error messages In our example we will use the case where a DocBook listitem element does not match the rules of the docbookx.dtd. In this case running Validate Document will return the following error: E The content of element type "listitem" must match"(calloutlist|glosslist|itemizedlist|orderedlist|segmentedlist| simplelist|variablelist| caution|important|note|tip|warning| literallayout|programlisting|programlistingco|screen| screenco|screenshot|synopsis|cmdsynopsis| funcsynopsis|classsynopsis|fieldsynopsis| constructorsynopsis| destructorsynopsis|methodsynopsis|formalpara|para|simpara| address|blockquote|graphic|graphicco|mediaobject| mediaobjectco|informalequation| informalexample| informalfigure|informaltable|equation|example| figure|table|msgset|procedure|sidebar|qandaset|anchor| bridgehead|remark|highlights|abstract|authorblurb|epigraph| indexterm|beginpage)+". As you can see, this error message is a little more difficult to understand, so understanding of the syntax or processing rules for the DocBook XML DTD's "listitem" element is required. However, the error message does give us a clue as to the source of the problem, but indicating that "The content of element type "listitem" must match". Luckily most standards based DTD's, XML Schema's and Relax NG schemas are supplied with reference documentation. This enables us to lookup the element and read about it. In this case we would want to learn about the child elements of "listitem" and their nesting rules. Once we have correctly inserted the required child element and nested it in accordance with the XML rules, the document will become valid on the next validation test. Caching the Schema Used for Validation If you don't change the active editor and you don't switch to other application the schema associated to the current document is parsed and cached at the first validate action and is reused by the next Validate document actions without re parsing it. This increases the speed of the validate action starting with the second execution if the schema is large or is located on a remote server on the Web. To reset the cache and re parse the schema you have to use the cache and validate action. Reset Validate As You Type <oXygen/> can be configured to mark validation errors in the edited document as you modify it using the keyboard. If you enable the Validate as you type option any validation errors and warnings will be highlighted automatically in the editor panel after the configured delay from the last key typed, with underline markers in the editor panel and small rectangles on the right side ruler of the editor panel, in the same way as for manual validation invoked by the user. 44
Related documents
XML Author 10.3 User Manual
XML Author 10.3 User Manual for Eclipse
XML Editor 11.2 User Manual
XML Editor 10.3 User Manual
Oxygen XML Author 12.2
XML Author 11.2 User Manual for Eclipse
Performing a Query Session
XML Editor User Manual
XML Editor 11.2 User Manual for Eclipse
Oxygen XML Author Eclipse Plugin 15.2
XML Author 11.2 User Manual
Oxygen XML Editor 16.1