<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="ru">
		<id>http://wbex.ru/index.php?action=history&amp;feed=atom&amp;title=XML%2FXSLT_stylesheet%2Fdescendant</id>
		<title>XML/XSLT stylesheet/descendant - История изменений</title>
		<link rel="self" type="application/atom+xml" href="http://wbex.ru/index.php?action=history&amp;feed=atom&amp;title=XML%2FXSLT_stylesheet%2Fdescendant"/>
		<link rel="alternate" type="text/html" href="http://wbex.ru/index.php?title=XML/XSLT_stylesheet/descendant&amp;action=history"/>
		<updated>2026-04-06T01:57:26Z</updated>
		<subtitle>История изменений этой страницы в вики</subtitle>
		<generator>MediaWiki 1.30.0</generator>

	<entry>
		<id>http://wbex.ru/index.php?title=XML/XSLT_stylesheet/descendant&amp;diff=10377&amp;oldid=prev</id>
		<title>Admin: 1 версия</title>
		<link rel="alternate" type="text/html" href="http://wbex.ru/index.php?title=XML/XSLT_stylesheet/descendant&amp;diff=10377&amp;oldid=prev"/>
				<updated>2010-05-26T08:26:17Z</updated>
		
		<summary type="html">&lt;p&gt;1 версия&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr style=&quot;vertical-align: top;&quot; lang=&quot;ru&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Предыдущая&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Версия 08:26, 26 мая 2010&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; style=&quot;text-align: center;&quot; lang=&quot;ru&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(нет различий)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Admin</name></author>	</entry>

	<entry>
		<id>http://wbex.ru/index.php?title=XML/XSLT_stylesheet/descendant&amp;diff=10376&amp;oldid=prev</id>
		<title> в 18:22, 25 мая 2010</title>
		<link rel="alternate" type="text/html" href="http://wbex.ru/index.php?title=XML/XSLT_stylesheet/descendant&amp;diff=10376&amp;oldid=prev"/>
				<updated>2010-05-25T18:22:29Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Новая страница&lt;/b&gt;&lt;/p&gt;&lt;div&gt;==descendant demo==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
  &amp;lt;!-- start source code --&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
    &amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
File: Data.xml&lt;br /&gt;
&amp;lt;chapter&amp;gt;&lt;br /&gt;
  &amp;lt;para&amp;gt;para1&amp;lt;/para&amp;gt;&lt;br /&gt;
  &amp;lt;figure&amp;gt;&lt;br /&gt;
    &amp;lt;title&amp;gt;title 1&amp;lt;/title&amp;gt;&lt;br /&gt;
    &amp;lt;graphic fileref=&amp;quot;pic1.jpg&amp;quot; /&amp;gt;&lt;br /&gt;
  &amp;lt;/figure&amp;gt;&lt;br /&gt;
  &amp;lt;para&amp;gt;para2&amp;lt;/para&amp;gt;&lt;br /&gt;
  &amp;lt;sect1&amp;gt;&lt;br /&gt;
    &amp;lt;para&amp;gt;para3&amp;lt;/para&amp;gt;&lt;br /&gt;
    &amp;lt;figure&amp;gt;&lt;br /&gt;
      &amp;lt;title&amp;gt;&amp;quot;He Lights&amp;quot;&amp;lt;/title&amp;gt;&lt;br /&gt;
      &amp;lt;graphic fileref=&amp;quot;pic2.jpg&amp;quot; /&amp;gt;&lt;br /&gt;
    &amp;lt;/figure&amp;gt;&lt;br /&gt;
    &amp;lt;para&amp;gt;line 1&amp;lt;/para&amp;gt;&lt;br /&gt;
    &amp;lt;sect2&amp;gt;&lt;br /&gt;
      &amp;lt;para&amp;gt;line 2&amp;lt;/para&amp;gt;&lt;br /&gt;
      &amp;lt;figure&amp;gt;&lt;br /&gt;
        &amp;lt;title&amp;gt;title 2&amp;lt;/title&amp;gt;&lt;br /&gt;
        &amp;lt;graphic fileref=&amp;quot;pic1.jpg&amp;quot; /&amp;gt;&lt;br /&gt;
      &amp;lt;/figure&amp;gt;&lt;br /&gt;
    &amp;lt;/sect2&amp;gt;&lt;br /&gt;
  &amp;lt;/sect1&amp;gt;&lt;br /&gt;
