Subject: [xsl] Getting the attribute of a node knowing the value of other attribute From: "Monica Ferrero" <monica.ferrero@xxxxxxxxxxx> Date: Wed, 29 May 2002 14:41:29 +0100 |
Hello! I am transforming an XML file to LDIF format. I am trying to get the name of the Subnetwork knowing its id when I am in the trail object: Here you can see the XML (it is fixed): <Layer id="443__2_2" name="VC4" signalType="VC4"> <Subnetwork id="342__2_2_1" name="M" > ... </Subnetwork> <Subnetwork id="342__2_2_2" name="T"> </Subnetwork> <TrailList id="344__2_2_17" nsueName="M<->C" > <TopologicalEndPoints> <TopologicalEndPointA> <SubnetworkRef idref="342__2_2_1"/> </TopologicalEndPointA> <TopologicalEndPointZ> <SubnetworkRef idref="342__2_2_4"/> </TopologicalEndPointZ> </TopologicalEndPoints> <Trail id="355__2_2_17_1" nsueName="M<->C[1]" > </Trail> </TrailList> The XSL: <xsl:template match="Trail"> dn: cn=<xsl:value-of select="@name"/>, cn=<xsl:value-of select="../../../../@name"/>, cn=Connectivity objectclass: mTrail cn: cn=<xsl:value-of select="@name"/> id: <xsl:value-of select="@id"/> subnetworkA: <xsl:value-of select="../TopologicalEndPoints/TopologicalEndPointA/SubnetworkRef/@idref"/> subnetworkA: <xsl:value-of select="../../Subnetwork[@id='342__2_2_1']/@name"/> subnetworkA: <xsl:value-of select="../../Subnetwork[@id='{../TopologicalEndPoints/TopologicalEndPointA/SubnetworkRef/@idref}']/@name"/> </xsl:template> The result of: subnetworkA: <xsl:value-of select="../TopologicalEndPoints/TopologicalEndPointA/SubnetworkRef/@idref"/> is 342__2_2_1 and subnetworkA: <xsl:value-of select="../../Subnetwork[@id='342__2_2_1']/@name"/> is M but if I mixed the comands together it does not work: subnetworkA: <xsl:value-of select="../../Subnetwork[@id='{../TopologicalEndPoints/TopologicalEndPointA/SubnetworkRef/@idref}']/@name"/> Any ideas? Any other solution to the problem? Help is really apreciated!!! Thanks, Monica XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Generate PDF from XML, Oleg Tkachenko | Thread | Re: [xsl] Getting the attribute of , J.Pietschmann |
Re: [xsl] Generate PDF from XML, David Carlisle | Date | RE: [xsl] Using count() with a para, Dean Saxe |
Month |