I'm doing something that seems simple but I can not get it to work. Here is
a quick run-down. I'm using XML and XSL to generate a simple table on a
web page. The XML has more detail than is need for the first web page.
Once they select on something from the first... I would like to pass the
same XML to another XSL file and have it display the SAME XML file but display
it down into the detail. Here is sample of what it could look like:

-------------------------------------

Web Page 1 - Summary

Item 1
Item 2
Item 3

-------------------------------------

Web Page 2 - Detail

Item 1
Greg 555-1212
Item 2
Item 3

-------------------------------------

XML File:

<Root>
<Item Num="1">
<Detail>
<Name>Greg</Name>
<Phone>555-1212</Phone>
</Detail>
</Item>
<Item Num="2">
<Detail>
<Name>Fred</Name>
<Phone>555-1234</Phone>
</Detail>
</Item>
<Item Num="3">
<Detail>
<Name>Bill</Name>
<Phone>555-4652</Phone>
</Detail>
</Item>
</Root>

I have a method that works using the same XSL file but requires that I modified
the XML file and add an attribe to the Item level node. The XSL would display
the details when the Item node looked like:

<Item Num="2" Display="Yes">

I can not get the transform node command to recognize a new XML document.
I have attached the ASP file I'm using at the bottom along with the acutal
XSL file and have been testing with.

Any ideas???? Any info. or suggestions would be very much appreicated.

Thanks for your time and help,
Greg Rothlander


ASP File ---------------------
<% LANGUAGE = "VBScript" %>
<%
Dim oSource
Dim oStyle

Set oSource = Server.CreateObject("Microsoft.XMLDOM")
oSource.async = False
oSource.Load("c:\inetpub\wwwroot\xsl testing\delaccnts.xml")
Set oStyle = Server.CreateObject("Microsoft.XMLDOM")
oStyle.async = False
oStyle.load(Server.mappath("test.xsl"))
%>

<Html>
<Head>
<Script language="vbscript">
function OpenSub(strField) 'Read through each [<Row ID="Route" Num="401"
Display="Yes">]
'and remove the "Display" attribute.
'Then find the [Num=strfield] and add a "Display='Yes'" attribute.
'Reload the oSource XML.
'Reload the page or retransform the Node.
end function
</Script>
</Head>
<Body>
<Form>
<%= oSource.TransformNode(oStyle) %>
</Form>
</Body>
</Html>


XSL File -------------------------

This is the actual file and doesn't use my simple example's element names...

<?xml version="1.0" ?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<xsl:for-each select="DelinqAccts">
Delinquent Accounts
<xsl:for-each select="Details">
<Table border="1">
<tr>
<td>Route</td>
</tr>
<xsl:for-each select="Rows">
<xsl:for-each select="Row">
<tr>
<td>
<A>
<xsl:attribute name="onclick" > OpenSub('<xsl:value-of select="@Num"
/>') </xsl:attribute> <xsl:value-of select="@Num" /> </A>
</td>
</tr> <xsl:if test="@Display [ . = 'Yes']">
<tr><td>
<table border="1">
<tr> <td>&#160;</td>
<td><xsl:value-of select="Name"/></td> <td><xsl:value-of
select="format-number(Amount, '$ #,###,###.##')"/></td> </tr>
</table>
</td></tr>
</xsl:if>
</xsl:for-each>
</xsl:for-each>
</Table>
</xsl:for-each>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>