XSLT search for a single record-should be simple...

EDN Admin

Well-known member
Joined
Aug 7, 2010
Messages
12,794
Location
In the Machine
Obviously, calling it a record shows what a novice I am... I have a simple XSLT to use with a full, standard extract of an IIS/FTP server configuration. I have to reference each section under the IISFtpVirtualdir section using ./@. and I also
have to use a substring to remove all the /lm/msftpsvc/1/root prefixes from the report. I have ONLY been able to pull back the entire list of hundreds upon hundreds of virtual directory entries but ideally, I want to find only records that match userID
in ./@location. I have tried various ways to read even a single record from the XML file but nothing works. I can call the XML file from within a DNN page and pass a variable such as pagename.aspx?configname=userID. Ive tried XSL param settings
but have had no luck doing that either.
Any suggestions as to how to query the XML to retrieve a single record would be greatly appreciated!
<p style="margin:0in 0in 0pt <span style="font-family:Calibri; font-size:small <?xml version="1.0" encoding="utf-8"?>
<p style="margin:0in 0in 0pt <span style="font-family:Calibri; font-size:small <xsl:stylesheet version=1.0 xmlns:xsl=http://www.w3.org/1999/XSL/Transform
<p style="margin:0in 0in 0pt <span style="font-family:Calibri; font-size:small xmlns:msxsl="urn:schemas-microsoft-com:xslt"
<p style="margin:0in 0in 0pt <span style="font-family:Calibri; font-size:small xmlns:mb="urn:microsoft-catalog:XML_Metabase_V269_0"
<p style="margin:0in 0in 0pt <span style="font-family:Calibri; font-size:small exclude-result-prefixes="msxsl
<p style="margin:0in 0in 0pt <span style="font-family:Calibri; font-size:small <xsl:output method="html"/>
<p style="margin:0in 0in 0pt <span style="font-family:Calibri; font-size:small <xsl:template match="/
<p style="margin:0in 0in 0pt <span style="font-family:Calibri; font-size:small <h3>FTP Server Virtual Directories</h3>
<p style="margin:0in 0in 0pt <span style="font-family:Calibri; font-size:small <tr>
<p style="margin:0in 0in 0pt <span style="font-family:Calibri; font-size:small <td><b><font face="arial-narrow" size="2" color="000000 Configuration Name</font></b></td>
<p style="margin:0in 0in 0pt <span style="font-family:Calibri; font-size:small <td><b><font face="arial-narrow" size="2" color="000000 UNC Path</font></b></td>
<p style="margin:0in 0in 0pt <span style="font-family:Calibri; font-size:small <td><b><font face="arial-narrow" size="2" color="000000 Connects Using</font></b></td>
<p style="margin:0in 0in 0pt <span style="font-family:Calibri; font-size:small </tr>
<p style="margin:0in 0in 0pt <span style="font-family:Calibri; font-size:small <xsl:apply-templates />
<p style="margin:0in 0in 0pt <span style="font-family:Calibri; font-size:small </xsl:template>
<p style="margin:0in 0in 0pt <span style="font-family:Calibri; font-size:small <xsl:template match="mb:IIsFtpVirtualDir
<p style="margin:0in 0in 0pt <span style="font-family:Calibri; font-size:small <tr>
<p style="margin:0in 0in 0pt <span style="font-family:Calibri; font-size:small <td><font face="arial-narrow" size="1 <xsl:value-of select=substring(<span style="font-family:Calibri; color:#0000ff; font-size:small ./@Location,21,255)/></font></td<span style="font-family:Calibri; font-size:small >
<p style="margin:0in 0in 0pt <span style="font-family:Calibri; font-size:small <td><font face="arial-narrow" size="1 <xsl:value-of select=./@Path/></font></td>
<p style="margin:0in 0in 0pt <span style="font-family:Calibri; font-size:small <td><font face="arial-narrow" size="1 <xsl:value-of select=./@UNCUserName/></font></td>
<p style="margin:0in 0in 0pt <span style="font-family:Calibri; font-size:small </tr>
<p style="margin:0in 0in 0pt <span style="font-family:Calibri; font-size:small </xsl:template>
<p style="margin:0in 0in 0pt <span style="font-family:Calibri; font-size:small </xsl:stylesheet>


View the full article
 
Back
Top