OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: managing unknown values

You may already have received an answer to this one but it looks to me
like you need to include a prefix on the definition of nillable in your
schema. I suspect the parser is not seeing the nillable attribute in
the correct namespace.


                    Guillaume Rousse                                                                                    
                    <rousse@ccr.jussie        To:     "Bailey, Stephen" <SBailey@erac.com>, xmlschema-dev@w3.org        
                    u.fr>                     cc:                                                                       
                    Sent by:                  Subject:     Re: managing unknown values                                  
                    11/09/2001 03:36                                                                                    

Ainsi parlait Bailey, Stephen :
> Guillaume,
> Tags that must be present, but the value is not known can be declared
> the nillable attribute as follows...
> <xs:element name="foo" type="xs:integer" nillable="true"/>
> In the instance document, when the value is known you can declare the
> element
> <foo>25</foo>
> or when this element has unknown value you can declare the element
> <foo xsi:nil="true"/>
Exactly what i needed, thanks.

However, it fails in some cases...
<element name="foo" type="KeyRefType" nillable="true"/>
<element name="bar" type="KeyRefType"/>
<complexType name="KeyRefType">
  <attribute name="idref" type="string"/>
<foo xsi:nil="true"/>
<bar idref="idx"/>
Error message:
General Schema Error: xsi:nil must not be specified for the element bar
{nillable} equals 'false'.

I thought it was missing idref attribute in foo that was in cause, so i
it optional in KeyRefType, but that doesn't change anything. Morevoer, it's

strange the message targets bar element when foo is the guilty (removing it

solves the probelm). It this a bug in my validater (xerces-j 1.4.2) ?
Guillaume Rousse <rousse@ccr.jussieu.fr>
GPG key http://lis.snv.jussieu.fr/~rousse/gpgkey.html

This e-mail is confidential.  If you are not the intended recipient, any use, disclosure or copying of this document is unauthorised and prohibited.  If you have received this document in error, please delete the email and notify me by return email or by phoning the NEMMCO Helpdesk on 1300 300 295.