Re: [xml-doc] xslt as schema - why use a schema?
- What you are missing is the structural validation of the XML
documents and the validation of certain elements that contain
text. Validation may catch errors in the documents that otherwise
would cause the transformation to fail or the output to be
wrong. If you have this under control with your current process,
then you don't need a schema.
The advantage of structural validation is its declarative nature,
which reduces the amount of error checking code in the document
processor. The disadvantage is less flexibility (unless the
schema is designed very well) and more difficulty to programmatically
process errors. This is needed to translate a validation error into
context-dependent human-readable feedback. The latter is not caused
by validation as such. It is a practical limitation in XML processors,
because there is no standard way to cope with the issue.
Note that validation is not required in all possible processing
chains. At some point you need to be able to rely on the correct
structure of the document. Perhaps this is checked when the document
is saved in the system or the user may perform a check offline.
It is important to be aware of this, because in practice there is
a performance penalty when using schema-validation.
On 04 Feb 2008, at 13:49, rochellefisher2000 wrote:
> We are using XML files to create documentation for a web application.
> There is no schema or DTD; we've been using an XSLT to define the
> of the tags and their transformation into HTML. Each XML has a PATH to
> the XSLT.
> What are we missing by not using a schema?
Werner Donné -- Re http://www.pincette.biz
Engelbeekstraat 8 http://www.re.be
tel: (+32) 486 425803 e-mail: werner.donne@...