当前位置: 首页 > 网络学院 > XML相关教程 > XSL/XSLT > XSLT <xsl:copy> 元素

XSL/XSLT
XSL 语言
XSLT 介绍
XSLT 浏览器
XSLT 转换
<xsl:template>
<xsl:value-of>
<xsl:for-each>
<xsl:sort>
<xsl:if>
<xsl:choose>
<xsl:apply-templates>
XSLT - 客户端
XSLT - 服务器端
XSLT - 编辑XML
XSLT 摘要
XSLT 元素参考
XSLT 函数
XSL 编辑器

XSL/XSLT 中的 XSLT <xsl:copy> 元素


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-03-04   浏览: 248 ::
收藏到网摘: n/a

Definition and Usage
定义和用法

The <xsl:copy> element creates a copy of the current node. 
<xsl:copy> 元素的作用是:创建一个当前节点的复制版本。

Note: Namespace nodes of the current node are automatically copied as well, but child nodes and attributes of the current node are not automatically copied!
注意:当前节点的命名空间节点也会被自动复制,但是当前节点中的子节点和属性将不会自动复制。


Syntax
语法

<xsl:copy use-attribute-sets="name-list">
 <!-- Content:template -->
</xsl:copy>

Attributes
属性

属性 描述
use-attribute-sets name-list Optional. A white space separated list of attribute-sets to apply to the output node, if the node is an element
可选参数。如果节点是一个元素,那么该参数则指定在输出节点中使用的空白行,用于分隔不同的属性组列表

Example 1
案例1

Copy the message node to the output document:
将消息节点复制到输出文档:

<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="message"> <xsl:copy> <xsl:apply-templates/> </xsl:copy>
</xsl:template>
</xsl:stylesheet>

评论 (0) All

登陆 | 还没注册?