Validating xml against schema
If the schema definition does not define a target namespace, then it applies to the default (unnamed, or null) namespace.This tells XMLBlueprint to validate the XML Document against Schematron Schema "book.sch".Does anyone know why they'd be returning different results? You're now ready to take a deeper look at the process of XML Schema validation.In this case, the Schematron Schema is to be found in the same folder as the XML Document.It seems like validating an XML document against a schema would be a pretty simple thing to do in the .
There are two ways to do that: have a namespace prefix--that is, for the elements you typically define in any simple, uncomplicated XML document.
(You'll see how to deal with multiple namespaces in the next section.) You can also specify the schema file in the application: Here, too, there are mechanisms at your disposal that will let you specify multiple schemas. Namespaces let you combine elements that serve different purposes in the same document without having to worry about overlapping names.
Note: The material discussed in this section also applies to validating when using the SAX parser.
So a namespace that does have a name can never be used as the default namespace.
When parsed, each element in the data set will be validated against the appropriate schema, as long as those schemas have been declared.