> -----Original Message-----
> From: Bill Michell [mailto:[EMAIL PROTECTED]
> Sent: 20 May 2005 15:38
> To: [email protected]
> Subject: RE: schema validation and default attributes
> 
> 
> 
> > -----Original Message-----
> > From: Mike Skells [mailto:[EMAIL PROTECTED]
> > Sent: Friday, May 20, 2005 3:13 PM
> > To: [email protected]
> > Subject: RE: schema validation and default attributes
> >
> >
> >
> > > -----Original Message-----
> > > From: Michael Glavassevich [mailto:[EMAIL PROTECTED]
> > > Sent: 20 May 2005 14:47
> > > To: [email protected]
> > > Subject: Re: schema validation and default attributes
> > >
> > > On Fri, 20 May 2005, Mike Skells wrote:
> > >
> > > > Hi,
> > > >
> > > > When using the schema validation feature
> > > > http://apache.org/xml/features/validation/schema then I have
> > > > attributes
> > > set
> > > > with the default values. Is this the expected behavior or a bug.
> > >
> > > Yes, this is expected behaviour [1]. Attributes with default values
> > > not specified in the document are added to the PSVI.
> >
> > I would expect then to be added to in the PSVI but not the
> > document. This means that you cannot read a document and
> > write out the same document, as some additional attributes
> > may have been added.
> >
> You can't do this anyway - there are lots of other things that can happen
> too. White space changes, different entity encodings, that kind of thing.
> 
> What you can do is write out a *semantically* identical document. If there
> is a semantic difference in your application between an attribute that is
> not present and an attribute that takes a default value, then I would
> suggest that default attributes are not appropriate.
> 
> After all, these default attributes haven't been added to the sense of the
> document, merely to the representation of it...
> 
It is equally legitimate to say that default attributes could be removed, as
they are still *semantically* the same. [No I am not suggesting that :-) ]

I can see that it is a good idea to simplify other issues in the development
process, where applications cannot cope with attributes being not present,
in taking out the ambiguity, but the documentation and description of the
feature does _not_ describe this. I presume from you comments that this is
clearly a design goal, so the documentation is out of step.

My concern was founded out of creating document that were 5 times as large
(both in memory footprint, and serialized form) This is a large overhead
when dealing with multi-megabyte documents.

I believe that the feature description should list this side effect, at
least as a note. 
The FAQ should list this in the section regarding "What's the result of
having a DTD validator or XML Schema validator in the pipeline?"
----
The current description is -
Turn on XML Schema validation by inserting XML Schema validator in the
pipeline.    

Current note is -
Validation errors will only be reported if validation feature is set to
true. For more information, please, refer to the FAQ    

There is nothing in the FAQ about this
----
Mike



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to