xsl-list
[Top] [All Lists]

Re: [xsl] Query regarding validating XML with DTD

2007-09-27 02:56:46
  Hello Deepak,

you (and your application) should not assume that data produced will
always be valid. The DTD is like a contract between you and the data
producer, that allows to check whether the received item matches the
specification.

You should definitely activate validation by default in production,
and I would even advise using stronger validation than DTD alone can
provide like XML Schema or RELAXNG.
For performance purpose, you could try to optimize the validation by
compiling the schema and keeping a pool of instances of the validator
alive.

Kind regards,

Eric Bréchemier

On 9/27/07, Deepak Angeswar wrote:
(...)

My question is - is it necessary to validate the XML I receive from
mobile-service-provider against the DTDs? Or can I assume that - since
the XML was created by the same source who created the DTD; the XML
would definitely adhere to the required rules set in the DTD?

The reason is - I would be receiving loads and loads of such XML
thro HTTP POST; if I am going to validate each such POST request against
DTDs; it might be a huge performance issue!


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>