The BizTalk Mapper does not support XSLT 2.0 (see MSDN Documentation http://msdn.microsoft.com/en-us/library/aa559261%28BTS.10%29.aspx) so you will need to use the EXSLT extensions if you want to use the mapper.
There is a great post here by Richard Hallgren that covers how to use EXSLT within the BizTalk Mapper.
One additional thought is about an alternative solution. It is not clear if you absolutely must make your database calls one by one - would making a single call work?
It is possible to provide a stored procedure a delimited string as a parameter and to then use a function to break this string up. I've included an example of such a function below, the example being a table function. You'll be able find lots of other implementations on the web.
With the table function you can join against this in you store lookup procedure.
If this meets your needs it should be a lot faster since you now perform just a single database hit and can perform set operations to get back your list of stores.
CREATE function fn_ParseCSVString
(
@INPUTCSV varchar(MAX)
)
RETURNS @TBL TABLE
(
COL1 INT
)
AS
BEGIN
DECLARE @NUM_STR NVARCHAR(MAX)
SET @NUM_STR = @INPUTCSV
SET @NUM_STR = REPLACE(@NUM_STR,' ','')
-- this will trim any intermediate spaces
WHILE LEN(@NUM_STR) >= 0
BEGIN
DECLARE @@SUBSTR VARCHAR(100)
IF CHARINDEX(',',@NUM_STR,0) <> 0
BEGIN
SET @@SUBSTR = SUBSTRING(@NUM_STR,0,CHARINDEX(',',@NUM_STR,0))
INSERT INTO @TBL VALUES(@@SUBSTR)
END
ELSE
BEGIN
INSERT INTO @TBL VALUES(@NUM_STR)
BREAK
END
SET @@SUBSTR = @@SUBSTR + ','
SET @NUM_STR = SUBSTRING(@NUM_STR, CHARINDEX(',',@NUM_STR,0) + 1, LEN(@NUM_STR))
END
RETURN
END