Subject: Checking external files based on the attribute value
From: "Ganesh Babu N" <nbabuganesh@xxxxxxxxx>
Date: Wed, 13 Aug 2008 18:42:53 +0530
|
Dear All,
I am having an XML file in which I am having the following coding
<graphic picfile="I970106058X_bulb"/>
All the graphic filenames are stored in a separate XML file the contents are:
filelist.xml
<files>
<file>./970106058X_c01_0002.tif</file>
<file>./970106058X_c01_0001.tif</file>
<file>./970106058X_bulb.tif</file>
<file>./970106058X_0000.tif</file>
<file>./970106058X_c01_0003.tif</file>
</files>
Now my task is to search the filelist.xml for @picfile value and if it
is not found raise an error.
I am using the following code:
boolean(document('filelist.xml')/files/file[contains(.,
substring-after(concat(@picfile,'.tif'),'I'))] )
But i am not getting any message. Please help me how to achieve this task.
Regards,
Ganesh
|