- 浏览: 1864150 次
- 性别:
- 来自: 合肥
文章分类
- 全部博客 (514)
- OPEN (41)
- WARN (33)
- EXPER (16)
- RESOURCE (7)
- TOOL (4)
- DWR (10)
- Struts1.x (10)
- Ibtais (18)
- MyEclipse (30)
- Sql Server (64)
- Tomcat (7)
- APACHE (4)
- JSP (18)
- SERVLET (6)
- ENGLISH (0)
- ECSide (8)
- JasperReports (7)
- JAVA (24)
- JS (42)
- XML (26)
- CVS (8)
- Mind (1)
- JQUERY (2)
- IBATIS (6)
- PROJECT (0)
- STRUTS2 (0)
- PROXOOL (0)
- SPRING (4)
- Hibernate (0)
- SSI (0)
- JBPM (11)
- FLEX (3)
- JSON (2)
- GWT (1)
- jeecms v3 (1)
- Flash (2)
- DATA (1)
- ORACLE (3)
- 查询oracle 中逗号分隔字符串中所有值 (1)
最新评论
-
小小西芹菜:
GoEasy web三步轻松实现web实时推送1. 引入goe ...
服务器推送技术 java -
kg_1997:
这个方法太棒了,可以不用to_date函数,实在是棒!!!
java/oracle日期处理 -
wodesunday:
:idea:
SQL的分段统计查询语句 -
wodesunday:
引用
SQL的分段统计查询语句 -
BlueSkator:
讲的有点浅,没有深入进去
tomcat需要的重新发布和重启服务器的几种情况
xsl:attribute
创建一个属性节点和追加节点到输出节点中
Remarks
标签中的内容指名属性(attribute)的值
Attributes 能够追加或修改标签(element)的属性通过把 <xsl:attribute> 标签放到输出标签中。
如:
<input>
<xsl:attribute name="type">button</attribute>
</input>
注意: <xsl:attribute> 可以放在输出标签中,不仅仅是<xsl:element>.
在子标签追加前所有的属性必须都被应用。
就是 <xsl:attribute>必须在字标签追加前
例子:
xml:
<?xml-stylesheet type="text/xsl" href="sample.xsl"?>
<catalog>
<book id="bk101">
<author>Gambardella, Matthew</author>
<title>XML Developer's Guide</title>
<genre>Computer</genre>
<price>44.95</price>
<publish_date>2000-10-01</publish_date>
<description>An in-depth look at creating applications with XML.</description>
</book>
<book id="bk102">
<author>Ralls, Kim</author>
<title>Midnight Rain</title>
<genre>Fantasy</genre>
<price>5.95</price>
<publish_date>2000-12-16</publish_date>
<description>A former architect battles corporate zombies, an evil sorceress, and her own childhood to become queen of the world.</description>
</book>
<book id="bk103">
<author>Corets, Eva</author>
<title>Maeve Ascendant</title>
<genre>Fantasy</genre>
<price>5.95</price>
<publish_date>2000-11-17</publish_date>
<description>After the collapse of a nanotechnology society in England, the young survivors lay the foundation for a new society.</description>
</book>
<book id="bk104">
<author>Corets, Eva</author>
<title>Oberon's Legacy</title>
<genre>Fantasy</genre>
<price>5.95</price>
<publish_date>2001-03-10</publish_date>
<description>In post-apocalypse England, the mysterious agent known only as Oberon helps to create a new life for the inhabitants of London. Sequel to Maeve Ascendant.</description>
</book>
<book id="bk105">
<author>Corets, Eva</author>
<title>The Sundered Grail</title>
<genre>Fantasy</genre>
<price>5.95</price>
<publish_date>2001-09-10</publish_date>
<description>The two daughters of Maeve, half-sisters, battle one another for control of England. Sequel to Oberon's Legacy.</description>
</book>
<book id="bk106">
<author>Randall, Cynthia</author>
<title>Lover Birds</title>
<genre>Romance</genre>
<price>4.95</price>
<publish_date>2000-09-02</publish_date>
<description>When Carla meets Paul at an ornithology conference, tempers fly as feathers get ruffled.</description>
</book>
<book id="bk107">
<author>Thurman, Paula</author>
<title>Splish Splash</title>
<genre>Romance</genre>
<price>4.95</price>
<publish_date>2000-11-02</publish_date>
<description>A deep sea diver finds true love twenty thousand leagues beneath the sea.</description>
</book>
<book id="bk108">
<author>Knorr, Stefan</author>
<title>Creepy Crawlies</title>
<genre>Horror</genre>
<price>4.95</price>
<publish_date>2000-12-06</publish_date>
<description>An anthology of horror stories about roaches, centipedes, scorpions and other insects.</description>
</book>
<book id="bk109">
<author>Kress, Peter</author>
<title>Paradox Lost</title>
<genre>Science Fiction</genre>
<price>6.95</price>
<publish_date>2000-11-02</publish_date>
<description>After an inadvertant trip through a Heisenberg Uncertainty Device, James Salway discovers the problems of being quantum.</description>
</book>
<book id="bk110">
<author>O'Brien, Tim</author>
<title>Microsoft .NET: The Programming Bible</title>
<genre>Computer</genre>
<price>36.95</price>
<publish_date>2000-12-09</publish_date>
<description>Microsoft's .NET initiative is explored in detail in this deep programmer's reference.</description>
</book>
<book id="bk111">
<author>O'Brien, Tim</author>
<title>MSXML3: A Comprehensive Guide</title>
<genre>Computer</genre>
<price>36.95</price>
<publish_date>2000-12-01</publish_date>
<description>The Microsoft MSXML3 parser is covered in detail, with attention to XML DOM interfaces, XSLT processing, SAX and more.</description>
</book>
<book id="bk112">
<author>Galos, Mike</author>
<title>Visual Studio 7: A Comprehensive Guide</title>
<genre>Computer</genre>
<price>49.95</price>
<publish_date>2001-04-16</publish_date>
<description>Microsoft Visual Studio 7 is explored in depth, looking at how Visual Basic, Visual C++, C#, and ASP+ are integrated into a comprehensive development environment.</description>
</book>
</catalog>
xslt:
<xsl:stylesheet xml="http://www.w3.org/XML/1998/namespace" xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output method="html"/>
<xsl:template match="/">
<html>
<body>
<xsl:apply-templates/>
</body>
</html>
</xsl:template>
<xsl:template match="book"> Title:
<!-- { expression } is shorthand -->
<input size="40" id="{@id}">
<!-- attributes are applied to the current parent element (i.e. 'input') -->
<xsl:attribute name="value">
<xsl:value-of select="title"/>
</xsl:attribute>
</input>
<br/>
</xsl:template>
</xsl:stylesheet>
创建一个属性节点和追加节点到输出节点中
Remarks
标签中的内容指名属性(attribute)的值
Attributes 能够追加或修改标签(element)的属性通过把 <xsl:attribute> 标签放到输出标签中。
如:
<input>
<xsl:attribute name="type">button</attribute>
</input>
注意: <xsl:attribute> 可以放在输出标签中,不仅仅是<xsl:element>.
在子标签追加前所有的属性必须都被应用。
就是 <xsl:attribute>必须在字标签追加前
例子:
xml:
<?xml-stylesheet type="text/xsl" href="sample.xsl"?>
<catalog>
<book id="bk101">
<author>Gambardella, Matthew</author>
<title>XML Developer's Guide</title>
<genre>Computer</genre>
<price>44.95</price>
<publish_date>2000-10-01</publish_date>
<description>An in-depth look at creating applications with XML.</description>
</book>
<book id="bk102">
<author>Ralls, Kim</author>
<title>Midnight Rain</title>
<genre>Fantasy</genre>
<price>5.95</price>
<publish_date>2000-12-16</publish_date>
<description>A former architect battles corporate zombies, an evil sorceress, and her own childhood to become queen of the world.</description>
</book>
<book id="bk103">
<author>Corets, Eva</author>
<title>Maeve Ascendant</title>
<genre>Fantasy</genre>
<price>5.95</price>
<publish_date>2000-11-17</publish_date>
<description>After the collapse of a nanotechnology society in England, the young survivors lay the foundation for a new society.</description>
</book>
<book id="bk104">
<author>Corets, Eva</author>
<title>Oberon's Legacy</title>
<genre>Fantasy</genre>
<price>5.95</price>
<publish_date>2001-03-10</publish_date>
<description>In post-apocalypse England, the mysterious agent known only as Oberon helps to create a new life for the inhabitants of London. Sequel to Maeve Ascendant.</description>
</book>
<book id="bk105">
<author>Corets, Eva</author>
<title>The Sundered Grail</title>
<genre>Fantasy</genre>
<price>5.95</price>
<publish_date>2001-09-10</publish_date>
<description>The two daughters of Maeve, half-sisters, battle one another for control of England. Sequel to Oberon's Legacy.</description>
</book>
<book id="bk106">
<author>Randall, Cynthia</author>
<title>Lover Birds</title>
<genre>Romance</genre>
<price>4.95</price>
<publish_date>2000-09-02</publish_date>
<description>When Carla meets Paul at an ornithology conference, tempers fly as feathers get ruffled.</description>
</book>
<book id="bk107">
<author>Thurman, Paula</author>
<title>Splish Splash</title>
<genre>Romance</genre>
<price>4.95</price>
<publish_date>2000-11-02</publish_date>
<description>A deep sea diver finds true love twenty thousand leagues beneath the sea.</description>
</book>
<book id="bk108">
<author>Knorr, Stefan</author>
<title>Creepy Crawlies</title>
<genre>Horror</genre>
<price>4.95</price>
<publish_date>2000-12-06</publish_date>
<description>An anthology of horror stories about roaches, centipedes, scorpions and other insects.</description>
</book>
<book id="bk109">
<author>Kress, Peter</author>
<title>Paradox Lost</title>
<genre>Science Fiction</genre>
<price>6.95</price>
<publish_date>2000-11-02</publish_date>
<description>After an inadvertant trip through a Heisenberg Uncertainty Device, James Salway discovers the problems of being quantum.</description>
</book>
<book id="bk110">
<author>O'Brien, Tim</author>
<title>Microsoft .NET: The Programming Bible</title>
<genre>Computer</genre>
<price>36.95</price>
<publish_date>2000-12-09</publish_date>
<description>Microsoft's .NET initiative is explored in detail in this deep programmer's reference.</description>
</book>
<book id="bk111">
<author>O'Brien, Tim</author>
<title>MSXML3: A Comprehensive Guide</title>
<genre>Computer</genre>
<price>36.95</price>
<publish_date>2000-12-01</publish_date>
<description>The Microsoft MSXML3 parser is covered in detail, with attention to XML DOM interfaces, XSLT processing, SAX and more.</description>
</book>
<book id="bk112">
<author>Galos, Mike</author>
<title>Visual Studio 7: A Comprehensive Guide</title>
<genre>Computer</genre>
<price>49.95</price>
<publish_date>2001-04-16</publish_date>
<description>Microsoft Visual Studio 7 is explored in depth, looking at how Visual Basic, Visual C++, C#, and ASP+ are integrated into a comprehensive development environment.</description>
</book>
</catalog>
xslt:
<xsl:stylesheet xml="http://www.w3.org/XML/1998/namespace" xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output method="html"/>
<xsl:template match="/">
<html>
<body>
<xsl:apply-templates/>
</body>
</html>
</xsl:template>
<xsl:template match="book"> Title:
<!-- { expression } is shorthand -->
<input size="40" id="{@id}">
<!-- attributes are applied to the current parent element (i.e. 'input') -->
<xsl:attribute name="value">
<xsl:value-of select="title"/>
</xsl:attribute>
</input>
<br/>
</xsl:template>
</xsl:stylesheet>
发表评论
-
XSTL接触
2011-04-27 15:39 2789XSTL接触 07月 11th, 2006 by 城市刀客 ... -
unknown protocol: c 解决方法,致命错误:“无法编译样式表”
2010-11-26 10:03 4571在使用XSLTransformer解析xml样式表,出现 u ... -
模板存储和解析。
2010-11-16 16:41 1167表单建模或者权限页面显示原理基本使用模板存储和解析 采用XML ... -
xml To html
2010-10-11 15:34 1185import java.io.*; import java.u ... -
(四)XPath 实例
2010-10-11 14:10 1347XPath 实例 Previous Page Next Pag ... -
(三)XPath Axes(坐标轴)
2010-10-11 13:53 1121XML 实例文档 我们将在 ... -
(二)XPath 语法
2010-10-11 13:41 905XPath 使用路径表达式来选取 XML 文档中的节点或节点集 ... -
XPath 术语(一)
2010-10-11 13:40 943XPath 术语 节点(Node) ... -
XSLT中用normalize-space函数来清除元素的前后空格
2010-10-11 13:30 1882XSLT中用normalize-space函数来清除元素的前后 ... -
java编写xsl转换器(xslt)把xml文件转换为html文件2
2010-10-11 10:41 1599//Prints formatted representati ... -
XSLT - 客户端
2010-10-11 09:14 860如果您的浏览器支持 XSLT,那么在浏览器中它可被用来将文档转 ... -
XSLT <xsl:apply-templates> 元素
2010-10-11 09:10 1255<xsl:apply-templates> 元素可 ... -
XSLT <xsl:choose> 元素
2010-10-11 09:05 1184XSLT <xsl:choose> 元素 Prev ... -
XSLT <xsl:if> 元素
2010-10-11 09:04 1195XSLT <xsl:if> 元素 Prev ... -
XSLT <xsl:sort> 元素
2010-10-11 09:02 1734XSLT <xsl:sort> 元素 Previo ... -
XSLT <xsl:for-each> 元素
2010-10-11 09:02 1539XSLT <xsl:for-each> 元素 Pr ... -
XSLT <xsl:value-of> 元素
2010-10-11 09:01 1129XSLT <xsl:value-of> 元素 Pr ... -
XSLT 元素 (一)
2010-10-08 15:09 952XSLT 元素 XSL 样式表由 ... -
java编写xsl转换器(xslt)把xml文件转换为html文件
2010-10-08 14:32 4461package xslt; import java.io ... -
jdom常用方法封装
2010-02-06 10:22 1507import java.io.*; import javax ...
相关推荐
<xsl:output name="xhtml" method="xhtml" indent="yes" omit-xml-declaration="yes"/> <xsl:param name="testNgXslt.outputDir"/> <xsl:param name="testNgXslt.cssFile"/> <xsl:param name="testNgXslt....
<XSL:ATTRIBUTE name="href"> 19. <XSL:VALUE-OF select="pe:GetNodePath('true',NodeID)" /> 20. </XSL:ATTRIBUTE>[更多]</A> 21. </DIV> 22. <A> 23. <XSL:ATTRIBUTE name="href"> 24. <XSL:VALUE-OF select...
14.9.3 使用xsl:attribute将特性插入到输出文档中 476 14.9.4 定义特性集合 477 14.9.5 使用xsl:pi生成处理指令 478 14.9.6 使用xsl:comment生成注释 478 14.9.7 使用xsl:text生成文本 479 14.10 使用xsl:copy复制...
14.9.3 使用xsl:attribute将特性插入到输出文档中 476 14.9.4 定义特性集合 477 14.9.5 使用xsl:pi生成处理指令 478 14.9.6 使用xsl:comment生成注释 478 14.9.7 使用xsl:text生成文本 479 14.10 使用xsl:copy复制...
第5章 属性、空标记和XSL. 86 5.1 属性... 86 5.2 属性与元素的对比... 95 5.2.1 结构化的元数据... 95 5.2.2 元元数据... 99 5.2.3 有关元数据的说明... 100 5.2.4 元素更具扩展性... 100 5.2.5 使用属性的...
第5章 属性、空标记和XSL. 86 5.1 属性... 86 5.2 属性与元素的对比... 95 5.2.1 结构化的元数据... 95 5.2.2 元元数据... 99 5.2.3 有关元数据的说明... 100 5.2.4 元素更具扩展性... 100 5.2.5 使用属性的...
第5章 属性、空标记和XSL. 86 5.1 属性... 86 5.2 属性与元素的对比... 95 5.2.1 结构化的元数据... 95 5.2.2 元元数据... 99 5.2.3 有关元数据的说明... 100 5.2.4 元素更具扩展性... 100 5.2.5 使用属性的...
28 2.2.1 XSL. 28 2.2.2 XLL. 28 2.2.3 DCD.. 29 2.3 XML的后台应用... 30 2.4 本章小结... 33 第3章 第一个XML文档... 34 3.1 Hello XML. 34 3.1.1 创建一个简单的XML文档... 34 3.1.2...
Each xsl:when element has a single attribute
18.4.2 attribute指令 556 18.4.3 variable指令 557 18.5 标签文件实例讲解 558 18.5.1 实例一:[welcome]标签 558 18.5.2 实例二:[tohtml]标签 559 18.6 [jsp:invoke]动作元素 561 18.7 [jsp:dobody]动作...
18.4.2 attribute指令 556 18.4.3 variable指令 557 18.5 标签文件实例讲解 558 18.5.1 实例一:[welcome]标签 558 18.5.2 实例二:[tohtml]标签 559 18.6 [jsp:invoke]动作元素 561 18.7 [jsp:dobody]动作...
18.4.2 attribute指令 556 18.4.3 variable指令 557 18.5 标签文件实例讲解 558 18.5.1 实例一:[welcome]标签 558 18.5.2 实例二:[tohtml]标签 559 18.6 [jsp:invoke]动作元素 561 18.7 [jsp:dobody]动作...
18.4.2 attribute指令 556 18.4.3 variable指令 557 18.5 标签文件实例讲解 558 18.5.1 实例一:[welcome]标签 558 18.5.2 实例二:[tohtml]标签 559 18.6 [jsp:invoke]动作元素 561 18.7 [jsp:dobody]动作...
xsl保护密码清除代码,打开宏将代码贴进去就执行就可以了Attribute VB_Name = "模块1" Private Function AllInternalPasswords() Dim w1 As Worksheet, w2 As Worksheet Dim i As Integer, j As Integer, k As ...
人心的功能,如将Action输出到FreeMaker模板、Velocity模板、JasperReports和使用XSL转换等。这些都过result里的type(类型)属性(Attribute)定义的。另外,您还可以自定义result类型。 下面让我们来做一个...
1. 简述 private、 protected、 public、 internal 修饰符的访问权限。 答 . private : 私有成员, 在类的内部才可以访问。 protected : 保护成员,该类内部和继承类中可以访问。 public : 公共成员,完全公开,...
Custom Attribute Example: WhatsNewAttributes 262 Reflection 265 The System.Type Class 266 The TypeView Example 268 The Assembly Class 271 Completing the WhatsNewAttributes Sample 272 Summary 276 ...
11. 连接外界属性数据(如:.xsl文件等) 利用JOIN 工具可以方便的实现与外界属性数据的关联,但这种关联是依赖于外界数据库本身的,需经过重新导出之后即完全保存在相应图层属性页。在做外联如EXCEL等的时候对数据...
* OpenSC now depends on xsltproc utility and docbook-xsl to build docs and man * Remove iconv dependency. EstEID driver now uses the commonName from the certificate for card label. * Possibility to ...
XSLDocument 获取对 XSL 文档的顶层结点的引用。 属性 集合 集合 描述 all 返回对象所包含的元素集合的引用。 anchors 获取所有带有 name 和/或 id 属性的 a 对象的集合。此集合中的对象以 HTML 源顺序...