Default Schemas
Default Schemas
Usually the structure of an XML Document is specified by a DTD, a Relax NG Schema or an XML Schema. When no schema is specified, XMLBlueprint will try to find the associated schema by inspecting the Default Schemas rules.
 |
| • | Namespace -- Specifies the namespace of the root element. |
| • | Element Name -- Specifies the local element name of the root element. |
| • | Schema - The actual schema. Only Relax NG Schemas and XML Schemas are supported, indicated by a colored icon. |
An Example
Suppose we open the following KML*) file in XMLBlueprint:
When you try to validate it by pressing F8, XMLBlueprint will display an error message:
The root of the document belongs to namespace {http://www.opengis.net/kml/2.2},
but there is no actual DTD, Relax NG Schema, Schematron Schema or XML Schema associated with this namespace.
We search for the KML schema using Google ("KML 2.2 schema") and find the official XML Schema for KML 2.2:
We will now associate the KML namespace with the KML schema. Select Options > Default Schemas..., press Add and enter:
Element Name: (leave empty)
Press OK. You should now see the newly added schema highlighted in the "Default Schemas" dialog. Press OK again.
Press F8 again to validate the KML file. XMLBlueprint will now report no errors.
*) KML (Keyhole Markup Language) is a file format used to display geographic data in an Earth browser such as Google Earth, Google Maps, and Google Maps for mobile. The example is taken from Google's website.
copyright © 2002 - 2010 by XMLBlueprint
XML Editor. all rights reserved.