Christopher Elkins wrote:
> 
> Brett McLaughlin [[EMAIL PROTECTED]] wrote:
> > > > I see what you are doing here, but you are assuming that all the
> > > > required elements and attributes are present.  If not in production,
> > > > this is certainly not a given in development.  You might want to turn on
> > > > validation, as well (See my note above).
> > > >
> 
> <...snip...>
> 
> > > On a related note: if users write their XML docs to the schema and we write
> > > code to the schema, why wouldn't we want to turn on parser validation and
> > > enforce the contract between the mapping doc and the schema? Is it because
> > > the schema may not always be accessible (to the end-user and/or developer)?
> > > I've never understood why you would go to the trouble of creating a schema (or
> > > a DTD) if you weren't going to require valid XML docs. Just wondering.
> >
> > I said to do that... did you miss that?
> >
> No, I didn't miss it. You're wording implied (to me, at least) that in some
> cases you _might not_ want to turn on validation, and I couldn't come up with
> a scenario where that made sense.

Lots of times.  Offline content/map generation, for one.  You can't
reference the DTD or XML Schema in some cases, and you have static
content.  Validation should have already occurred in development of the
classmap.

High volume production sites, for another.  Development involves QA,
which should involve validation, and ensure that it is _impossible_ to
generate invalid content from the program (good white box testing
here).  Once its time to go live, remove the validation - it's wasted
cycles.  Very expensive to validate, even with the newer standardized
SAX 2.0 interfaces coming out, the more so as namespaces are used.

I run several production XML sites, and none have validation turned on
after going live (although it was on for 100% of development and QA). 
It just wastes cycles.  

Granted if you are letting users generate content (like a ClassLoader
utility to create, via GUI or something) it needs to occur; other than
that, no way ...

-Brett


> 
> --
> Christopher Elkins
> 
> ------------------------------------------------------------
> To subscribe:        [EMAIL PROTECTED]
> To unsubscribe:      [EMAIL PROTECTED]
> Problems?:           [EMAIL PROTECTED]


------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Problems?:           [EMAIL PROTECTED]

Reply via email to