I have a sample application that I have simplified the xslt and xml file down to where I am having the problem and removing all the extra code.
I am unable to get the function to return me the Page Title that matches the id="page_1"
I do not get any errors.
The result string contains the table, row and cell.
The cell should contain the Page title and does not.

Here is my simplified xslt file: test.xslt

<?xml version="1.0" encoding="utf-8" ?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:asp="remove">
<xslutput method="xml" indent="yes" encoding="utf-8" omit-xml-declaration="yes"></xslutput>
<xsl:template match="/">
<xslaram name="pageid"/>
<table>
<tr>
<td>
<xsl:value-of select="FORM/PAGES/PAGE[@id=$pageid]/@title" />
</td>
</tr>
</table>
</xsl:template>
</xsl:stylesheet>

Here is my xml document: test.xml
<?xml version="1.0" encoding="utf-8"?>
<FORM>
<PAGES>
<PAGE title="Page Title" id="page_1">
</PAGE>
</PAGES>
</FORM>

My code in vb .net 2005
I am passing to this function pageId="page_1"

Public Function TransformFields(ByVal pageId As String) As String *


Dim xdoc As XmlDocument = New XmlDocument
Dim XmlFile As String = ControlHolder.Page.Server.MapPath("~/test.xml")
xdoc.Load(XmlFile)

Dim xsl As XslCompiledTransform = New XslCompiledTransform(True)
Dim XslFile As String = ControlHolder.Page.Server.MapPath("~/test.xslt")
xsl.Load(XslFile)

Dim xslArg As XsltArgumentList = New XsltArgumentList
xslArg.AddParam("pageid", "", pageId)

Dim sw As StringWriter = New StringWriter
xsl.Transform(xdoc, xslarg, sw)

Dim result As String = sw.ToString()

sw.Close()

Return result

End Function