April 2001
Intermediate to advanced
112 pages
2h 15m
English
<xsl:element>
<xsl:element name=”name" [namespace=”URI“] [use-attribute-sets=”list“]> ... </xsl:element>
This inserts the element name into the result
document. For example:
<xsl:element name="book">
<xsl:element name="chapter">
<xsl:text>The Opening of Pandora's Box</xsl:text>
</xsl:element>
</xsl:element>This creates the following in the result tree:
<book> <chapter>The Opening of Pandora's Box</chapter> </book>
Elements without explicit namespaces use the default name- space of their current context. Also, you can create a name- space for the element yourself:
<xsl:element name="OReilly:Book" namespace="http://www.oreilly.com">
This employs the namespace associated with the URI http://www.oreilly.com with the element. If no namespaces are associated with the URI, it becomes the default namespace.
The use-attribute-sets
attribute contains a whitespace- separated list with names of
xsl:attribute-set elements. These
attribute sets are merged, and all attributes in the merged set are
added to the element.
Read now
Unlock full access