title: extract value in XSLT from different levels and separating them with ";"
body: <p>I have the following XML</p>
  
  <pre><code>&lt;bp&gt;
  &lt;bp_id&gt;319&lt;/bp_id&gt;
  &lt;bp_name&gt;HPP&lt;/bp_name&gt;
      &lt;contact&gt;
          &lt;id&gt;239764182&lt;/id&gt;
          &lt;first_name&gt;abc&lt;/first_name&gt;
          &lt;last_name&gt;def&lt;/last_name&gt;
          &lt;email&gt;
              &lt;id&gt;1234&lt;/id&gt;
              &lt;email_address&gt;xvxn@hddd.com&lt;/email_address&gt;
              &lt;is_primary&gt;true&lt;/is_primary&gt;
          &lt;/email&gt;
          &lt;phone&gt;
              &lt;id&gt;222&lt;/id&gt;
              &lt;phone_number&gt;773890814350&lt;/phone_number&gt;
              &lt;country_code&gt;1&lt;/country_code&gt;
              &lt;display_name&gt;17733338908150&lt;/display_name&gt;
              &lt;is_primary&gt;true&lt;/is_primary&gt;
              &lt;type_id&gt;1201&lt;/type_id&gt;
              &lt;type_code&gt;Office&lt;/type_code&gt;
          &lt;/phone&gt;
          &lt;bp_contact&gt;
              &lt;is_admin_user&gt;false&lt;/is_admin_user&gt;
              &lt;is_company_officer&gt;false&lt;/is_company_officer&gt;
              &lt;shared_contact_type_id&gt;3100&lt;/shared_contact_type_id&gt;
              &lt;shared_contact_type_description&gt;Direct Contact&lt;/shared_contact_type_description&gt;
              &lt;role&gt;
                  &lt;role_id&gt;8&lt;/role_id&gt;
                  &lt;role_name&gt;something&lt;/role_name&gt;
                  &lt;responsibility&gt;
                      &lt;responsibility_id&gt;3&lt;/responsibility_id&gt;
                      &lt;responsibility_name&gt;this &amp;amp; thats&lt;/responsibility_name&gt;
                      &lt;is_primary_contact&gt;false&lt;/is_primary_contact&gt;
                  &lt;/responsibility&gt;
                  &lt;assignment&gt;
                      &lt;id&gt;1507420&lt;/id&gt;
                      &lt;assignment_type_id&gt;2002&lt;/assignment_type_id&gt;
                      &lt;abc_ven_number&gt;4225506&lt;/abc_ven_number&gt;
                      &lt;department_id&gt;97&lt;/department_id&gt;
                      &lt;is_primary_contact&gt;false&lt;/is_primary_contact&gt;
                  &lt;/assignment&gt;
                  &lt;assignment&gt;
                      &lt;id&gt;552593&lt;/id&gt;
                      &lt;assignment_type_id&gt;2002&lt;/assignment_type_id&gt;
                      &lt;abc_ven_number&gt;1048993&lt;/abc_ven_number&gt;
                      &lt;department_id&gt;97&lt;/department_id&gt;
                      &lt;is_primary_contact&gt;false&lt;/is_primary_contact&gt;
                  &lt;/assignment&gt;
                  &lt;assignment&gt;
                      &lt;id&gt;1507391&lt;/id&gt;
                      &lt;assignment_type_id&gt;2002&lt;/assignment_type_id&gt;
                      &lt;abc_ven_number&gt;4225506&lt;/abc_ven_number&gt;
                      &lt;department_id&gt;2&lt;/department_id&gt;
                      &lt;is_primary_contact&gt;false&lt;/is_primary_contact&gt;
                  &lt;/assignment&gt;
                  &lt;assignment&gt;
                      &lt;id&gt;552551&lt;/id&gt;
                      &lt;assignment_type_id&gt;2002&lt;/assignment_type_id&gt;
                      &lt;abc_ven_number&gt;1048993&lt;/abc_ven_number&gt;
                      &lt;department_id&gt;2&lt;/department_id&gt;
                      &lt;is_primary_contact&gt;false&lt;/is_primary_contact&gt;
                  &lt;/assignment&gt;
              &lt;/role&gt;
              &lt;address&gt;
                  &lt;is_address_owner&gt;true&lt;/is_address_owner&gt;
                  &lt;id&gt;101227&lt;/id&gt;
                  &lt;line1&gt;4501 W 47th&lt;/line1&gt;
                  &lt;city&gt;Chicago&lt;/city&gt;
                  &lt;postal_code&gt;60632&lt;/postal_code&gt;
                  &lt;country_code&gt;US&lt;/country_code&gt;
                  &lt;country_name&gt;UNITED STATES&lt;/country_name&gt;
                  &lt;subdivision_code&gt;US-IL     &lt;/subdivision_code&gt;
                  &lt;subdivision_name&gt;Illinois&lt;/subdivision_name&gt;
                  &lt;validation_status&gt;0&lt;/validation_status&gt;
              &lt;/address&gt;
          &lt;/bp_contact&gt;
      &lt;/contact&gt;
      &lt;merch_planning_partnership_tier_id&gt;9801&lt;/merch_planning_partnership_tier_id&gt;
      &lt;merch_planning_partnership_tier_name&gt;Basic Partner&lt;/merch_planning_partnership_tier_name&gt;
  &lt;/bp&gt;
  </code></pre>
  
  <p>for the multiple values of abc_ven_number under assignment, I want all the values of abc_ven_number from all levels and they should be separated by semicolons.</p>
  
  <pre><code>4225506;1048993;4225506;1048993 -- like this.
  </code></pre>
  
  <p>Following is my XSLT</p>
  
  <pre><code>&lt;xsl:stylesheet version="1.0"         xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:fo="http://www.w3.org/1999/XSL/Format"     xmlns:ns="http://target.com/2012/03/01/canonical/BusinessPartner"&gt; 
  &lt;xsl:strip-space elements="*" /&gt;
   &lt;xsl:output method="text" version="1.0" encoding="UTF-8" indent="yes"/&gt;
  &lt;xsl:template match="/"&gt;bp_name,bp_id 
  &lt;xsl:for-each select="ns:bp_list/ns:bp"&gt;
  &lt;xsl:variable name="bp_name" select="normalize-space(ns:bp_name)" /&gt;
  &lt;xsl:value-of select="normalize-space(ns:contact/ns:bp_contact/ns:role/ns:assignment/ns:gms_vendor_number)"/&gt;
  &lt;xsl:text&gt;&amp;#xA;&lt;/xsl:text&gt;  
  &lt;/xsl:for-each&gt;&lt;/xsl:template&gt;
  &lt;/xsl:stylesheet&gt;
  </code></pre>
  
  <p>This way, I am getting just the first value. I tried using "." but I only want the abc_ven_number and not the other values in that level.</p>
  
  <p>Today is my first day of working on XSLT.</p>