|
Subject: RE: [xsl] get the name of a node which I know the value From: "KIENLE, STEVEN C [IT/0200]" <steven.c.kienle@xxxxxxxxxxxxx> Date: Tue, 21 Aug 2001 06:51:57 -0500 |
I think what you want is something like:
<xsl:variable name="CurrentFile"
select="name(//*[@* =
'C:/XML/currentAuthentifiedPackageDescriptor_N2.xml'])"/>
This will search all of the nodes in the tree for one which has a attribute
with the value specified and returns the name of that node. I am assuming
that the file name is complete, in which case the starts-with function is
not required.
Steve
-----Original Message-----
From: Stephane.Le-Deaut@xxxxxxxxxx [mailto:Stephane.Le-Deaut@xxxxxxxxxx]
Sent: Monday, August 20, 2001 11:41 AM
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: [xsl] get the name of a node which I know the value
I have this xml file :
<?xml version="1.0" encoding="ISO-8859-1"?>
<XslParameter>
<InputFile
currentAuthentifiedPackageDescriptor1="C:/XML/currentAuthentifiedPackageDesc
riptor_N1.xml"
currentAuthentifiedPackageDescriptor2="C:/XML/currentAuthentifiedPackageDesc
riptor_N2.xml"
referenceAuthentifiedPackageDescriptor_Nectar="C:/XML/referenceAuthentifiedP
ackageDescriptor_Nectar.xml"
automate="C:/XML/automate.xml"
user="C:/XML/user_prg_dha.xml"/>
<OutputFile
subsetDescriptor="C:/XML/subsetDescriptor.xml"
xslTrack="C:/XML/XslTrack_Test_makeSubsetDescriptor_01.xml"
xslError="C:/XML/XslError_Test_makeSubsetDescriptor_01.xml"/>
<Parameter
signature="C:/XML/Signature.xml"/>
</XslParameter>
I know the value of the "currentAuthentifiedPackageDescriptor2" attribute
and I would like to assign a variable with the name of the node.
I tried to use name() function like this
<xsl:variable name="CurrentFile"
select="name()[starts-with(@*,'C:/XML/currentAuthentifiedPackageDescriptor_N
2.xml')]"/>
but it does not work.
Please help me.
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| [xsl] get the name of a node which , Stephane . Le-Deaut | Thread | [xsl] external-destination question, Paul Kowlessar |
| [xsl] Selection of every second nod, Conny Kreyßel | Date | Re: [xsl] Selection of every second, Jeni Tennison |
| Month |