Hi Stef,

I was replying to your other mail, about accessing the "form" information.
I was going to ask why you want such change. Now you've answered it.

> Ah, I meant it to be accessible because I thought it defined how the XML
> document that uses that grammar should be serialized. So it defines
> wether elements or attributes should be qualified or not in instance
> documents. This is useful if I want to get the default for an attribute
> or element that has no 'form' specified.

There seems to be some misunderstanding of the meaning of "form". It
doesn't define how instance documents are validated/serialized. Instead, it
defines whether an element/attribute declaration has the same namespace as
the target namespace of the schema document.

No matter what value those attributes have, as long as the
element/attribute declaration has a {target namespace}, then the
corresponding element/attribute in the instance has to belong to that
namespace.

Cheers,
Sandy Gao
Software Developer, IBM Canada
(1-905) 413-3255
[EMAIL PROTECTED]



                                                                                       
                                         
                      Stef Epardaud                                                    
                                         
                      <[EMAIL PROTECTED]        To:       [EMAIL PROTECTED]            
                                
                      m>                       cc:                                     
                                         
                                               Subject:  Re: patches to add 
attribute/elementFormDefault support for            
                      03/25/2003 09:23          SchemaGrammar                          
                                         
                      AM                                                               
                                         
                      Please respond to                                                
                                         
                      xerces-j-dev                                                     
                                         
                                                                                       
                                         
                                                                                       
                                         



On Tue, Mar 25, 2003 at 09:09:09AM -0500, Sandy Gao wrote:
> Unfortunately, it doesn't work that way. One schema grammar in Xerces
> includes all components that belong to a certain namespace. These
> components can come from different schema documents (via <include> and
> <redefine>). And the different schema documents can have different
> attribute/elementFormDefault values. So the single value on the grammar
> object can't reflect what was in all those schema documents.

Ah, I meant it to be accessible because I thought it defined how the XML
document that uses that grammar should be serialized. So it defines
wether elements or attributes should be qualified or not in instance
documents. This is useful if I want to get the default for an attribute
or element that has no 'form' specified. I understand how it could be
messed up by include or redefines, though, but I'm not sure how I can
fix that, other than by querying the right SchemaGrammar for a given
declaration.

--
# Stef Epardaud, # Teachers have potentially more power than military,
# Java Defeater  #   the former can teach us how to not need the latter.
#     Earth      # Lunatech Research,
#  Solar System  #   soon we'll quit researching and start finding...

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