Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - Viewtable file - unable to view
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Viewtable file - unable to view

 Post Reply Post Reply
Author
erinbrockovich View Drop Down
Newbie
Newbie


Joined: 12 February 2004
Status: Offline
Points: 7
Post Options Post Options   Thanks (0) Thanks(0)   Quote erinbrockovich Quote  Post ReplyReply Direct Link To This Post Topic: Viewtable file - unable to view
    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 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">
<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", "")
 
 End Sub
</script>

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

Back to Top
michael View Drop Down
Senior Member
Senior Member
Avatar

Joined: 08 April 2002
Location: United States
Status: Offline
Points: 4670
Post Options Post Options   Thanks (0) Thanks(0)   Quote michael Quote  Post ReplyReply Direct Link To This Post 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">
<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", "")
 
 End Sub
</script>

</xsl:stylesheet>


Edited by michael
Back to Top
erinbrockovich View Drop Down
Newbie
Newbie


Joined: 12 February 2004
Status: Offline
Points: 7
Post Options Post Options   Thanks (0) Thanks(0)   Quote erinbrockovich Quote  Post ReplyReply Direct Link To This Post Posted: 16 February 2004 at 10:32pm

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

Thanks!

Back to Top
michael View Drop Down
Senior Member
Senior Member
Avatar

Joined: 08 April 2002
Location: United States
Status: Offline
Points: 4670
Post Options Post Options   Thanks (0) Thanks(0)   Quote michael Quote  Post ReplyReply Direct Link To This Post Posted: 16 February 2004 at 10:46pm
Well just relace &gt; with >
It works well for me when I do that, see here
Back to Top
erinbrockovich View Drop Down
Newbie
Newbie


Joined: 12 February 2004
Status: Offline
Points: 7
Post Options Post Options   Thanks (0) Thanks(0)   Quote erinbrockovich Quote  Post ReplyReply Direct Link To This Post 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">

<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", "")
 
 End Sub
</script>


</xsl:stylesheet>

 

Thanks !

Back to Top
erinbrockovich View Drop Down
Newbie
Newbie


Joined: 12 February 2004
Status: Offline
Points: 7
Post Options Post Options   Thanks (0) Thanks(0)   Quote erinbrockovich Quote  Post ReplyReply Direct Link To This Post Posted: 17 February 2004 at 12:31am
phew got it , thanks !
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.