XSLT <xsl:attribute-set> 元素

2018-02-12 15:43 更新

XSLT <xsl:attribute-set> 元素

XSLT <xsl:attribute-set> 元素可以让你创建一个属性集!


XSLT 元素参考手册 完整的 XSLT 元素参考手册

定义和用法

<xsl:attribute-set> 元素可创建命名的属性集。该属性集(attribute-set)可作为整体应用到输出文档。

注意:必须是 <xsl:stylesheet> 或 <xsl:transform> 的子节点。


语法

<xsl:attribute-set
name="name" use-attribute-sets="name-list">

<!-- Content:xsl:attribute* -->

</xsl:attribute-set>

属性

属性 描述
name name 必需。规定属性集(attribute-set)的名称。
use-attribute-sets name-list 可选。在该属性集(attribute-set)中使用的其它属性集(attribute-set)的列表,由空格分隔。

实例 1

创建可应用到任何输出元素的属性集(attribute-set):

<xsl:attribute-set name="font">
<xsl:attribute name="fname">Arial</xsl:attribute>
<xsl:attribute name="size">14px</xsl:attribute>
<xsl:attribute name="color">red</xsl:attribute>
</xsl:attribute-set>

XSLT 元素参考手册 完整的 XSLT 元素参考手册
以上内容是否对您有帮助:
在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号