title: Transform a HTML using XSL with XSLT1.0 in Siebel?
body: <p>I have a HTML like this below. I need to use XSLT 1.0 and remove the elements below a certain element in the following HTML based on the attribute value of a child element in one of the elements.</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"&gt;
   &lt;head&gt;
    &lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8"&gt;
   &lt;/head&gt;
   &lt;body lang="EN-US"&gt;
    &lt;div class="WordSection1"&gt;
     &lt;p class="MsoNormal"&gt;
      &lt;span style="font-size:11.0pt;font-family:&amp;quot;Calibri&amp;quot;,sans-serif"&gt;This is the document for ER Overview&lt;o:p/&gt;
      &lt;/span&gt;
     &lt;/p&gt;
     &lt;p class="MsoNormal"&gt;
      &lt;span style="font-size:11.0pt;font-family:&amp;quot;Calibri&amp;quot;,sans-serif"&gt;Test 1  &lt;o:p/&gt;
      &lt;/span&gt;
     &lt;/p&gt;  &lt;p class="MsoNormal"&gt;
      &lt;span style="font-size:11.0pt;font-family:&amp;quot;Calibri&amp;quot;,sans-serif"&gt;2&lt;o:p/&gt;
      &lt;/span&gt;
     &lt;/p&gt;  &lt;p class="MsoNormal"&gt;
      &lt;span style="font-size:11.0pt;font-family:&amp;quot;Calibri&amp;quot;,sans-serif;background:yellow;mso-highlight:yellow"&gt;3&lt;/span&gt;
      &lt;span style="font-size:11.0pt;font-family:&amp;quot;Calibri&amp;quot;,sans-serif"&gt;
       &lt;o:p/&gt;
      &lt;/span&gt;
     &lt;/p&gt;  &lt;p class="MsoNormal"&gt;
      &lt;span style="font-size:11.0pt;font-family:&amp;quot;Calibri&amp;quot;,sans-serif"&gt;4&lt;o:p/&gt;
      &lt;/span&gt;
     &lt;/p&gt;  &lt;p class="MsoNormal"&gt;
      &lt;span style="font-size:11.0pt;font-family:&amp;quot;Calibri&amp;quot;,sans-serif;background:lime;mso-highlight:lime"&gt;5&lt;/span&gt;
      &lt;span style="font-size:11.0pt;font-family:&amp;quot;Calibri&amp;quot;,sans-serif"&gt;
       &lt;o:p/&gt;
      &lt;/span&gt;
     &lt;/p&gt;  
     &lt;p class="MsoNormal"&gt;
      &lt;a name="_MailEndCompose"&gt;
       &lt;span style="font-size:11.0pt;font-family:&amp;quot;Calibri&amp;quot;,sans-serif"&gt;
        &lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;
       &lt;/span&gt;
      &lt;/a&gt;
     &lt;/p&gt;
     &lt;span style="mso-bookmark:_MailEndCompose"/&gt;
     &lt;div&gt;
      &lt;div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in"&gt;
       &lt;p class="MsoNormal"&gt;
        &lt;a name="_____replyseparator"/&gt;
        &lt;b&gt;
         &lt;span style="font-size:11.0pt;font-family:&amp;quot;Calibri&amp;quot;,sans-serif"&gt;From:&lt;/span&gt;
        &lt;/b&gt;
        &lt;span style="font-size:11.0pt;font-family:&amp;quot;Calibri&amp;quot;,sans-serif"&gt; AutoReply [mailto:reply@support.com]&lt;br&gt;
          &lt;b&gt;Sent:&lt;/b&gt; Thursday, March 2, 2017 6:50 PM&lt;br&gt;
           &lt;b&gt;To:&lt;/b&gt; Doe, John &amp;lt;johndoe@support.com&amp;gt;&lt;br&gt;
            &lt;b&gt;Subject:&lt;/b&gt; This is a test for routing rules&lt;o:p/&gt;
           &lt;/span&gt;
          &lt;/p&gt;
         &lt;/div&gt;
     &lt;/div&gt;
         &lt;p class="MsoNormal"&gt;
          &lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;
         &lt;/p&gt;
         &lt;table class="MsoNormalTable" border="0" cellspacing="0" cellpadding="0" width="500" style="width:375.0pt"&gt;
          &lt;tbody&gt;
           &lt;tr&gt;
            &lt;td style="padding:0in 0in 0in 0in"&gt;
             &lt;p class="MsoNormal"&gt;The contents of the note are included below.&lt;br&gt;
               &lt;br&gt;If reply includes an attachment/image, please go Transaction Center to view the file.&lt;br&gt;
                 &lt;br&gt;To add a Note, simply reply to the email.&lt;br&gt;Please do not edit the email subject.&lt;br&gt;
                    &lt;br&gt;The following note was posted by &lt;a href="mailto:johndoe@support.com"&gt;johndoe@support.com&lt;/a&gt;:&lt;o:p/&gt;
                    &lt;/p&gt;
            &lt;/td&gt;
           &lt;/tr&gt;
           &lt;tr&gt;
            &lt;td style="padding:0in 0in 0in 0in"&gt;
             &lt;p class="MsoNormal"&gt;_______________________________________________________________________&lt;br&gt;
               &lt;br&gt;
                &lt;o:p/&gt;
               &lt;/p&gt;&lt;p class="MsoNormal"&gt;
                &lt;span style="font-size:11.0pt;font-family:&amp;quot;Calibri&amp;quot;,sans-serif"&gt;Test 1&lt;/span&gt;
                &lt;o:p/&gt;
               &lt;/p&gt;&lt;p class="MsoNormal"&gt;
                &lt;span style="font-size:11.0pt;font-family:&amp;quot;Calibri&amp;quot;,sans-serif"&gt;2&lt;/span&gt;
                &lt;o:p/&gt;
               &lt;/p&gt;&lt;p class="MsoNormal"&gt;
                &lt;span style="font-size:11.0pt;font-family:&amp;quot;Calibri&amp;quot;,sans-serif;background:yellow;mso-highlight:yellow"&gt;3&lt;/span&gt;
                &lt;o:p/&gt;
               &lt;/p&gt;&lt;p class="MsoNormal"&gt;
                &lt;span style="font-size:11.0pt;font-family:&amp;quot;Calibri&amp;quot;,sans-serif"&gt;4&lt;/span&gt;
                &lt;o:p/&gt;
               &lt;/p&gt;&lt;p class="MsoNormal"&gt;
                &lt;span style="font-size:11.0pt;font-family:&amp;quot;Calibri&amp;quot;,sans-serif;background:lime;mso-highlight:lime"&gt;5&lt;/span&gt;
                &lt;o:p/&gt;
               &lt;/p&gt;&lt;p class="MsoNormal"&gt;
                &lt;span style="font-size:11.0pt;font-family:&amp;quot;Calibri&amp;quot;,sans-serif"&gt;&amp;nbsp;&lt;/span&gt;
                &lt;o:p/&gt;
               &lt;/p&gt;
               &lt;div&gt;
                &lt;div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in"&gt;
                 &lt;p class="MsoNormal"&gt;&amp;lt;a name=&amp;quot;&lt;o:p/&gt;
                 &lt;/p&gt;
                &lt;/div&gt;&lt;p class="MsoNormal"&gt;
                 &lt;br&gt;_______________________________________________________________________&lt;o:p/&gt;
                 &lt;/p&gt;
                &lt;/div&gt;
               &lt;/td&gt;
           &lt;/tr&gt;
           &lt;tr&gt;
            &lt;td style="padding:0in 0in 0in 0in"&gt;
             &lt;p class="MsoNormal"&gt;Technical Support.&lt;br&gt;
               &lt;br&gt;
                &lt;br&gt;****************** Internal Use Only ******************&lt;br&gt;To view this request in the CIS View, use the following URL:&lt;br&gt;
             &lt;/p&gt;
            &lt;/td&gt;
           &lt;/tr&gt;
          &lt;/tbody&gt;
         &lt;/table&gt;
         &lt;p class="MsoNormal"&gt;
          &lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;
         &lt;/p&gt;
         &lt;div class="MsoNormal" align="center" style="text-align:center"&gt;
          &lt;hr size="3" width="100%" align="center"&gt;
         &lt;/div&gt;
         &lt;p class="MsoNormal"&gt;
          &lt;span style="font-size:10.0pt;font-family:&amp;quot;Arial&amp;quot;,sans-serif;color:black"&gt;
           &lt;br&gt;Confidentiality Notice.&lt;br&gt;
         &lt;/p&gt;
    &lt;/div&gt;
   &lt;/body&gt;
  &lt;/html&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p><strong>I need to remove all the elements below the <code>&lt;p&gt;</code> tag that has the <code>&lt;a name="_MailEndCompose"&gt;</code> child. The output should be like the below HTML.</strong> </p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"&gt;
   &lt;head&gt;
    &lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8"&gt;
   &lt;/head&gt;
   &lt;body lang="EN-US"&gt;
    &lt;div class="WordSection1"&gt;
     &lt;p class="MsoNormal"&gt;
      &lt;span style="font-size:11.0pt;font-family:&amp;quot;Calibri&amp;quot;,sans-serif"&gt;This is the document for ER Overview&lt;o:p/&gt;
      &lt;/span&gt;
     &lt;/p&gt;
     &lt;p class="MsoNormal"&gt;
      &lt;span style="font-size:11.0pt;font-family:&amp;quot;Calibri&amp;quot;,sans-serif"&gt;Test 1  &lt;o:p/&gt;
      &lt;/span&gt;
     &lt;/p&gt;  &lt;p class="MsoNormal"&gt;
      &lt;span style="font-size:11.0pt;font-family:&amp;quot;Calibri&amp;quot;,sans-serif"&gt;2&lt;o:p/&gt;
      &lt;/span&gt;
     &lt;/p&gt;  &lt;p class="MsoNormal"&gt;
      &lt;span style="font-size:11.0pt;font-family:&amp;quot;Calibri&amp;quot;,sans-serif;background:yellow;mso-highlight:yellow"&gt;3&lt;/span&gt;
      &lt;span style="font-size:11.0pt;font-family:&amp;quot;Calibri&amp;quot;,sans-serif"&gt;
       &lt;o:p/&gt;
      &lt;/span&gt;
     &lt;/p&gt;  &lt;p class="MsoNormal"&gt;
      &lt;span style="font-size:11.0pt;font-family:&amp;quot;Calibri&amp;quot;,sans-serif"&gt;4&lt;o:p/&gt;
      &lt;/span&gt;
     &lt;/p&gt;  &lt;p class="MsoNormal"&gt;
      &lt;span style="font-size:11.0pt;font-family:&amp;quot;Calibri&amp;quot;,sans-serif;background:lime;mso-highlight:lime"&gt;5&lt;/span&gt;
      &lt;span style="font-size:11.0pt;font-family:&amp;quot;Calibri&amp;quot;,sans-serif"&gt;
       &lt;o:p/&gt;
      &lt;/span&gt;
     &lt;/p&gt;  
     &lt;p class="MsoNormal"&gt;
      &lt;a name="_MailEndCompose"&gt;
       &lt;span style="font-size:11.0pt;font-family:&amp;quot;Calibri&amp;quot;,sans-serif"&gt;
        &lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;
       &lt;/span&gt;
      &lt;/a&gt;
     &lt;/p&gt;
       &lt;/div&gt;
   &lt;/body&gt;
  &lt;/html&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>Really appreciate your help Gurus. Thank you all.</p>