Print Page | Close Window

Viewtable file - unable to view

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=9880
Printed Date: 30 March 2026 at 5:58am
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: Viewtable file - unable to view
Posted By: erinbrockovich
Subject: Viewtable file - unable to view
Date Posted: 16 February 2004 at 9:20pm

Hi, I am trying to set this particular file to view my table up, but it keeps giving me this error:

The XML page cannot be displayed

Cannot view XML input using XSL style sheet. Please correct the error and then click the javascript location.reload - Refresh button, or try again later.


Only one top level element is allowed in an XML document. Error processing resource 'http://www2.sing.micron.com/module/new/project/viewtable.xs l'. Line 52, Position 2

<DIV ID="DIVDisp"></DIV>
-^
~~~~~~~~~~~~~
This is my file:
<xsl:stylesheet version="1.0" xmlns:xsl=" http://www.w3.org/1999/XSL/Transform - http://www.w3.org/1999/XSL/Transform ">
<xsl:template match="/"> 
<TABLE Align="Center" Border="2">
<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="DIVDisp"></DIV>
<script language= "vbscript">
 Sub Window_Onload()
DIVDisp.innerHTML  = BINDXSLXML(XMLViewTable, " http://www2.sing.micron.com/module/new/project/viewtable.xsl - http://www2.sing.micron.com/module/new/project/viewtable.xsl ", "")
 
 End Sub
</script>

</xsl:stylesheet>
 
Could anyone help? Thanks a lot!



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



Replies:
Posted By: michael
Date Posted: 16 February 2004 at 10:04pm

Exchange green with red and it works fine

Edit: OK that did not work, the forum kills the format, but in the red line you have html code for the td closing tag, repair that and it worked for me...


<xsl:stylesheet version="1.0" xmlns:xsl=" http://www.w3.org/1999/XSL/Transform - http://www.w3.org/1999/XSL/Transform ">
<xsl:template match="/"> 
<TABLE Align="Center" Border="2">
<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& amp; amp; gt;
<TD><FONT Color="Navy"><B>BOM#</B></FONT></TD& amp; 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="DIVDisp"></DIV>
<script language= "vbscript">
 Sub Window_Onload()
DIVDisp.innerHTML  = BINDXSLXML(XMLViewTable, " http://www2.sing.micron.com/module/new/project/viewtable.xsl - http://www2.sing.micron.com/module/new/project/viewtable.xsl ", "")
 
 End Sub
</script>

</xsl:stylesheet>


-------------
http://baumannphoto.com" rel="nofollow - Blog | http://mpgtracker.com" rel="nofollow - MPG Tracker


Posted By: erinbrockovich
Date Posted: 16 February 2004 at 10:32pm

Still doesnt work , how exactly can i repair the tag?

Thanks!



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


Posted By: michael
Date Posted: 16 February 2004 at 10:46pm
Well just relace &gt; with >
It works well for me when I do that, see http://cell-source.com/gsod.xml - here

-------------
http://baumannphoto.com" rel="nofollow - Blog | http://mpgtracker.com" rel="nofollow - MPG Tracker


Posted By: erinbrockovich
Date Posted: 16 February 2004 at 10:53pm

But isnt that how the original file looked like?

I am still getting the error!

Is this the code:

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

<xsl:template match="/">
<TABLE Align="Center" Border="2">
<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>

 

<script language= "vbscript">

 Sub Window_Onload()
DIVDisp.innerHTML  = BINDXSLXML(XMLViewTable, " http://www2.sing.micron.com/module/new/project/viewtable.xsl - http://www2.sing.micron.com/module/new/project/viewtable.xsl ", "")
 
 End Sub
</script>


</xsl:stylesheet>

 

Thanks !



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


Posted By: erinbrockovich
Date Posted: 17 February 2004 at 12:31am
phew got it , 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