Skip to Content
0
Former Member
Mar 24, 2010 at 10:48 AM

Xpath-String Function for Interface determination

511 Views

Hi All,

My requirement is to find the number of records in the field CSVData and compare it with value in the field 'RecordCount'.We want to use xpath functions in Interface determination to do the same.

The source structure is as follows:

MT_Segment           
-Records	  	
--Record	  	
---AddressDetails  
----HouseAddressDetails
-------CSVData
-------RecordCount

The entire data is coming in the field 'CSVData' which will contain multiple records separated by new line.

eg:CSVData contains:

abc,1,2,3

xyz,11,22,33

Tried with:

(/p1:MT_Segment/[count(tokenize(Records/Record/AddressDetails/HouseAddressDetails/CSVData,"\n"))=

(Records/Record/AddressDetails/HouseAddressDetails/RecordCount)]EX)

This is not working.

It is confirmed that string functions work as I've tried string-length.

Problems could be either:

1.The syntax is incorrect

2.Combination of string functions cannot be used

3.tokenize and count connot be used in PI.We tried some other combinations like count(Index-of(CSVData)).It didn't work.

4.Any other ?

Already referred the below blog and few other threads on sdn

/people/shabarish.vijayakumar/blog/2006/06/07/customise-your-xpath-expressions-in-receiver-determination

Can this requirement be achieved with Xpath functions?If yes, please help with the syntax for it.

That will be real help!

Thanks,

Manjusha.