&amp;lt;/chapter&amp;gt;&lt;br /&gt;
File: Transform.xslt&lt;br /&gt;
&amp;lt;xsl:stylesheet xmlns:xsl=&amp;quot;http://www.w3.org/1999/XSL/Transform&amp;quot;&lt;br /&gt;
  version=&amp;quot;1.0&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;xsl:output method=&amp;quot;html&amp;quot; /&amp;gt;&lt;br /&gt;
  &amp;lt;xsl:template match=&amp;quot;chapter&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;html&amp;gt;&lt;br /&gt;
      &amp;lt;body&amp;gt;&lt;br /&gt;
        &amp;lt;b&amp;gt;Pictures:&amp;lt;/b&amp;gt;&lt;br /&gt;
        &amp;lt;br /&amp;gt;&lt;br /&gt;
        &amp;lt;xsl:for-each select=&amp;quot;descendant::figure&amp;quot;&amp;gt;&lt;br /&gt;
          &amp;lt;a href=&amp;quot;#{generate-id(graphic)}&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;xsl:value-of select=&amp;quot;title&amp;quot; /&amp;gt;&lt;br /&gt;
          &amp;lt;/a&amp;gt;&lt;br /&gt;
          &amp;lt;br /&amp;gt;&lt;br /&gt;
        &amp;lt;/xsl:for-each&amp;gt;&lt;br /&gt;
        &amp;lt;xsl:apply-templates /&amp;gt;&lt;br /&gt;
      &amp;lt;/body&amp;gt;&lt;br /&gt;
    &amp;lt;/html&amp;gt;&lt;br /&gt;
  &amp;lt;/xsl:template&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;xsl:template match=&amp;quot;para&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;p&amp;gt;&lt;br /&gt;
      &amp;lt;xsl:apply-templates /&amp;gt;&lt;br /&gt;
    &amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;/xsl:template&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;xsl:template match=&amp;quot;graphic&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;center&amp;gt;&lt;br /&gt;
      &amp;lt;a name=&amp;quot;{generate-id(.)}&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;img src=&amp;quot;{@fileref}&amp;quot; /&amp;gt;&lt;br /&gt;
      &amp;lt;/a&amp;gt;&lt;br /&gt;
      &amp;lt;b&amp;gt;&lt;br /&gt;
        &amp;lt;xsl:value-of select=&amp;quot;../title&amp;quot; /&amp;gt;&lt;br /&gt;
      &amp;lt;/b&amp;gt;&lt;br /&gt;
    &amp;lt;/center&amp;gt;&lt;br /&gt;
  &amp;lt;/xsl:template&amp;gt;&lt;br /&gt;
  &amp;lt;xsl:template match=&amp;quot;figure/title&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/xsl:stylesheet&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Output:&lt;br /&gt;
