📄 using the default xsl style sheet in your application.htm
字号:
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=gb_2312-80">
<TITLE>使用Xsl转换Xml数据岛的内容</TITLE>
<style type="text/css">
<!--
.normal10 { font-size: 11pt}
.normal9 { font-size: 9pt}
a{ text-decoration: none }
a:hover{ color:Red;text-decoration:underline }
a {
font-size:11pt;
COLOR: cornflowerblue;
FONT-FAMILY: "新细明体", "宋体";
FONT-WEIGHT: bold
}
.normal105 { font-size: 11pt}
.p { font-size: 11pt}
-->
</style>
<link rel="stylesheet" href="../../Global.css" tppabs="http://www.xml.org.cn:8188/Global.css"></HEAD>
<BODY>
<p ALIGN="CENTER" class="normal105">[<a href="../../default.asp.htm" tppabs="http://www.xml.org.cn:8188/default.asp" target="_parent">返回首页</a>][<font face="宋体" lang="ZH-CN"><a href="../application.htm" tppabs="http://www.xml.org.cn:8188/application/application.htm" target="_parent">返回应用</a></font>]</p>
<table width="85%" border="0" align="center">
<tr>
<td width="22%" height="70"> </td>
<td width="53%" height="70">
<h2 align="center">在你的应用中使用默认Xsl样式表<font face="宋体" lang="ZH-CN"> </font></h2>
</td>
<td width="25%" height="70"><a name="top"></a></td>
</tr>
<tr>
<td colspan="3" height="826">
<p><span class="normal105">上一篇:<a href="Parameterizing a Style Sheet.htm" tppabs="http://www.xml.org.cn:8188/application/XSL%20uguid/Parameterizing%20a%20Style%20Sheet.htm" class="normal105">参数化一个样式表</a>
<br>
返 回 : <a href="Using the XSL Processor.htm" tppabs="http://www.xml.org.cn:8188/application/XSL%20uguid/Using%20the%20XSL%20Processor.htm" class="normal105"> 使用XSL处理程序
</a></span></p>
<p><span class="normal105">当你直接浏览一个没有制定样式表的Xml文档的时候,Microsoft Interent Explorer5提供了一个使用内建样式表的默认的Xml显示模式.这个默认的样式表提供了一个带有Xsl,Xml
Xmlns和dt namespaces的标色代码的可伸缩层次结构.</span></p>
<p><span class="normal105">这个样式表允许合并到你自己的应用中.下载它的一个拷贝,位于<a
href="../../../msdn.microsoft.com/xml/samples/defaultss/defaultss.xsl" tppabs="http://msdn.microsoft.com/xml/samples/defaultss/defaultss.xsl">Downloadable
Default Style Sheet</a>.譬如,在下面的样例中,默认的样式表在一个HTML页面中的数据岛上使用.</span></p>
<pre class=clsCode><span class="normal105"><font face="Arial" class="normal105"><HTML>
<SCRIPT>
function display()
{
rawdata.document.write(data.transformNode(defaultss.XMLDocument));
stylesheet.document.write(ss.transformNode(defaultss.XMLDocument));
data.transformNodeToObject(ss.XMLDocument, resultTree.XMLDocument);
result.document.write(resultTree.xml);
resultsrc.document.write(resultTree.transformNode(defaultss.XMLDocument));
}
</SCRIPT>
<SCRIPT FOR="window" EVENT="onload">
display();
</SCRIPT>
<XML id="data" src="auction1.xml"></XML>
<XML id="ss" src="summary.xsl"></XML>
<XML id="defaultss" src="defaultss.xsl"></XML>
<XML id="resultTree"></XML>
<FRAMESET COLS="180,*" ROWS="*,*,*,*" FRAMEBORDER="1" FRAMESPACING="5"
BORDERCOLOR="black">
<FRAME ID="rawdataHeader" src="rawdataHeader.htm">
<FRAME ID="rawdata">
<FRAME ID="stylesheetHeader" src="stylesheetHeader.htm">
<FRAME ID="stylesheet">
<FRAME ID="resultsrcHeader" src="resultSrcHeader.htm">
<FRAME ID="resultsrc">
<FRAME ID="resultHeader" src="resultHeader.htm">
<FRAME ID="result">
</FRAMESET>
</HTML></font></span></pre>
<p><span class="normal105"><b>尝试!</b> 上面的样例是 <a
href="../../../msdn.microsoft.com/xml/samples/transform-viewer/transform-viewer.htm" tppabs="http://msdn.microsoft.com/xml/samples/transform-viewer/transform-viewer.htm">Transformation
Viewer</a>的一部分.</span></p>
<p><span class="normal105"><a
href="../../../msdn.microsoft.com/xml/samples/transform-viewer/transform-viewer.zip" tppabs="http://msdn.microsoft.com/xml/samples/transform-viewer/transform-viewer.zip">
Download this sample</a>. </span></p>
<p><span class="normal105"><b>注意:</b> 样式表作为Internet Explorer5客户端的一个资源它也是直接可用的.访问这个资源URL定位是<font face="Arial">res://msxml.dll/DEFAULTSS.XSL</font>.下载这个URL能使使用<b>transformNode
</b>时样式表可用.当所包含的页面通过http://或者https://scheme的urls被访问的时候,安全性限制不允许这个url被使用<font size="2">.</font></span></p>
</td>
</tr>
<tr>
<td colspan="3" height="2"><font face="宋体" lang="ZH-CN" size=3> </font> <rev></rev><font face="宋体" lang="ZH-CN" size=3></font>
<hr size="1">
<p align="center"><font face="宋体" lang="ZH-CN">[<a href="#top">返回标题</a>][<a href="../application.htm" tppabs="http://www.xml.org.cn:8188/application/application.htm" target="_parent">返回应用</a>][<a href="../../default.asp.htm" tppabs="http://www.xml.org.cn:8188/default.asp" target="_parent">返回首页</a>][<a href="mailto:xmlteam@egroups.com">欢迎投稿</a>]</font></p>
<p align="center">最后更新:1999年9月15日<br>
<font color="#FF0033" size="-1">本站点所刊文章版权,均归本站点所有。署名作者拥有其著作权。<br>
未经</font><font color="#FF0033"><a href="mailto:xmlteam@egroups.com"><font color="#6666FF" size="-1">允许</font></a></font><font color="#FF0033" size="-1">,不得随意转载,违者必究!!</font>
</p>
</td>
</tr>
</table>
<h2 ALIGN="CENTER"> </h2>
<FONT FACE="宋体" LANG="ZH-CN" SIZE=3>
<P ALIGN="JUSTIFY"> </P>
</FONT><FONT FACE="宋体" LANG="ZH-CN" SIZE=3></FONT>
</BODY>
</HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -