[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

[xsl] Parse a variable which contains a tree-fragment

Subject: [xsl] Parse a variable which contains a tree-fragment
From: "Gerald Fingerlos" <gerald@xxxxxxxxxxxx>
Date: Wed, 21 Jan 2004 23:09:06 +0100

My problem is as follows:
I have a variable $result which contains the following
        <instance class-name="User" src-dn="\XY\EMA\G2 F2">
            <attr attr-name="manager">
                <value type="dn">\xy\EMA\test1\G1 F1</value>
        <instance class-name="User" src-dn="\XY\EMA\G1 F1">
What I want to do is to select the src-dn if there is _no_ "attr
In this case, the result should be "\XY\EMA\G1 F1"
I tried it with the following stylesheet:
    <xsl:when test="$result//attr[@attr-name]='manager'"/>
    <add-attr attr-name="manager">
            <xsl:value-of select="="$result//@src-dn"/>
But obviously this doesnt work because the value-of select chooses the
first available one.
Can anyone give me a hint how this could be corrected?
Thank you in advance,

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

Current Thread