XSLT

by (2nd ed.)
ISBN-10 0596527217 ISBN-13 9780596527211
1 Flashcards & Notes
1 Students
  • This summary
  • +380.000 other summaries
  • A unique study tool
  • A rehearsal system for this summary
  • Studycoaching with videos
Remember faster, study better. Scientifically proven.

Summary - XSLT

  • 7.1.1 Our First Example

  • <xsl:template match="/">

    <xsl:for-each select="addressbook/address">

    <xsl:sort select="name/last-name"/>

     

    That's how simple it is: <xsl:sort> is child of <xsl:for-each>, sorting the nodes in the nodeset specified (addressbook/address) on one of its subnodes (name/last-name>.

    See snippet of xml used below.

    <addressbook>
    <address>
    <name>
    <title>Mr.</title>
    <first-name>Chester Hasbrouck</first-name>
    <last-name>Frisby</last-name>
    </name>
    <street>1234 Main Street</street>
    <city>Sheboygan</city>
    <state>WI</state>
    <zip>48392</zip>
    </address>
    <address>
    ...

     

     

     

     

Read the full summary
This summary. +380.000 other summaries. A unique study tool. A rehearsal system for this summary. Studycoaching with videos.