&amp;lt;html&amp;gt;&lt;br /&gt;
   &amp;lt;body&amp;gt;&amp;lt;b&amp;gt;Pictures:&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&amp;lt;a href=&amp;quot;#d2e11&amp;quot;&amp;gt;title 1&amp;lt;/a&amp;gt;&amp;lt;br&amp;gt;&amp;lt;a href=&amp;quot;#d2e27&amp;quot;&amp;gt;&amp;quot;He Lights&amp;quot;&amp;lt;/a&amp;gt;&amp;lt;br&amp;gt;&amp;lt;a href=&amp;quot;#d2e43&amp;quot;&amp;gt;title 2&amp;lt;/a&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
        &lt;br /&gt;
      &amp;lt;p&amp;gt;para1&amp;lt;/p&amp;gt;&lt;br /&gt;
        &lt;br /&gt;
          &lt;br /&gt;
          &lt;br /&gt;
      &amp;lt;center&amp;gt;&amp;lt;a name=&amp;quot;d2e11&amp;quot;&amp;gt;&amp;lt;img src=&amp;quot;pic1.jpg&amp;quot;&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;b&amp;gt;title 1&amp;lt;/b&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
        &lt;br /&gt;
        &lt;br /&gt;
      &amp;lt;p&amp;gt;para2&amp;lt;/p&amp;gt;&lt;br /&gt;
        &lt;br /&gt;
          &lt;br /&gt;
      &amp;lt;p&amp;gt;para3&amp;lt;/p&amp;gt;&lt;br /&gt;
          &lt;br /&gt;
            &lt;br /&gt;
            &lt;br /&gt;
      &amp;lt;center&amp;gt;&amp;lt;a name=&amp;quot;d2e27&amp;quot;&amp;gt;&amp;lt;img src=&amp;quot;pic2.jpg&amp;quot;&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;b&amp;gt;&amp;quot;He Lights&amp;quot;&amp;lt;/b&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
          &lt;br /&gt;
          &lt;br /&gt;
      &amp;lt;p&amp;gt;line 1&amp;lt;/p&amp;gt;&lt;br /&gt;
          &lt;br /&gt;
            &lt;br /&gt;
      &amp;lt;p&amp;gt;line 2&amp;lt;/p&amp;gt;&lt;br /&gt;
            &lt;br /&gt;
              &lt;br /&gt;
              &lt;br /&gt;
      &amp;lt;center&amp;gt;&amp;lt;a name=&amp;quot;d2e43&amp;quot;&amp;gt;&amp;lt;img src=&amp;quot;pic1.jpg&amp;quot;&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;b&amp;gt;title 2&amp;lt;/b&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
            &lt;br /&gt;
          &lt;br /&gt;
        &lt;br /&gt;
      &lt;br /&gt;
   &amp;lt;/body&amp;gt;&lt;br /&gt;
&amp;lt;/html&amp;gt;&lt;br /&gt;
 &amp;lt;/source&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
   &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==descendant::tag name==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
  &amp;lt;!-- start source code --&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
    &amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
File: Data.xml&lt;br /&gt;
&amp;lt;chapter&amp;gt;&lt;br /&gt;
  &amp;lt;para&amp;gt;para1&amp;lt;/para&amp;gt;&lt;br /&gt;
  &amp;lt;figure&amp;gt;&lt;br /&gt;
    &amp;lt;title&amp;gt;title 1&amp;lt;/title&amp;gt;&lt;br /&gt;
    &amp;lt;graphic fileref=&amp;quot;pic1.jpg&amp;quot; /&amp;gt;&lt;br /&gt;
  &amp;lt;/figure&amp;gt;&lt;br /&gt;
&amp;lt;/chapter&amp;gt;&lt;br /&gt;
File: Transform.xslt&lt;br /&gt;
&amp;lt;xsl:stylesheet xmlns:xsl=&amp;quot;http://www.w3.org/1999/XSL/Transform&amp;quot;&lt;br /&gt;
  version=&amp;quot;1.0&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;xsl:output method=&amp;quot;xml&amp;quot; omit-xml-declaration=&amp;quot;yes&amp;quot; indent=&amp;quot;no&amp;quot; /&amp;gt;&lt;br /&gt;
  &lt;br /&gt;
  &amp;lt;xsl:template match=&amp;quot;chapter&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;chapter&amp;gt;&lt;br /&gt;
      Pictures:&lt;br /&gt;
      &amp;lt;xsl:for-each select=&amp;quot;descendant::figure&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;xsl:value-of select=&amp;quot;title&amp;quot; /&amp;gt;&lt;br /&gt;
        &amp;lt;xsl:text/&amp;gt;&lt;br /&gt;
      &amp;lt;/xsl:for-each&amp;gt;&lt;br /&gt;
      &amp;lt;xsl:apply-templates /&amp;gt;&lt;br /&gt;
    &amp;lt;/chapter&amp;gt;&lt;br /&gt;
  &amp;lt;/xsl:template&amp;gt;&lt;br /&gt;
  &amp;lt;xsl:template match=&amp;quot;@*|node()&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;xsl:copy&amp;gt;&lt;br /&gt;
      &amp;lt;xsl:apply-templates select=&amp;quot;@*|node()&amp;quot; /&amp;gt;&lt;br /&gt;
    &amp;lt;/xsl:copy&amp;gt;&lt;br /&gt;
  &amp;lt;/xsl:template&amp;gt;&lt;br /&gt;
