• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

Effect of nillable=true

 
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What is I have an element like this :

<xsd:element name="abc" type="xsd:string" nillable="true"/>

Are these three right :

<abc nil="1"></abc>
<abc nil="true"></abc>
<abc>abcde</abc>
 
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes they are right !
 
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It is a little bit tricky because you didn't declared the "nil" attribute in the element. The "nillable" attribute from the XML Schema is just to say if the element can or cannot to be without a value, empty. So from my point of view only the last is right.
 
Bartender
Posts: 2968
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
See XML Schema Part 0: Primer Second Edition: 2.9 Nils


Correct:


NULL - The database's black hole

An area where empty and null mean different things and "nillable" comes into play
Web Services Programming Tips and Tricks: Array Gotcha - Null Array vs. Empty Array
[ November 26, 2008: Message edited by: Peer Reynders ]
 
Whip out those weird instruments of science and probe away! I think it's a tiny ad:
Free, earth friendly heat - from the CodeRanch trailboss
https://www.kickstarter.com/projects/paulwheaton/free-heat
reply
    Bookmark Topic Watch Topic
  • New Topic