• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Paul Clapham
  • Bear Bibeault
  • Jeanne Boyarsky
Sheriffs:
  • Ron McLeod
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Jj Roberts
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • salvin francis
  • Scott Selikoff
  • fred rosenberger

Effect of nillable=true

 
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • 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
  • Quote
  • Report post to moderator
Yes they are right !
 
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • 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
  • 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 ]
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic