15.2.31. XSLT < xsl:attribute > element

发布时间 :2025-10-25 12:23:22 UTC      

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

Definition and usage

The < xsl:attribute > element is used to add attributes to the element.

Note: the < xsl:attribute > element replaces existing attributes with the same name.

Grammar

<xsl:attribute name="attributename" namespace="uri">
<!-- Content:template -->
</xsl:attribute>

Attribute

Attribute

Value

Description

Name

Attributename

Necessary. Specifies the name of the attribute.

Namespace

URI

Optional. The URI that defines the namespace for the attribute.

Example 1

Add a source attribute to the picture element:

<picture>
<xsl:attribute name="source"/>
</picture>

Example 2

Add a source attribute to the picture element and assign it using the value in “images/name”:

<picture>
<xsl:attribute name="source">
<xsl:value-of select="images/name" />
</xsl:attribute>
</picture>

Example 3

Create a set of attributes that can be applied to any output element:

<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 元素参考手册

Principles, Technologies, and Methods of Geographic Information Systems  102

In recent years, Geographic Information Systems (GIS) have undergone rapid development in both theoretical and practical dimensions. GIS has been widely applied for modeling and decision-making support across various fields such as urban management, regional planning, and environmental remediation, establishing geographic information as a vital component of the information era. The introduction of the “Digital Earth” concept has further accelerated the advancement of GIS, which serves as its technical foundation. Concurrently, scholars have been dedicated to theoretical research in areas like spatial cognition, spatial data uncertainty, and the formalization of spatial relationships. This reflects the dual nature of GIS as both an applied technology and an academic discipline, with the two aspects forming a mutually reinforcing cycle of progress.