> -----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...


-- 
Bill Michell
Development Team Leader, Broadcast Platforms, BBC News Interactive.

http://www.bbc.co.uk/

This e-mail (and any attachments) is confidential and may contain
personal views which are not the views of the BBC unless specifically
stated.
If you have received it in error, please delete it from your system. 
Do not use, copy or disclose the information in any way nor act in
reliance on it and notify the sender immediately. Please note that the
BBC monitors e-mails sent or received. 
Further communication will signify your consent to this.

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

Reply via email to