求教初级xsl,真的很初级
时间:2005-07-22
来源:互联网
xsl如何对xml进行格式化给个简单易懂的例子
哪里有比较全的xsl资料
非常感谢送你美图一个
作者: 忘记密码 发布时间: 2005-07-22
如果只是想了解,就google吧
http://www.google.com/search?hl= ... 99%E7%A8%8B&lr=
作者: ※潇洒※ 发布时间: 2005-07-23
难道说我的图不行 再给你个好的
作者: 忘记密码 发布时间: 2005-07-23
作者: 155120699 发布时间: 2005-07-26
你可以看看
<xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl"> <xsl:template match="/"> <HTML> <HEAD> <style> .MenuList{ border:1px solid black; background-color:oldlace; width:150; } .Menu{ border:1px solid black; background-color:oldlace; display:none; width:150; } span{ background-color:oldlace; width:150; filter:alpha(opacity:150); } .head{ background-color:mistyrose; } body{ background-color:gray; } </style> <script> var oTimer=null; var i=0; function ShowAll(p){ alert(); } function mouseover(pObj,id){ pObj.style.backgroundColor="#C0C0C0"; pObj.style.border="1px solid gray"; pObj.style.cursor="hand"; showFilter(pObj,"over"); createDiv(pObj.nextSibling); } function mouseout(pObj,id){ pObj.style.backgroundColor="oldlace"; pObj.style.border="0"; pObj.style.cursor="default"; showFilter(pObj,"out"); document.all('newDiv').removeNode(true); } function showFilter(pObj,pOper){ if(pOper=="over") pObj.style.filter="alpha(Opacity=45)"; else pObj.style.filter="alpha(Opacity=150)"; } function createDiv(poDiv){ var objDiv=document.createElement("div"); objDiv=poDiv.cloneNode(true); objDiv.style.position="absolute"; objDiv.style.left=event.srcElement.offsetWidth+document.body.scrollLeft; objDiv.style.top=(event.y-objDiv.offsetHeight/2)+document.body.scrollTop; objDiv.id="newDiv"; objDiv.style.display="block"; objDiv.onmouseover=function(){ createDiv() } document.body.appendChild(objDiv); //alert(objDiv.style.display) } </script> <TITLE>List <xsl:value-of select="MENULIST/@TYPE" /></TITLE> <SCRIPT TYPE="text/javascript" LANGUAGE="javascript" SRC="list.js"></SCRIPT> </HEAD> <BODY> <BUTTON ONCLICK="ShowAll('UL');">Show All</BUTTON> <BUTTON ONCLICK="HideAll('UL')">Hide All</BUTTON> <H1>List <xsl:value-of select="MENULIST/@TYPE" /></H1> <div class="MenuList" id="MenuList"><xsl:apply-templates select="MENULIST/MENU" /></div> <P><BUTTON ONCLICK="window.alert(document.body.innerHTML);">View HTML</BUTTON></P> </BODY> </HTML> </xsl:template> <xsl:template match="MENU"> <xsl:choose> <xsl:when match=".[@ITEM=0]"> <span onmouseover="mouseover(this,id);" onmouseout="mouseout(this,id);"> <xsl:attribute name="id"> <xsl:value-of select="@TYPE" /> </xsl:attribute> <xsl:value-of select="@TYPE" /> </span> </xsl:when> <xsl:otherwise> <span onmouseover="mouseover(this,id);" onmouseout="mouseout(this,id);"> <xsl:attribute name="id"> <xsl:value-of select="@TYPE" /> </xsl:attribute> <xsl:value-of select="@TYPE" /><img src="http://msdn.microsoft.com/library/mnp/2/gif/arrowLTR.gif" style="margin-left:70"/> </span> <div class="Menu"> <xsl:attribute name="name"> <xsl:value-of select="@TYPE"/> </xsl:attribute> <xsl:if test="MENU"><xsl:apply-templates/></xsl:if> <xsl:apply-templates select="MENUITEM"/> </div> </xsl:otherwise> </xsl:choose> </xsl:template> <xsl:template match="MENUITEM"> <span> <a target="_new"><xsl:attribute name="href"> <xsl:value-of select="ITEM_VALUE"/> </xsl:attribute><xsl:value-of select="ITEM_TITLE"/></a> </span> </xsl:template> </xsl:stylesheet>
提示:您可以先修改部分代码再运行
作者: JSTOP 发布时间: 2005-07-27
作者: 155120699 发布时间: 2005-07-27
作者: JSTOP 发布时间: 2005-07-28
作者: 155120699 发布时间: 2005-07-28
作者: JSTOP 发布时间: 2005-07-28
作者: ※潇洒※ 发布时间: 2005-07-28
热门阅读
-
office 2019专业增强版最新2021版激活秘钥/序列号/激活码推荐 附激活工具
阅读:74
-
如何安装mysql8.0
阅读:31
-
Word快速设置标题样式步骤详解
阅读:28
-
20+道必知必会的Vue面试题(附答案解析)
阅读:37
-
HTML如何制作表单
阅读:22
-
百词斩可以改天数吗?当然可以,4个步骤轻松修改天数!
阅读:31
-
ET文件格式和XLS格式文件之间如何转化?
阅读:24
-
react和vue的区别及优缺点是什么
阅读:121
-
支付宝人脸识别如何关闭?
阅读:21
-
腾讯微云怎么修改照片或视频备份路径?
阅读:28