Indrajit Bhattacharya wrote:
Hi Dave,

1. I'm using VC7.1.3088 (.Net framework SP1) on Windows XP Professional.

Then you shouldn't have any problem building the binaries if you follow the build instructions. I use VS .Net 2003 as my primary development platform.


2. Here I did not put it correctly. (pls. forgive me as I'm quite new to XML, Xalan and XPath).

Pls. see the problem I'm into below:

I have some XML like:
<A>
     <B>
          <C1 id="id1">1</C1>
          <C2 id="id2">2</C2>
     </B>
     <D id="id('id1')">3</D>
</A>

When I give XPath expression like : /A/D/@id , I need to get value 1. The value 1 will be coming from the element C1 whose id is "id1". Please let me know how I can do the same, and how I can get the desired value using the sample applications with Xalan.

The sample XPath applications that ship with Xalan-C would need to be modified to do something like this, although you could do it with a stylesheet and an extension function.


Currently I'm getting the string output id('id1'). In fact I need to get value 1 (this corresponds to the value of the element whose id is id1).

Since you want to use an XPath expression to select an attribute with another value that should also be evaluated as an XPath expression, you just need to add another evaluation. It should be very straightforward to modify the SimpleXPathAPI sample to do that.

Dave

Reply via email to