Hiran, Thanks for your effort. But, my problem is slightly different. I need to do the validation within my program. I'm looing for a way of validating the whole expression against a source document or extracting the path strings from a given expression/function.
Regards, Sheen Hi, Sheen. Your expression "Sale/BillID" is always valid, but it maybe evaluates to the empty node set (no such node found). So all you have to do is to check whether that is the case. You can do that using the boolean function like it <xsl:if test="boolean(Sale/BillID)">...</xsl:if> See also http://www.w3.org/TR/xpath#function-boolean Hiran ----------------------------------------- Hiran Chaudhuri SAG Systemhaus GmbH Elsenheimerstra?e 11 80687 Munchen Germany [EMAIL PROTECTED] Phone +49-89-54742-134 Fax +49-6151-9234-5134 > -----Original Message----- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > Sent: Monday, December 03, 2001 5:45 PM > To: [EMAIL PROTECTED] > Subject: XPath help please... > > > > > > ---------- > > Von: [EMAIL PROTECTED]:[EMAIL PROTECTED] > > Gesendet: Montag, 3. Dezember 2001 17:44:59 > > An: [EMAIL PROTECTED] > > Betreff: XPath help please... > > Diese Nachricht wurde automatisch von einer Regel weitergeleitet. > > > Hi all, > > Please can you help me before I start getting into the complexities. > > If I have an expression like > > concat( Sale/BillID, 'SALE' ) > > where Sale/BillID is an element in the source XML document. If I > evaluate/execute this expression using XPathAPI I get String object, > irrespective of whether the path is valid or not. > > Is there any way, in a given such expression, can I identify the path > strings so that the validation of the path can be done separately? Or > is there a way I can achieve this by using existing Xalan classes? > > > Thanks, > Sheen > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
