Print Page | Close Window

Viewtable- unable to extract data

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: Database Discussion
Forum Description: Discussion and chat on database related topics.
URL: https://forums.webwiz.net/forum_posts.asp?TID=9911
Printed Date: 28 March 2026 at 11:57am
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: Viewtable- unable to extract data
Posted By: erinbrockovich
Subject: Viewtable- unable to extract data
Date Posted: 17 February 2004 at 7:43pm

Hi,

This program aims at dispaying a table whose xml island is given by xmlisland.xml.Howevere, I am unable to extract data out of the xml island into the table. Could someone help me figure out why?

<!-- file viewtable.xml-->

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<xsl:template match="/">

<TABLE Align="Center" Border="2" src = "xmlisland.xml">

<TR>

<TD><FONT Color="Navy"><B><center>PCB P/N</center></B></FONT></TD>

<TD><FONT Color="Navy"><B>Module P/N</B></FONT></TD>

<TD><FONT Color="Navy"><B>Panel Size</B></FONT></TD>

<TD><FONT Color="Navy"><B>PCB Panel</B></FONT></TD>

<TD><FONT Color="Navy"><B>BOM#</B></FONT></TD& gt;

<TD><FONT Color="Navy"><B>PCB Size</B></FONT></TD>

<TD><FONT Color="Navy"><B>Date Issued</B></FONT></TD>

<TD><FONT Color="Navy"><B>Proto Run Lot#</B></FONT></TD>

</TR>

<xsl:apply-templates select="root/attributes"/>

<TR>

</TR>

</TABLE>

</xsl:template>

<!--

* Template Match Section

-->

<xsl:template match="root/attributes">

<TR>

<xsl:if test="change='false'">

<xsl:attribute name="onmouseover">this.bgColor = '#BEC5DE'</xsl:attribute>

<xsl:attribute name="onmouseout">this.bgColor = 'white'</xsl:attribute>

</xsl:if>

<xsl:if test="change='true'">

<xsl:attribute name="bgColor">red</xsl:attribute>

</xsl:if>

<TD>

<Input>

<xsl:attribute name="attribute"><xsl:value-of select="attribute"/></xsl:attribute>

<xsl:attribute name="value"><xsl:value-of select="value"/></xsl:attribute>

</Input>

</TD>

</TR>

</xsl:template>

<DIV ID="DIVXMLDisp"></DIV>

<script language="vbscript">

Sub window_onload()

DIVXMLDisp.innerHTML = BINDXSLXML(XMLViewtable, "http://www2.sing.micron.com/module/new/project/viewtable.xs l", "")

MSgbox AttrDisp.XML

End Sub

 

Function BindXSLXML(xmlisland, cStyleSheet, cSrchCrit)

set stylesheet= CreateObject("MSXML2.DOMDocument")

stylesheet.async= false

stylesheet.load (cStyleSheet)

if cSrchCrit <> "" Then

set searchnode = stylesheet.selectsinglenode("//xsl:apply-templates")

searchnode.setAttribute "select", cSrchCrit

end if

BindXSLXML= xmlisland.transformnode(stylesheet)

set stylesheet= nothing

End Function

</script>

 

Thanks!



-------------
~This is a computer generated message and does not require a signature~



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net