title: how to split a string based on a delimiter using XQuery
body: <p>I have this xml returned from sql :</p>
  
  <pre><code>&lt;Keywords&gt;
    &lt;Record CIMtrek_Keywords="Bus Dev|Ser Del|Sol Del|?" /&gt;
  &lt;/Keywords&gt;
  </code></pre>
  
  <p>and i want to put these values one by one in combo box, sample code is below which has got <code>Increase and Decrease</code> as value same way i would like to have <code>Bus Dev and Ser Del and Sol Del and ?</code> one by one</p>
  
  <pre><code>&lt;select size="1" style="width:60%;" name="CIMtrek_CI_CER_Type"
                                                  id="CIMtrek_CI_CER_Type"&gt;
                                                  &lt;option value="0"&gt;Select Fund Type&lt;/option&gt;
                                                  &lt;option value="Increase"&gt;
                                                      &lt;xsl:if test="//Record/CIMtrek_CI_CER_Type/text()='Increase'"&gt;
                                                          &lt;xsl:attribute name="selected"&gt;true&lt;/xsl:attribute&gt;
                                                      &lt;/xsl:if&gt;
                                                      Increase
                                                  &lt;/option&gt;
                                                  &lt;option value="Decrease"&gt;
                                                      &lt;xsl:if
                                                          test="//Record/CIMtrek_CI_CER_Type/text()='Decrease'"&gt;
                                                          &lt;xsl:attribute name="selected"&gt;true&lt;/xsl:attribute&gt;
                                                      &lt;/xsl:if&gt;
                                                      Decrease
                                                  &lt;/option&gt;
                                              &lt;/select&gt;
  </code></pre>
  
  <p>This is how i created combo box from the values which is in xml generated from SQL query  :</p>
  
  <pre><code>&lt;xsl:for-each select="//CIMtrek_CarrierName/Record"&gt;
                                                      &lt;option&gt;
                                                          &lt;xsl:if
                                                              test="//Record/CIMtrek_RegWhseCo_Carrier/text()=@CIMtrek_CarrierName"&gt;
                                                              &lt;xsl:attribute name="selected"&gt;true&lt;/xsl:attribute&gt;
                                                          &lt;/xsl:if&gt;
                                                          &lt;xsl:attribute name="value"&gt;&lt;xsl:value-of
                                                              select="@CIMtrek_CarrierName" /&gt;!@#$%^*!&lt;xsl:value-of
                                                              select="@Carrier_LateContacts" /&gt;!@#$%^*!&lt;xsl:value-of
                                                              select="@Carrier_Contacts1" /&gt;!@#$%^*!&lt;xsl:value-of
                                                              select="@Carrier_Contacts2" /&gt;!@#$%^*!&lt;xsl:value-of
                                                              select="@Carrier_Contacts3" /&gt;&lt;/xsl:attribute&gt;
                                                          &lt;xsl:value-of select="@CIMtrek_CarrierName" /&gt;
                                                      &lt;/option&gt;
                                                  &lt;/xsl:for-each&gt;
  </code></pre>
  
  <p>with BeniBela answer i am not able to put things in, like the above code, </p>
  
  <p>Hope BeniBela can help me to figure it out.</p>
  
  <p>How to do this,</p>
  
  <p>Please help me,</p>
  
  <p>Best Regards.</p>