Это мой XML
<OB>
<AA>
<A>
<id>6ed0cfce-0762-4a0b-956e-5e160a5acc2a</id>
<title>Modernize </title>
<description>excellence.</description>
<createDate>2018-06-08T16:52:05.431Z</createDate>
<status>In Progress</status>
<type>c_o</type>
<parentTasks/>
<subTasks>
<id>7dd058ae-6dfb-4819-9b6e-c4e1d779525d</id>
<id>a6654ce9-31dd-402b-b9f3-de167c8b7e93</id>
<id>f9bb6595-085b-4090-8bb4-2222299f4779</id>
</subTasks>
</A>
<A>
<id>5895181c-ce0e-41e2-8368-e68d6d392f70</id>
<title> cloud</title>
<description>Customer Coast.</description>
<createDate>2018-06-08T16:52:53.602Z</createDate>
<status>In Progress</status>
<type>c_o</type>
<parentTasks/>
<subTasks>
<id>16cf2a87-cfc5-46ae-8fa2-19192623bcd7</id>
<id>977b8c86-dc47-435c-8274-5cfca5bffa9b</id>
<id>7a477025-84b2-4817-a4bd-94d4463c9b86</id>
</subTasks>
</A>
<A>
<id>9f385231-8252-4b6f-87d9-e506fcbd0dca</id>
<title>Cost </title>
<description> create</description>
<createDate>2018-06-08T16:50:59.510Z</createDate>
<status>In Progress</status>
<type>c_o</type>
<parentTasks/>
<subTasks>
<id>e31cacd8-aa07-4a5b-93d5-5086e7689588</id>
<id>64a42ff3-190c-43cb-9fa4-c1aa1b4fdf66</id>
</subTasks>
</A>
</AA>
<CC>
<C>
<id>f9bb6595-085b-4090-8bb4-2222299f4779</id>
<title>groups</title>
<description>create</description>
<createDate>2018-12-20T16:36:15.374Z</createDate>
<status>In Progress</status>
<type>a_o</type>
<outcomeId>6ed0cfce-0762-4a0b-956e-5e160a5acc2a</outcomeId>
<parentTasks>data</parentTasks>
<subTasks>
<id>7dd058ae-6dfb-4819-9b6e-c4e1d779525d</id>
</subTasks>
</C>
<C>
<id>c99ef3a5-398d-416b-8281-59d1b63ca8cd</id>
<title>Oracle)</title>
<description> create</description>
<createDate>2018-12-20T16:36:28.627Z</createDate>
<status>In Progress</status>
<type>a_o</type>
<outcomeId/>
<parentTasks/>
<subTasks/>
</C>
<C>
<id>21b8b637-09e4-4b33-9a97-9654ee0bd30f</id>
<title> posture</title>
<description>create</description>
<createDate>2018-12-20T16:36:02.415Z</createDate>
<status>In Progress</status>
<type>a_o</type>
<outcomeId/>
<parentTasks/>
<subTasks/>
</C>
</CC>
<BB>
<B>
<id>64a42ff3-190c-43cb-9fa4-c1aa1b4fdf66</id>
<title>reporting</title>
<description>reporting</description>
<createDate>2018-07-19T21:48:04.225Z</createDate>
<status>In Progress</status>
<type>s_i</type>
<outcomeId>9f385231-8252-4b6f-87d9-e506fcbd0dca</outcomeId>
<parentTasks>
<id>9f385231-8252-4b6f-87d9-e506fcbd0dca</id>
</parentTasks>
<subTasks>data</subTasks>
</B>
<B>
<id>977b8c86-dc47-435c-8274-5cfca5bffa9b</id>
<title>Education</title>
<description>create</description>
<createDate>2018-04-23T11:13:01.772Z</createDate>
<status>In Progress</status>
<type>s_i</type>
<outcomeId>5895181c-ce0e-41e2-8368-e68d6d392f70</outcomeId>
<parentTasks>
<id>5895181c-ce0e-41e2-8368-e68d6d392f70</id>
</parentTasks>
<subTasks>data</subTasks>
</B>
<B>
<id>7dd058ae-6dfb-4819-9b6e-c4e1d779525d</id>
<title>launch</title>
<description>create</description>
<createDate>2018-11-16T13:11:18.606Z</createDate>
<status>In Progress</status>
<type>s_i</type>
<outcomeId>6ed0cfce-0762-4a0b-956e-5e160a5acc2a</outcomeId>
<parentTasks>
<id>6ed0cfce-0762-4a0b-956e-5e160a5acc2a</id>
<id>f9bb6595-085b-4090-8bb4-2222299f4779</id>
</parentTasks>
<subTasks>data</subTasks>
</B>
<B>
<id>7a477025-84b2-4817-a4bd-94d4463c9b86</id>
<title>Improvements</title>
<description>create</description>
<createDate>2018-11-16T13:11:18.606Z</createDate>
<status>In Progress</status>
<type>s_i</type>
<outcomeId>5895181c-ce0e-41e2-8368-e68d6d392f70</outcomeId>
<parentTasks>
<id>5895181c-ce0e-41e2-8368-e68d6d392f70</id>
</parentTasks>
<subTasks>data</subTasks>
</B>
<B>
<id>16cf2a87-cfc5-46ae-8fa2-19192623bcd7</id>
<title> operations</title>
<description>create</description>
<createDate>2018-04-23T11:13:16.660Z</createDate>
<status>In Progress</status>
<type>s_i</type>
<outcomeId>5895181c-ce0e-41e2-8368-e68d6d392f70</outcomeId>
<parentTasks>
<id>5895181c-ce0e-41e2-8368-e68d6d392f70</id>
</parentTasks>
<subTasks>data</subTasks>
</B>
<B>
<id>f8a18296-254b-4400-9a55-ab3334aa682b</id>
<title>service</title>
<description>create</description>
<createDate>2019-01-11T20:51:22.057Z</createDate>
<status>In Progress</status>
<type>s_i</type>
<outcomeId/>
<parentTasks/>
<subTasks/>
</B>
<B>
<id>a6654ce9-31dd-402b-b9f3-de167c8b7e93</id>
<title>platform</title>
<description>create</description>
<createDate>2018-04-23T11:13:50.443Z</createDate>
<status>In Progress</status>
<type>s_i</type>
<outcomeId>6ed0cfce-0762-4a0b-956e-5e160a5acc2a</outcomeId>
<parentTasks>
<id>6ed0cfce-0762-4a0b-956e-5e160a5acc2a</id>
</parentTasks>
<subTasks>data</subTasks>
</B>
<B>
<id>e31cacd8-aa07-4a5b-93d5-5086e7689588</id>
<title> Instances</title>
<description>create</description>
<createDate>2018-04-23T11:14:08.007Z</createDate>
<status>In Progress</status>
<type>s_i</type>
<outcomeId>9f385231-8252-4b6f-87d9-e506fcbd0dca</outcomeId>
<parentTasks>
<id>9f385231-8252-4b6f-87d9-e506fcbd0dca</id>
</parentTasks>
<subTasks>data</subTasks>
</B>
</BB>
А это xslt
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format">
<xsl:template match="/">
<html><body><h3>OB</h3>
<p>
<h4>A</h4>
<xsl:for-each select="OB/AA/A">
<p>
<b><xsl:value-of select="position()" />.
<xsl:value-of select="title"/></b><br/>
Description:
<xsl:value-of select="description"/><br/>
CreateDate:
<xsl:value-of select="createDate"/><br/>
</p>
</xsl:for-each>
</p>
<p>
<h4>BBB</h4>
<xsl:for-each select="OB/CC/C">
<p>
<b><xsl:value-of select="position()" />.
<xsl:value-of select="title"/></b><br/>
Description:
<xsl:value-of select="description"/><br/>
CreateDate:
<xsl:value-of select="createDate"/><br/>
</p>
</xsl:for-each>
</p>
<p>
<h4>CCC</h4>
<xsl:for-each select="OB/BB/B">
<p>
<b><xsl:value-of select="position()" />.
<xsl:value-of select="title"/></b><br/>
Description:
<xsl:value-of select="description"/><br/>
CreateDate:
<xsl:value-of select="createDate"/><br/>
</p>
</xsl:for-each>
</p>
</body></html>
</xsl:template>
</xsl:stylesheet>
В первом цикле <xsl:for-each select="OB/AA/A">
я хочу зациклить subTasks
, получите значение id
, найдите это значение во всем документе и найдите соответствующие ему title
и type
.То же самое я хочу повторить и для других циклов.