Re: [xsl] A MySQL heads-up.

Subject: Re: [xsl] A MySQL heads-up.
From: Ben Trafford <ben@xxxxxxxxxxx>
Date: Tue, 02 Dec 2003 19:44:19 -0500

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


XSL-List info and archive:

Current Thread