[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: managing unknown values

  • From: Mike_Leditschke@n...
  • To: Guillaume Rousse <rousse@c...>
  • Date: Tue, 11 Sep 2001 10:50:02 +1000

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

Regards
Michael


                                                                                                                        
                    Guillaume Rousse                                                                                    
                    <rousse@c...        To:     "Bailey, Stephen" <SBailey@e...>, xmlschema-dev@w...        
                    u.fr>                     cc:                                                                       
                    Sent by:                  Subject:     Re: managing unknown values                                  
                    xmlschema-dev-requ                                                                                  
                    est@w...                                                                                          
                                                                                                                        
                                                                                                                        
                    11/09/2001 03:36                                                                                    
                    AM                                                                                                  
                                                                                                                        
                                                                                                                        




Ainsi parlait Bailey, Stephen :
> Guillaume,
>
> Tags that must be present, but the value is not known can be declared
using
> 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...
Schema:
<element name="foo" type="KeyRefType" nillable="true"/>
<element name="bar" type="KeyRefType"/>
<complexType name="KeyRefType">
  <attribute name="idref" type="string"/>
</complexType>
Instance:
<foo xsi:nil="true"/>
<bar idref="idx"/>
Error message:
General Schema Error: xsi:nil must not be specified for the element bar
with
{nillable} equals 'false'.

I thought it was missing idref attribute in foo that was in cause, so i
made
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@c...>
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.

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.