Subject: Defaulting values in xsl
From: Mini Vatsala <minimohanv@xxxxxxxxx>
Date: Thu, 13 Oct 2005 09:56:58 -0700
|
Hi All,
I have the following segment in my XSL :
<Book>
<BookName><xsl:value-of select="BOOK_NM"/></BookName>
</Book>
In my output XML, I want to default the value of <BookName> as
"Unknown" , even if the value of "BOOK_NM" in original document is
null.
In case null , the input XML document will have BOOK_NM as :
< BOOK_NM ></BOOK_NM >
Could you please suggest a solution ?
I am using xalan-j_2_7_0 as the XSLT processor.
Thanks,
Mini
|