Loading ...
Sorry, an error occurred while loading the content.

Re: [xml-doc] xslt as schema - why use a schema?

Expand Messages
  • Werner DonnĂ©
    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
    Message 1 of 2 , Feb 4, 2008
    • 0 Attachment
      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.

      Werner.

      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
      > order
      > 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
      BE-3300 Tienen
      tel: (+32) 486 425803 e-mail: werner.donne@...
    Your message has been successfully submitted and would be delivered to recipients shortly.