Skip to Content
XSLT and XPATH: A Guide to XML Transformations
book

XSLT and XPATH: A Guide to XML Transformations

by John Robert Gardner, Zarella L. Rendon
July 2001
Intermediate to advanced
592 pages
11h 16m
English
Pearson
Content preview from XSLT and XPATH: A Guide to XML Transformations

6.2. The <xsl:element> Instruction Element

The <xsl:element> instruction element provides a more structured approach to adding new XML elements directly to the output result tree. The following element model definition shows the correct structure of the <xsl:element> instruction element:

<!-- Category: instruction -->

<xsl:element

  name = { qname }

  namespace = { uri-reference }

  use-attribute-sets = qnames>

  <!-- Content: template -->

</xsl:element>

The <xsl:element> instruction element has three attributes, one of which is mandatory: the name attribute. The name attribute contains the element-type name of the new element in the result tree. This attribute is required because an element without an element-type name is not valid XML, and using ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Beginning XSLT and XPath: Transforming XML Documents and Data

Beginning XSLT and XPath: Transforming XML Documents and Data

Ian Williams
Java and XSLT

Java and XSLT

Eric M. Burke
Learning XSLT

Learning XSLT

Michael Fitzgerald

Publisher Resources

ISBN: 0130404462Purchase book