XML document samples > Validating samples

Validating samples
You can validate an XML document sample against the corresponding DTD or XSD (XML Schema).
The <!DOCTYPE...> tag in the sample determines which DTD to validate against. For example:
<!DOCTYPE Music SYSTEM "C:\DTDS\musichits.dtd">
In the root element, you must use the schema location attributes prefix:noNamespaceSchemaLocation or prefix:schemaLocation to specify which XSD to validate against. For example:
<root xsi:schemaLocation="C:\DTDS\musichits.xsd">
The schema location attributes have the namespace URI http://www.w3.org/2001/XMLSchema-instance.
Validating on load
You can configure the XMLIN tool to validate a sample each time it is loaded:
1
Select Tools > Options. The Options dialog box opens.
2
On the Samples tab, select Validate instance document on load.
Validating manually
You can also validate a sample manually by right-clicking the sample and selecting Validate.
OpenText StreamServe 5.6 Updated: 2013-03-01