中国最全IT社区平台 联系我们 | 收藏本站
华晨云阿里云优惠2

xslt教程

XSLT 教程

XSLT 高级

XSLT 参考手册

  • XSLT 实例
  • XSLT <xsl:attribute-set> 元素

    阅读 (2243)

    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 元素参考手册
    关闭
    程序员人生