Validating your document

The valid option invokes a parser that makes sure the XML document you are querying conforms to its DTD. Your standalone XML document must have a valid DTD before you run the validate option.

For example, this command makes sure the bookstore.xml document conforms to its DTD:

java com.sybase.xml.xql.XqlDriver -qstring "/bookstore" -validate 
	-infile bookstore.xml