Title: how to select another rowset with an id based on an id in the current rowset

Hi I have the following:

<document>
        <rowset1>
                <object1>
                        <id>1</id>
                        <value>a</value>
                <object1>
                </object1>
                        <id>2</id>
                        <value>b</value>
                </object1>
                <object1>
                        <id>3</id>
                        <value>c</value>
                </object1>
        </rowset1>
        <rowset2>
                <object2>
                        <id>2</id>
                </object2>
                <object2>
                        <id>3</id>
                </object2>
        </rowset2>
</document>

so I have the following transform fragment:

        <xsl:for-each select="/document/rowset2/object2">
                <!-- in current object2 context -->
                <xsl:value-of select="/document/rowset1/object1[id=child::id]/value"/>
        </xsl:for-each>
but it doesn't seem to work.
What I am trying to do is to iterate each "object2" in rowset2 to fetch the value from object1 from rowset1 based on the "id" value but I am struggling with the xpath condition in the sqaure brackets. What have I done wrong here?

A.T.


This message may contain privileged and/or confidential information.  If you have received this e-mail in error or are not the intended recipient, you may not use, copy, disseminate or distribute it; do not open any attachments, delete it immediately from your system and notify the sender promptly by e-mail that you have done so.  Thank you.

Reply via email to