&amp;lt;/xsl:stylesheet&amp;gt;&lt;br /&gt;
Output:&lt;br /&gt;
&amp;lt;chapter&amp;gt;&lt;br /&gt;
      Pictures:&lt;br /&gt;
      title 1&lt;br /&gt;
  &amp;lt;para&amp;gt;para1&amp;lt;/para&amp;gt;&lt;br /&gt;
  &amp;lt;figure&amp;gt;&lt;br /&gt;
    &amp;lt;title&amp;gt;title 1&amp;lt;/title&amp;gt;&lt;br /&gt;
    &amp;lt;graphic fileref=&amp;quot;pic1.jpg&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;/figure&amp;gt;&lt;br /&gt;
&amp;lt;/chapter&amp;gt;&lt;br /&gt;
 &amp;lt;/source&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
   &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==select=&amp;quot;descendant::figure/title[last()]&amp;quot;==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
  &amp;lt;!-- start source code --&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
    &amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
File: Data.xml&lt;br /&gt;
&amp;lt;chapter&amp;gt;&lt;br /&gt;
  &amp;lt;title&amp;gt;&amp;quot;title 1&amp;quot; Excerpt&amp;lt;/title&amp;gt;&lt;br /&gt;
  &amp;lt;para&amp;gt;para1&amp;lt;/para&amp;gt;&lt;br /&gt;
  &amp;lt;figure&amp;gt;&lt;br /&gt;
    &amp;lt;title&amp;gt;title 1&amp;lt;/title&amp;gt;&lt;br /&gt;
    &amp;lt;graphic fileref=&amp;quot;pic1.jpg&amp;quot; /&amp;gt;&lt;br /&gt;
  &amp;lt;/figure&amp;gt;&lt;br /&gt;
&amp;lt;/chapter&amp;gt;&lt;br /&gt;
File: Transform.xslt&lt;br /&gt;
&amp;lt;xsl:stylesheet xmlns:xsl=&amp;quot;http://www.w3.org/1999/XSL/Transform&amp;quot;&lt;br /&gt;
  version=&amp;quot;1.0&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;xsl:output method=&amp;quot;xml&amp;quot; omit-xml-declaration=&amp;quot;yes&amp;quot; indent=&amp;quot;no&amp;quot; /&amp;gt;&lt;br /&gt;
  &amp;lt;xsl:template match=&amp;quot;chapter&amp;quot;&amp;gt;&lt;br /&gt;
    Last figure title in chapter?&lt;br /&gt;
    &amp;lt;xsl:value-of select=&amp;quot;descendant::figure/title[last()]&amp;quot; /&amp;gt;&lt;br /&gt;
    No.&lt;br /&gt;
  &amp;lt;/xsl:template&amp;gt;&lt;br /&gt;
  &lt;br /&gt;
&amp;lt;/xsl:stylesheet&amp;gt;&lt;br /&gt;
Output:&lt;br /&gt;
    Last figure title in chapter?&lt;br /&gt;
    title 1&lt;br /&gt;
    No.&lt;br /&gt;
  &lt;br /&gt;
  &lt;br /&gt;
 &amp;lt;/source&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
   &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==select=&amp;quot;descendant::title[last()]&amp;quot;==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
  &amp;lt;!-- start source code --&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
    &amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
File: Data.xml&lt;br /&gt;
&amp;lt;chapter&amp;gt;&lt;br /&gt;
  &amp;lt;title&amp;gt;&amp;quot;title 1&amp;quot; Excerpt&amp;lt;/title&amp;gt;&lt;br /&gt;
  &amp;lt;para&amp;gt;para1&amp;lt;/para&amp;gt;&lt;br /&gt;
  &amp;lt;figure&amp;gt;&lt;br /&gt;
    &amp;lt;title&amp;gt;title 1&amp;lt;/title&amp;gt;&lt;br /&gt;
    &amp;lt;graphic fileref=&amp;quot;pic1.jpg&amp;quot; /&amp;gt;&lt;br /&gt;
  &amp;lt;/figure&amp;gt;&lt;br /&gt;
