You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xalan.apache.org by Sheen Brisals <Sh...@hp.com> on 2001/12/04 09:21:55 UTC

XPath help please..

Hi all,

Please can you help me with this problem which is nagging me...

Assume that a program accepts XPath expressions from the user, like the 
one given below. 

	concat( Sale/BillID, 'SALE' )

where Sale/BillID is an element in the source XML document. When I 
evaluate/execute this expression using XPathAPI I get a String object 
as the result. Fine. But in reality the path 'Sale/BillID' given within 
the 'concat' function may not be a valid path. So my question is, Is 
there any way by which we can validate a given XPath expression against 
a source document or Is there a way to extract the 'path' strings from 
an XPath expression/function so that such validation can be done 
separately and the user can be notified of the error appropriately?

I strongly feel that there must be some implementation available within 
Xalan to do this kind of checks and validations. It would be very 
useful if someone can give few ideas on this issue.

Thanks,
Sheen