[Home] [By Thread] [By Date] [Recent Entries]


.

 

I am hearing that it is best practice to allow both scenarios – the “empty element” and the “omitted element” – in documents that are provided.  

 

 

I don't think there is any consensus on this.

 

My own preference is to model absent or not-applicable data by omitting the relevant element or attribute, using elements/attributes that exist but have an empty string as their value only for cases where this has some real meaning.

 

There is of course a third way to represent absent information, namely to use the xsi:nil attribute, but I've never met anyone who thinks that is a good idea.

 

Michael Kay

http://www.saxonica.com/


Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member