&amp;lt;/chapter&amp;gt;&lt;br /&gt;
File: Transform.xslt&lt;br /&gt;
&amp;lt;xsl:stylesheet xmlns:xsl=&amp;quot;http://www.w3.org/1999/XSL/Transform&amp;quot;&lt;br /&gt;
  version=&amp;quot;1.0&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;xsl:output method=&amp;quot;xml&amp;quot; omit-xml-declaration=&amp;quot;yes&amp;quot; indent=&amp;quot;no&amp;quot; /&amp;gt;&lt;br /&gt;
  &lt;br /&gt;
  &amp;lt;xsl:template match=&amp;quot;chapter&amp;quot;&amp;gt;&lt;br /&gt;
    First title in chapter:&lt;br /&gt;
    &amp;lt;xsl:value-of select=&amp;quot;descendant::title[1]&amp;quot; /&amp;gt;&lt;br /&gt;
    Last title in chapter:&lt;br /&gt;
    &amp;lt;xsl:value-of select=&amp;quot;descendant::title[last()]&amp;quot; /&amp;gt;&lt;br /&gt;
  &amp;lt;/xsl:template&amp;gt;&lt;br /&gt;
  &lt;br /&gt;
&amp;lt;/xsl:stylesheet&amp;gt;&lt;br /&gt;
Output:&lt;br /&gt;
&lt;br /&gt;
    First title in chapter:&lt;br /&gt;
    &amp;quot;title 1&amp;quot; Excerpt&lt;br /&gt;
    Last title in chapter:&lt;br /&gt;
    title 1&lt;br /&gt;
 &amp;lt;/source&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
   &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==value-of select=&amp;quot;descendant::lastName&amp;quot;==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
  &amp;lt;!-- start source code --&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
    &amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
