I'm trying to search a xml document for id=12 and then display the corresponding name value. This is not working for me.Please note that my xml file is very large,os it should terminate upon finding the data. Please tell me how to do it.
<xsl:value-of select="document('bool12.xml')/Data/person/name[../id='12']"/> will do it. But you should check how your XSLT processor implements document() function. Most XSLT processors are DOM-based, it may happen that your file will be read as a whole anyway, regardless of how you implement search. I read that Saxon works with SAX, maybe you will have to use it, if you do not already.
author and deputy
Joined: Jul 13, 2001
Yes Thanks again.Its worked. It took app 10secs to pick a name for a specific code,i picked three names in random order.my xml file sixe is 3.5MB. Haven't tired Saxon.Will try soon. Thanks. Balaji.
Originally posted by Mapraputa Is: <xsl:value-of select="document(