[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

XSL Parsing Problems

Subject: XSL Parsing Problems
From: "Paul Johnson" <paul@xxxxxxxxxxxxxxx>
Date: Fri, 03 Dec 1999 07:42:38 -0600
xsl parsing html
I am sorry that this file is so long,

I am having problems getting my xsl file to render on different XSLParsers.  I am going to have it converted to HTML via Oracle or Cocoon.  I cannot get this to be parsed correctly with the IBMParser or Oracles.  Can you tell me what I might be doing wrong?

I would appreciate any help,

Thanks in Advance,

Paul



<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="stylesheets/webscapeNS.xsl"?>

<User>
	<Profile>
		<Applications tab="PDM Applications">
                        <Color>#FD9A63</Color>
			<Application>
                                <Link>#</Link>
				<Text>Electronic Bill of Materials</Text>
                                <Desc/>
			</Application>
			<Application>
				<Text>Conventions</Text>
                                <Link>#</Link>
                                <Desc/>
			</Application>
		</Applications>
		<Applications tab="Engineering Standards">
                        <Color>#999BC4</Color>
			<Application>
                                <Link>http://mkecad01.mke.etn.com/pcsweb/indexes/index7.htm</Link>
				<Text>CHEMS</Text>
                                <Desc/>
			</Application>
			<Application>
                                <Link>#</Link>
				<Text>MPP Standards</Text>
                                <Desc>ggg</Desc>
			</Application>
		</Applications>
	</Profile>
	<Role>Java Developer</Role>
	<Division>ATCC</Division>
	<UserName>paul</UserName>
	<AccessLevel>3</AccessLevel>
	<Email>paul@xxxxxxxxxxxxxxx</Email>
	<DisplayName>Paul R. Johnson</DisplayName>
	<DescriptionView>1</DescriptionView>
	<date>December 1, 1999</date>
	<popUp>Great Googly Moogly</popUp>
</User>



<?xml version='1.0'?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl">
<xsl:template match="/">
<html>

<head>
<link rel="stylesheet" href="stylesheets/style.css"/>

<SCRIPT>
<![CDATA[


var expDays = 1; // number of days the cookie should last

function GetCookie (name)
{
	var arg = name + "=";
	var alen = arg.length;
	var clen = document.cookie.length;
	var i = 0;
	while (i < clen)
	{
		var j = i + alen;
		if (document.cookie.substring(i, j) == arg)
			return getCookieVal (j);

		i = document.cookie.indexOf(" ", i) + 1;
		if (i == 0) break;
	}
	return null;
}
function SetCookie (name, value)
{
	var argv = SetCookie.arguments;
	var argc = SetCookie.arguments.length;
	var expires = (argc > 2) ? argv[2] : null;
	var path = (argc > 3) ? argv[3] : null;
	var domain = (argc > 4) ? argv[4] : null;
	var secure = (argc > 5) ? argv[5] : false;
	document.cookie = name + "=" + escape (value) +
	((expires == null) ? "" : ("; expires=" + expires.toGMTString())) +
	((path == null) ? "" : ("; path=" + path)) +
	((domain == null) ? "" : ("; domain=" + domain)) +
	((secure == true) ? "; secure" : "");
}
function DeleteCookie (name)
{
	var exp = new Date();
	exp.setTime (exp.getTime() - 1);
	var cval = GetCookie (name);
	document.cookie = name + "=" + cval + "; expires=" + exp.toGMTString();
}
var exp = new Date();
exp.setTime(exp.getTime() + (expDays*24*60*60*1000));


function getCookieVal(offset)
{
	var endstr = document.cookie.indexOf (";", offset);
	if (endstr == -1)
	endstr = document.cookie.length;
	return unescape(document.cookie.substring(offset, endstr));
}

function checkCount(popUpData)
{
	var count = GetCookie('count');
	if (count == null)
	{
		count=1;
		SetCookie('count', count, exp);
		popUp(popUpData);
	}
	else
	{
		count++;
		SetCookie('count', count, exp);
	}
}



ns4 = (document.layers)? true:false
ie4 = (document.all)? true:false
var x;
var y;

function init() {

	if (ns4) block = document.me
	if (ie4) block = me.style
	block.xpos = parseInt(block.left)
	block.ypos = parseInt(block.top)

	document.onmousemove = mouseMove
	document.onmousedown = mouseDown
	if (ns4) document.captureEvents(Event.MOUSEMOVE| Event.MOUSEDOWN)
}


function mouseDown(e) {
	var x = (ns4)? e.pageX : event.x+document.body.scrollLeft
	var y = (ns4)? e.pageY : event.y+document.body.scrollTop
	hideObject();
	return true
}
function showObject() {
	if (ns4) block.visibility = "show"
	else if (ie4) block.visibility = "visible"

}
function hideObject() {
	if (ns4) block.visibility = "hide"
	else if (ie4) block.visibility = "hidden"
}
 function mouseMove(e) {
	x = (ns4)? e.pageX : event.x+document.body.scrollLeft
	y = (ns4)? e.pageY : event.y+document.body.scrollTop

	return true
}
function moveTo(side,x,y) {
	if(side==0)
	{
	block.xpos = x
	block.left = block.xpos
	block.ypos = y
	block.top = block.ypos
	}
	if(side==1)
	{
	block.xpos = x-150
	block.left = block.xpos
	block.ypos = y
	block.top = block.ypos
	}
}

function setText(theMsg,side) {
  if (ie4) document.forms[0].textfield.value=theMsg;
	if (ns4) document.me.document.myForm.textfield.value=theMsg;
	moveTo(side, x, y);
}

function popUp(newInfo)
{
	var w=window.open('blank.html', "infoWindow", "width=200, height=400");
	w.document.write("<html><head>");
	w.document.write('<link rel="stylesheet" href="stylesheets/style.css">');
	w.document.write("</head>");
	w.document.write("<body bgcolor='ffffff'><div id=mine>");
	w.document.write('<table width="100%" height="100%" border="1" bordercolorlight="#643362" bordercolordark="#643362" cellpadding="0" cellspacing="0" bordercolor="#643362"><tr> ');
        w.document.write('<td class="mainTable" bgcolor="#643362" height="5%">New Website Information</td>')
  	w.document.write('</tr><tr><td class="text" height="90%" valign="top" align="left">');
  	w.document.write(newInfo);
  	w.document.write('</td></tr><tr bgcolor="#643362" height="5%"><td>&nbsp;</td>');
  	w.document.write('</tr></table>');



	w.document.write("</div></body></html>");

}

]]>
</SCRIPT>

<title>Cutler-Hammer Webscape</title>


</head>

<body>
<xsl:if test="not(User/popUp = '')">

	<xsl:attribute name="bgcolor">#ffffff</xsl:attribute>
	 <xsl:attribute name="onLoad">init(); checkCount('<xsl:value-of select="User/popUp"/>')</xsl:attribute>
</xsl:if>

<xsl:if test="/User/popUp[.='']">

	<xsl:attribute name="bgcolor">#ffffff</xsl:attribute>
	 <xsl:attribute name="onLoad">init()</xsl:attribute>
</xsl:if>


<div id='me' style="position:absolute; left:271px; top:255px; width:150; height:141px; z-index:1; background-color: 643362; layer-background-color: 643362; visibility: hidden">
  <table width="150" border="1">
    <tr>
      <td>
        <p align="center"/>
        <div align="center"> <span class="tabText">Program Description</span></div>
  </td>
    </tr>
    <tr align="center" valign="middle">
      <td>
        <form method="post" name="myForm">

      <div align="center"><textarea name="textfield" rows="8" cols="13" wrap="VIRTUAL"></textarea>
          </div>

  </form></td>
    </tr>
  </table>
</div>
<form method="post" name="myForm">
  <table border="0" width="765" cellpadding="0" cellspacing="0" align="CENTER">
    <tr bgcolor="#006599">
      <td width="277" rowspan="2" bgcolor="#006599"><img src="images/logo.jpg" width="277" height="48"/></td>
      <td width="186" bgcolor="#006599" class="dateText"><xsl:value-of select="User/date"/></td>
      <td valign="BASELINE" width="350" bgcolor="#006599" align="RIGHT">
        <input type="TEXT" name="TEXTFIELD" size="20"/>
        <img align="absmiddle" src="images/search.jpg" width="66" height="23"/></td>
    </tr>
    <tr>
      <td colspan="2" bgcolor="#000000" height="20" align="center"><a href="http://www.eaton.com"><span class="titleNav">EATON.COM</span></a><span class="titleNav"><font color="#000000">.....</font><a href="http://www.ch.etn.com"><span class="titleNav">C-H
        INTERNET</span></a><font color="#000000">......</font><span class="titleNav"><a href="http://www.ch.etn.com/software/chsrl.htm"><span class="titleNav">DOWNLOADS</span></a></span><font color="#000000">.....</font><a href="http://mkecad01.mke.etn.com/pcsweb/faq.shtml" class="titleNav">WEBSITE
        REQUIREMENTS</a><font color="#000000">......</font><a href="http://www.ch.etn.com/docs/public/chiweb/chihome.htm" class="titleNav">C-H
        UNIVERSITY</a></span></td>
    </tr>
  </table>
</form>
<br/>


<table border="1" width="760" align="CENTER" bordercolorlight="#643362" bordercolordark="#643362" bordercolor="#643362" cellpadding="0" cellspacing="0">
  <tr>
    <td CLASS="mainTable">WELCOME...<xsl:value-of select="User/DisplayName"/></td>

    <td valign="middle" width="390" align="right" bgcolor="#643362"><a href="help/genHelp.html"><img border="0" src="images/help.gif" align="absmiddle" alt="Click here of Website Help"/></a><a href="tabSelection.xml"><img border="0" src="images/edit.gif" align="absmiddle" alt="Click here to ADD or REMOVE Categories."/></a><img border="0" src="images/cProfile.gif" align="absmiddle" alt="Click here to Modify Your Information"/></td>
  </tr>
  <tr>
    <td valign="TOP" width="390" align="CENTER">
    <br/>

    <xsl:for-each select="User/Profile/Applications">
    <xsl:if test="position() mod 2 > 0">

	<table WIDTH="95%" BORDER="1" CELLPADDING="0" CELLSPACING="0">
	<xsl:attribute name="BORDERCOLORLIGHT"><xsl:value-of select="Color"/></xsl:attribute><xsl:attribute name="BORDERCOLORDARK"><xsl:value-of select="Color"/></xsl:attribute><xsl:attribute name="BORDERCOLOR"><xsl:value-of select="Color"/></xsl:attribute>

	<tr>
		<TD><xsl:attribute name="BGCOLOR"><xsl:value-of select="Color"/></xsl:attribute><xsl:attribute name="class">tabText</xsl:attribute><xsl:value-of select="@tab"/></TD>
		<td><xsl:attribute name="BGCOLOR"><xsl:value-of select="Color"/></xsl:attribute><xsl:attribute name="width">20%</xsl:attribute><xsl:attribute name="align">right</xsl:attribute><xsl:attribute name="valign">top</xsl:attribute><a href="appSelection.xml"><img border="0" src="images/edit.gif" alt="Click here to ADD or REMOVE links."/></a><a href="no.html"><img border="0" src="images/x.gif" width="18" height="19" align="absmiddle" alt="Click here to REMOVE this Category."/></a></td>
	</tr>
	<tr>
		<td colspan="2">

		<table border="0" width="95%" align="CENTER">
		<tr>
			<td>
				<TABLE WIDTH="95%" BORDER="0" ALIGN="CENTER">
				<TR ALIGN="LEFT" VALIGN="TOP">
					<TD>

						<xsl:for-each select="Application">
						<TR>

							<xsl:if test="/User/DescriptionView[.='1']">
                                                        	<TD class="text"><A><xsl:attribute name="HREF"><xsl:value-of select="Link"/></xsl:attribute><xsl:value-of select="Text"/></A></TD>

                                                                <TD ALIGN="RIGHT">
                                                                        <xsl:if test="not(Desc = '')">

										<img><xsl:attribute name="SRC">images/desc.jpg</xsl:attribute><xsl:attribute name="alt">Click here for a Description of the Program.</xsl:attribute><xsl:attribute name="onMouseUp">showObject(); setText('<xsl:value-of select="Desc"/>', 0)</xsl:attribute></img>

									</xsl:if>
                                                                </TD>
                                                        </xsl:if>
							<xsl:if test="/User/DescriptionView[.='0']">

                                                        	<TD class="text">

                                                                <table width="95%" border="0" CELLPADDING="0" CELLSPACING="0">
									  <tr>
									    <td class="text"><A><xsl:attribute name="HREF"><xsl:value-of select="Link"/></xsl:attribute><xsl:value-of select="Text"/></A></td>
									  </tr>
									</table>
                                                                        <xsl:if test="not(Desc = '')">


									<table width="95%" border="0" CELLPADDING="0" CELLSPACING="0">
									  <tr>
									    <td width="3%">&#xA0;</td>
									    <td width="97%" class="description"><xsl:value-of select="Desc"/></td>
									  </tr>
									</table>

									</xsl:if>
                                                                </TD>
                                                        </xsl:if>

						</TR>
						</xsl:for-each>
					</TD>
                                </TR>
				</TABLE>
			</td>
		</tr>

		</table>
		</td>
	</tr>
</table>
<br/>

</xsl:if>
</xsl:for-each>






      <br/>
    </td>
    <td valign="TOP" width="390" align="CENTER"><br/>

    <xsl:for-each select="User/Profile/Applications">
    <xsl:if test="position() mod 2 = 0">

	<table WIDTH="95%" BORDER="1" CELLPADDING="0" CELLSPACING="0">
	<xsl:attribute name="BORDERCOLORLIGHT"><xsl:value-of select="Color"/></xsl:attribute><xsl:attribute name="BORDERCOLORDARK"><xsl:value-of select="Color"/></xsl:attribute><xsl:attribute name="BORDERCOLOR"><xsl:value-of select="Color"/></xsl:attribute>

	<tr>
		<TD><xsl:attribute name="BGCOLOR"><xsl:value-of select="Color"/></xsl:attribute><xsl:attribute name="class">tabText</xsl:attribute><xsl:value-of select="@tab"/></TD>
		<td><xsl:attribute name="BGCOLOR"><xsl:value-of select="Color"/></xsl:attribute><xsl:attribute name="width">20%</xsl:attribute><xsl:attribute name="align">right</xsl:attribute><xsl:attribute name="valign">top</xsl:attribute><a href="appSelection.xml"><img border="0" src="images/edit.gif" alt="Click here to ADD or REMOVE links."/></a><a href="no.html"><img border="0" src="images/x.gif" width="18" height="19" align="absmiddle" alt="Click here to REMOVE this Category."/></a></td>
	</tr>
	<tr>
		<td colspan="2">

		<table border="0" width="95%" align="CENTER">
		<tr>
			<td>
				<TABLE WIDTH="95%" BORDER="0" ALIGN="CENTER">
				<TR ALIGN="LEFT" VALIGN="TOP">
					<TD>

						<xsl:for-each select="Application">
						<TR>

							<xsl:if test="/User/DescriptionView[.='1']">
                                                        	<TD class="text"><A><xsl:attribute name="HREF"><xsl:value-of select="Link"/></xsl:attribute><xsl:value-of select="Text"/></A></TD>

                                                                <TD ALIGN="RIGHT">
                                                                        <xsl:if test="not(Desc = '')">

										<img><xsl:attribute name="SRC">images/desc.jpg</xsl:attribute><xsl:attribute name="alt">Click here for a Description of the Program.</xsl:attribute><xsl:attribute name="onMouseUp">showObject(); setText('<xsl:value-of select="Desc"/>', 1)</xsl:attribute></img>

									</xsl:if>
                                                                </TD>
                                                        </xsl:if>
							<xsl:if test="/User/DescriptionView[.='0']">

                                                        	<TD class="text">

                                                                <table width="95%" border="0" CELLPADDING="0" CELLSPACING="0">
									  <tr>
									    <td class="text"><A><xsl:attribute name="HREF"><xsl:value-of select="Link"/></xsl:attribute><xsl:value-of select="Text"/></A></td>
									  </tr>
									</table>
                                                                        <xsl:if test="not(Desc = '')">


									<table width="95%" border="0" CELLPADDING="0" CELLSPACING="0">
									  <tr>
									    <td width="3%">&#xA0;</td>
									    <td width="97%" class="description"><xsl:value-of select="Desc"/></td>
									  </tr>
									</table>

									</xsl:if>
                                                                </TD>
                                                        </xsl:if>

						</TR>
						</xsl:for-each>
					</TD>
                                </TR>
				</TABLE>
			</td>
		</tr>

		</table>
		</td>
	</tr>
</table>
<br/>

</xsl:if>
</xsl:for-each>

    </td>
  </tr>
</table>
</body>
</html>
</xsl:template>
</xsl:stylesheet>




 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.