R
Ravi
My XML looks like:
<role type="Joker">
<Profile id="13">ABC_Organization</Profile>
</role>
My XSL looks like:
<xsl:variable name="prefix">profile_joker_</xsl:variable>
<xsl:variable name="vid"><xsl:value-of select="Profile/@id"/></xsl:variable>
<xsl:variable name="vname"><xsl:value-of select="Profile"/></xsl:variable>
<xsl:variable name="suffix">.xml</xsl:variable>
<xsl:variable name="tmp1"><xsl:value-of
select="concat($prefix,$vid)"/></xsl:variable>
<xsl:variable name="tmp2"><xsl:value-of
select="concat($tmp1,'.')"/></xsl:variable>
<xsl:variable name="tmp3"><xsl:value-of
select="concat($tmp2,$vname)"/></xsl:variable>
<xsl:variable name="tmp4"><xsl:value-of
select="concat($tmp3,$suffix)"/></xsl:variable>
<b>Entity: </b><a><xsl:attribute name="href"><xsl:value-of
select="$tmp4"/></xsl:attribute>
<xsl:value-of select="." /></a><br/>
What I am trying to do is to generate a filename from the element values
(the id Profile attribute and the Profile name) and then create a
hyperlink to that filename. The various files are uniquely identified by
the 'id'. The names of the files look like
profile_joker_<ProfileID>.<ProfileName>.xml
the problem is that the ProfileName may have aliases so if Bill and
William are aliases then
profile_joker_5.Bill.xml and profile_joker_5_William.xml
refer to the same file. However I have only the file
profile_joker_5.Bill.xml in my directory. So if I try to create a link
to profile_joker_5_William.xml it fails as there is no such file in the
directory (though the target really exists and is profile_joker_5_Bill.xml)
I am wondering if there is someway to find the filename in the current
directory which starts with profile_joker_5 and create a hyperlink to
that filename regardless of the profilename (i.e. base the target of the
link only on the ProfileID and make the Profilename a wildcard).
I am not sure how to proceed. Any suggestions will be highly welcome.
Thank you.
<role type="Joker">
<Profile id="13">ABC_Organization</Profile>
</role>
My XSL looks like:
<xsl:variable name="prefix">profile_joker_</xsl:variable>
<xsl:variable name="vid"><xsl:value-of select="Profile/@id"/></xsl:variable>
<xsl:variable name="vname"><xsl:value-of select="Profile"/></xsl:variable>
<xsl:variable name="suffix">.xml</xsl:variable>
<xsl:variable name="tmp1"><xsl:value-of
select="concat($prefix,$vid)"/></xsl:variable>
<xsl:variable name="tmp2"><xsl:value-of
select="concat($tmp1,'.')"/></xsl:variable>
<xsl:variable name="tmp3"><xsl:value-of
select="concat($tmp2,$vname)"/></xsl:variable>
<xsl:variable name="tmp4"><xsl:value-of
select="concat($tmp3,$suffix)"/></xsl:variable>
<b>Entity: </b><a><xsl:attribute name="href"><xsl:value-of
select="$tmp4"/></xsl:attribute>
<xsl:value-of select="." /></a><br/>
What I am trying to do is to generate a filename from the element values
(the id Profile attribute and the Profile name) and then create a
hyperlink to that filename. The various files are uniquely identified by
the 'id'. The names of the files look like
profile_joker_<ProfileID>.<ProfileName>.xml
the problem is that the ProfileName may have aliases so if Bill and
William are aliases then
profile_joker_5.Bill.xml and profile_joker_5_William.xml
refer to the same file. However I have only the file
profile_joker_5.Bill.xml in my directory. So if I try to create a link
to profile_joker_5_William.xml it fails as there is no such file in the
directory (though the target really exists and is profile_joker_5_Bill.xml)
I am wondering if there is someway to find the filename in the current
directory which starts with profile_joker_5 and create a hyperlink to
that filename regardless of the profilename (i.e. base the target of the
link only on the ProfileID and make the Profilename a wildcard).
I am not sure how to proceed. Any suggestions will be highly welcome.
Thank you.