File: Data.xml&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;?xml-stylesheet href=&amp;quot;Transform.xslt&amp;quot; type=&amp;quot;text/xsl&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;employees&amp;gt;&lt;br /&gt;
  &amp;lt;head:header xmlns:head=&amp;quot;http://www.domain.ru/namespace/header&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;title&amp;gt;Employee Data File&amp;lt;/title&amp;gt;&lt;br /&gt;
    &amp;lt;maintainer&amp;gt;developer 1&amp;lt;/maintainer&amp;gt;&lt;br /&gt;
  &amp;lt;/head:header&amp;gt;&lt;br /&gt;
  &amp;lt;employee eid=&amp;quot;1&amp;quot; dept=&amp;quot;programming&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;contact addInfo=&amp;quot;info1&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;name&amp;gt;&lt;br /&gt;
        &amp;lt;firstName&amp;gt;Joe&amp;lt;/firstName&amp;gt;&lt;br /&gt;
        &amp;lt;middleName int=&amp;quot;B&amp;quot;&amp;gt;Brian&amp;lt;/middleName&amp;gt;&lt;br /&gt;
        &amp;lt;lastName&amp;gt;Smith&amp;lt;/lastName&amp;gt;&lt;br /&gt;
      &amp;lt;/name&amp;gt;&lt;br /&gt;
      &amp;lt;address&amp;gt;&lt;br /&gt;
        &amp;lt;street&amp;gt;1 Drive&amp;lt;/street&amp;gt;&lt;br /&gt;
        &amp;lt;city&amp;gt;Vancouver&amp;lt;/city&amp;gt;&lt;br /&gt;
        &amp;lt;state&amp;gt;BC&amp;lt;/state&amp;gt;&lt;br /&gt;
        &amp;lt;zipcode&amp;gt;80210&amp;lt;/zipcode&amp;gt;&lt;br /&gt;
      &amp;lt;/address&amp;gt;&lt;br /&gt;
      &amp;lt;phone&amp;gt;&lt;br /&gt;
        &amp;lt;tel type=&amp;quot;wk&amp;quot;&amp;gt;111-1111111&amp;lt;/tel&amp;gt;&lt;br /&gt;
        &amp;lt;tel type=&amp;quot;hm&amp;quot;&amp;gt;222-222222&amp;lt;/tel&amp;gt;&lt;br /&gt;
        &amp;lt;fax&amp;gt;303-4667357&amp;lt;/fax&amp;gt;&lt;br /&gt;
      &amp;lt;/phone&amp;gt;&lt;br /&gt;
      &amp;lt;email&amp;gt;a@a.ru&amp;lt;/email&amp;gt;&lt;br /&gt;
    &amp;lt;/contact&amp;gt;&lt;br /&gt;
    &amp;lt;hireDate&amp;gt;2008-10-29&amp;lt;/hireDate&amp;gt;&lt;br /&gt;
  &amp;lt;/employee&amp;gt;&lt;br /&gt;
  &amp;lt;employee eid=&amp;quot;2&amp;quot; dept=&amp;quot;training&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;contact addInfo=&amp;quot;info2&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;name&amp;gt;&lt;br /&gt;
        &amp;lt;firstName&amp;gt;Sam&amp;lt;/firstName&amp;gt;&lt;br /&gt;
        &amp;lt;middleName int=&amp;quot;S&amp;quot;&amp;gt;Stolte&amp;lt;/middleName&amp;gt;&lt;br /&gt;
        &amp;lt;lastName&amp;gt;Williams&amp;lt;/lastName&amp;gt;&lt;br /&gt;
        &amp;lt;/name&amp;gt;&lt;br /&gt;
      &amp;lt;address&amp;gt;&lt;br /&gt;
        &amp;lt;street&amp;gt;1 St.&amp;lt;/street&amp;gt;&lt;br /&gt;
        &amp;lt;city&amp;gt;Austin&amp;lt;/city&amp;gt;&lt;br /&gt;
        &amp;lt;state&amp;gt;Texas&amp;lt;/state&amp;gt;&lt;br /&gt;
        &amp;lt;zipcode&amp;gt;22222&amp;lt;/zipcode&amp;gt;&lt;br /&gt;
      &amp;lt;/address&amp;gt;&lt;br /&gt;
      &amp;lt;phone&amp;gt;&lt;br /&gt;
        &amp;lt;tel type=&amp;quot;wk&amp;quot;&amp;gt;512-3467899&amp;lt;/tel&amp;gt;&lt;br /&gt;
        &amp;lt;tel type=&amp;quot;hm&amp;quot;&amp;gt;512-4623356&amp;lt;/tel&amp;gt;&lt;br /&gt;
        &amp;lt;fax&amp;gt;512-3465655&amp;lt;/fax&amp;gt;&lt;br /&gt;
      &amp;lt;/phone&amp;gt;&lt;br /&gt;
      &amp;lt;email&amp;gt;s@s.ru&amp;lt;/email&amp;gt;&lt;br /&gt;
    &amp;lt;/contact&amp;gt;&lt;br /&gt;
    &amp;lt;hireDate&amp;gt;2000-03-11&amp;lt;/hireDate&amp;gt;&lt;br /&gt;
  &amp;lt;/employee&amp;gt;&lt;br /&gt;
