xsl-list
[Top] [All Lists]

RE: A MySQL heads-up.

2003-12-03 02:24:40
Sorry Tommie, I know it's off topic, but surely the XML analogue for a NULL 
value in SQL is no element at all, rather than an empty element or an element 
with a formal value. Any DTD that refers to an element corresponding to a 
nullable field must make that element optional.

John Marshall
Accurate Software

80 Peach Street, Wokingham, Berkshire, RG40 1XH, UK.
Tel: +44 (0)118 977 3889
Fax: +44 (0)118 977 1260
http://www.accuratesoftware.com <http://www.accuratesoftware.com>  




-----Original Message-----
From: owner-xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
[mailto:owner-xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com]On Behalf Of Ben 
Trafford
Sent: 03 December 2003 00:44
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: Re: [xsl] A MySQL heads-up.



At 06:26 PM 12/2/2003 -0600, Paul DuBois wrote:
At 18:21 -0500 12/2/03, Ben Trafford wrote:
        Just a wee heads-up for anybody using MySQL's XML output 
function...it seems to export any empty field with a datatype of "text" 
as an empty element, rather than an element containing the NULL one 
might expect.

Why do you expect this?  An empty field is not the same as a field that
contains NULL.

         Weeeeelllllll...according to the mysqldump -without- the -X 
option, it isn't. The same data that came up as empty elements in XML came 
up as NULL fields in the SQL output of mysqldump.

In both cases, the output for the empty value and the NULL value are
different.  If they were not, you'd be hard-pressed to distinguish
the two in your stylesheets.  (Of course, as it is, you can't really
distinguish NULL from a column containing the string "NULL", hm....)

         As I mentioned above, try using mysqldump on the same data, and 
viewing the SQL you get. You may be surprised. I sure was.

--->Ben 


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list





Accurate Software

info(_at_)accuratesoftware(_dot_)com 
www.accuratesoftware.com

Europe . North America . Australasia . Africa

The information in this email is confidential and privileged and is intended 
only for the use of the individual or entity listed above.  If you are neither 
the intended individual, or entity listed above, nor the person responsible for 
the delivery of this email to the intended recipients, you are hereby notified 
that any unauthorised distribution, copying or use of this email is prohibited. 
If you have received this email in error, please notify the Accurate system 
manager at postmaster(_at_)accuratesoftware(_dot_)com or on +44 (0)118 977 
3889.  The views expressed in this communication may not necessarily be the 
views held by the Accurate Group.


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list



<Prev in Thread] Current Thread [Next in Thread>