Wrox Programmer Forums
Go Back   Wrox Programmer Forums > XML > XSLT
|
XSLT General questions and answers about XSLT. For issues strictly specific to the book XSLT 1.1 Programmers Reference, please post to that forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the XSLT section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old April 3rd, 2008, 12:39 PM
Registered User
 
Join Date: Apr 2008
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Handle Null or Blank values using xslt in csv data

consider the below csv data

  A,B,,D,E,F,E,G
      In the third place there is a null value instead of (A,B,C,D..).
      how to capture and handle that null value.


 
Old April 3rd, 2008, 07:30 PM
mhkay's Avatar
Wrox Author
 
Join Date: Apr 2004
Posts: 4,962
Thanks: 0
Thanked 292 Times in 287 Posts
Default

You have to be very careful with your terminology. It is not a null value, it is a zero-length string.

Most of the standard approaches to tokenizing (for example the tokenize() function in XPath 2.0, or head-tail recursion in 1.0) handle zero-length strings with no problems. If your code isn't handling this case then it is wrong, but to see where it is wrong, we first need to see it.

Michael Kay
http://www.saxonica.com/
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference





Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I handle NULL resultset field? cm.cruz Classic ASP Basics 1 January 28th, 2008 06:29 PM
Formating the data Table values in XSLT vimalpatel2u XSLT 5 October 5th, 2007 04:41 AM
how to handle null values imaginevictor ASP.NET 1.x and 2.0 Application Design 1 March 20th, 2007 01:52 AM
Assigning null values in typed data sets Utsav.Kedia General .NET 0 January 16th, 2006 03:02 PM
Cannot make ‘databound’ date textbox null / blank? dlsc C# 0 August 12th, 2005 12:57 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.