&amp;lt;/employees&amp;gt;&lt;br /&gt;
File: Transform.xslt&lt;br /&gt;
&amp;lt;xsl:stylesheet xmlns:xsl=&amp;quot;http://www.w3.org/1999/XSL/Transform&amp;quot; version=&amp;quot;1.0&amp;quot;&amp;gt;&lt;br /&gt;
   &amp;lt;xsl:output method=&amp;quot;html&amp;quot; indent=&amp;quot;yes&amp;quot; /&amp;gt;&lt;br /&gt;
   &amp;lt;xsl:template match=&amp;quot;/&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;html&amp;gt;&lt;br /&gt;
         &amp;lt;head&amp;gt;&lt;br /&gt;
            &amp;lt;title&amp;gt;Employee Output&amp;lt;/title&amp;gt;&lt;br /&gt;
         &amp;lt;/head&amp;gt;&lt;br /&gt;
         &amp;lt;body&amp;gt;&lt;br /&gt;
            &amp;lt;table&amp;gt;&lt;br /&gt;
               &amp;lt;tr&amp;gt;&lt;br /&gt;
                  &amp;lt;th&amp;gt;Number&amp;lt;/th&amp;gt;&lt;br /&gt;
                  &amp;lt;th&amp;gt;Last Name&amp;lt;/th&amp;gt;&lt;br /&gt;
                  &amp;lt;th&amp;gt;First Name&amp;lt;/th&amp;gt;&lt;br /&gt;
                  &amp;lt;th&amp;gt;Email&amp;lt;/th&amp;gt;&lt;br /&gt;
               &amp;lt;/tr&amp;gt;&lt;br /&gt;
               &amp;lt;xsl:apply-templates select=&amp;quot;employees/employee&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;/table&amp;gt;&lt;br /&gt;
         &amp;lt;/body&amp;gt;&lt;br /&gt;
      &amp;lt;/html&amp;gt;&lt;br /&gt;
   &amp;lt;/xsl:template&amp;gt;&lt;br /&gt;
   &amp;lt;xsl:template match=&amp;quot;employee&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;tr&amp;gt;&lt;br /&gt;
         &amp;lt;xsl:for-each select=&amp;quot;ancestor-or-self::*[@dept=&amp;quot;programming&amp;quot;]&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;td&amp;gt;&lt;br /&gt;
               &amp;lt;xsl:number /&amp;gt;&lt;br /&gt;
            &amp;lt;/td&amp;gt;&lt;br /&gt;
            &amp;lt;td&amp;gt;&lt;br /&gt;
               &amp;lt;xsl:value-of select=&amp;quot;descendant::lastName&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;/td&amp;gt;&lt;br /&gt;
            &amp;lt;td&amp;gt;&lt;br /&gt;
               &amp;lt;xsl:value-of select=&amp;quot;descendant::firstName&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;/td&amp;gt;&lt;br /&gt;
            &amp;lt;td&amp;gt;&lt;br /&gt;
               &amp;lt;xsl:value-of select=&amp;quot;descendant::email&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;/td&amp;gt;&lt;br /&gt;
         &amp;lt;/xsl:for-each&amp;gt;&lt;br /&gt;
      &amp;lt;/tr&amp;gt;&lt;br /&gt;
   &amp;lt;/xsl:template&amp;gt;&lt;br /&gt;
&amp;lt;/xsl:stylesheet&amp;gt;&lt;br /&gt;
Output:&lt;br /&gt;
&amp;lt;html&amp;gt;&lt;br /&gt;
   &amp;lt;head&amp;gt;&lt;br /&gt;
      &amp;lt;meta http-equiv=&amp;quot;Content-Type&amp;quot; content=&amp;quot;text/html; charset=UTF-8&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;title&amp;gt;Employee Output&amp;lt;/title&amp;gt;&lt;br /&gt;
   &amp;lt;/head&amp;gt;&lt;br /&gt;
   &amp;lt;body&amp;gt;&lt;br /&gt;
      &amp;lt;table&amp;gt;&lt;br /&gt;
         &amp;lt;tr&amp;gt;&lt;br /&gt;
            &amp;lt;th&amp;gt;Number&amp;lt;/th&amp;gt;&lt;br /&gt;
            &amp;lt;th&amp;gt;Last Name&amp;lt;/th&amp;gt;&lt;br /&gt;
            &amp;lt;th&amp;gt;First Name&amp;lt;/th&amp;gt;&lt;br /&gt;
            &amp;lt;th&amp;gt;Email&amp;lt;/th&amp;gt;&lt;br /&gt;
         &amp;lt;/tr&amp;gt;&lt;br /&gt;
         &amp;lt;tr&amp;gt;&lt;br /&gt;
            &amp;lt;td&amp;gt;1&amp;lt;/td&amp;gt;&lt;br /&gt;
            &amp;lt;td&amp;gt;Smith&amp;lt;/td&amp;gt;&lt;br /&gt;
            &amp;lt;td&amp;gt;Joe&amp;lt;/td&amp;gt;&lt;br /&gt;
            &amp;lt;td&amp;gt;a@a.ru&amp;lt;/td&amp;gt;&lt;br /&gt;
         &amp;lt;/tr&amp;gt;&lt;br /&gt;
         &amp;lt;tr&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
      &amp;lt;/table&amp;gt;&lt;br /&gt;
   &amp;lt;/body&amp;gt;&lt;br /&gt;
&amp;lt;/html&amp;gt;&lt;br /&gt;
 &amp;lt;/source&amp;gt;&lt;/div&gt;</summary>
			</entry>

	</feed>