XML Paramatised query problems

G

Guest

I imagine the solution is very simple, but as a newbie in XML, it's baffling me...

I have an XML file as follows...

<?xml version="1.0" encoding="utf-8"?><DistributionLists><DL8 N="sharon"><I ID="5645" N="David" L="7" /><I ID="9339" N="ADMIN" L="5" /><I ID="8824" N="Brian" L="2" /></DL8><DL9 N="David"><I ID="5645" N="David" L="7" /><I ID="9339" N="ADMIN" L="5" /><I ID="14238" N="Jason" L="2" /></DL8></DistributionLists


And I have an XSL style sheet as follows...

<?xml version='1.0' ?><xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"><xsl:param name="distListID" select="DL8"/><xsl:template match="/"><HTML><BODY><TABLE id="tblResults" cellSpacing="0" cellPadding="5" width="100%" align="center" border="0"><tr class="dataGridHeader"><td style="border-left:#FFFFFF 1px solid;border-top:#ffffff 1px solid;border-bottom:#666666 1px solid;">Mailbox

</td><td style="border-top:#ffffff 1px solid;border-bottom:#666666 1px solid;">Distributor nam

</td><td style="border-top:#ffffff 1px solid;border-bottom:#666666 1px solid;">Level</td></tr><xsl:for-each select="DistributionLists/DL8/*"><tr class="dataGridItem"><td style="border-left:#FFFFFF 1px solid;border-top:#ffffff 1px solid;border-bottom:#666666 1px solid;"><xsl:value-of select="@I" /></td><td style="border-top:#ffffff 1px solid;border-bottom:#666666 1px solid;"><xsl:value-of select="@N" /></td><td style="border-top:#ffffff 1px solid;border-bottom:#666666 1px solid;"><xsl:value-of select="@L" /></td></tr></xsl:for-each></TABLE></BODY></HTML></xsl:template></xsl:stylesheet


I am wanting the style sheet to be a global .XSL file whereby I can pass parameters to it to interigate an XML file.

At the moment, the above XSL would retrieve all rows held in DL8.

I've tried as many alternatives as I possibly can to pass a parameter to this style sheet, none of which have resulted in any joy.

What I have at the moment, as well as the above to files, is a webform with an XML document reader. At runtime, I have a session variable that will act as the parameter "distListID". At first, I was attaching a "?distListID=" at the end of the XMLWebDocument.TransformSource, and have only just read that I MAY need the user of XMLWebDocument.TransformArgumentList, however whatever I pass here also gives an error.

I'd really appreciate some help on this.

Many thanks,
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,780
Messages
2,569,611
Members
45,273
Latest member
DamonShoem

Latest Threads

Top