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



> 
> >
> > Is there a feature to contol this?
> 
> No, there's no feature for controlling this however by examining the PSVI
> your application can determine which attributes were defaulted by the
> schema and then can ignore or remove them later.

You can't do this. You cannot distinguish (from what I can see) as to the
attributes that were added by the saxparser, and the attributes that were
present in the source.

What are the rules for default element content generation?

Is there anything else that is done as a side effect of retrieving the PSVI?

> 
> >
> > I am using xerces 2.6.2, jdk 1.5
> >
> >
> >
> >
> >
> > Mike
> >
> >
> 
> [1] http://www.w3.org/TR/xmlschema-1/#d0e8328
> 
> ---------------------------
> Michael Glavassevich
> E-mail: [EMAIL PROTECTED]
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]




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

Reply via email to