This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

How do I keep the text seperate?


Hi all,

I have a source xml like the following:

<?xml version="1.0" encoding="utf-8"?>
<book>
   <preface>
      <title>
      </title>

      <eid>EMP111111111</eid>

      <benefitType>MED</benefitType>

      <state>XX</state>

      <carrierName>Employee Benefit Plan</carrierName>

      <planCode>0001</planCode>
   </preface>

   <chapter>
      <title>
      <anchor id="Heading7" />

      ELIGIBILITY, FUNDING, EFFECTIVE DATE AND TERMINATION
PROVISIONS</title>



         <section name="S02.01">
            <title>
            <anchor id="Heading22" />

            Eligible Classes of Dependents.</title>

            <text name="P02.01.01">
               <details>A Dependent is any one of the following persons:
&lt;R03&gt;
               <emphasis role="bold">(&lt;N03&gt;1&lt;\N03&gt;)</emphasis>

               A covered Employee's Spouse and unmarried children from birth
to the 			   limiting age of &lt;000I&gt;19&lt;\000I&gt; years. The
Dependent children 				must be primarily dependent upon the covered Employee
for support and 				maintenance. These persons are excluded as Dependents:
other individuals 			living in the covered Employee's home, but who are not
eligible as 				defined; the legally separated or divorced former Spouse of
the Employee; 			any person who is on active duty in any military service of
any country; 			or any person who is covered under the Plan as an Employee.
               <KeywordsAdd>
                  <emphasis role="bold">Dependent, Dependents, Child,
Children</emphasis>
               </KeywordsAdd>

               <CategoryAdd>
                  <emphasis
role="bold">CAT135,CAT452,CAT532,CAT444</emphasis>
               </CategoryAdd>
               </details>

               <allAtr>
                  <path>
EMP111111111/1111111110001MEDXX/dCOC1111111110001MEDXX/S02/S02.01/P02.01.01<
/path>

                  <category>
                  </category>

                  <title>Dependents</title>

                  <displayableName>Dependents</displayableName>

                  <keywords>dependent, eligibility</keywords>

                  <iconLarge>
                  </iconLarge>

                  <benefitType>
                  </benefitType>

                  <WebTemplate>
                  </WebTemplate>

                  <pageTitle>
                  </pageTitle>

                  <tableTitle>Dependents</tableTitle>

                  <redirectURL>
                  </redirectURL>

                  <feedSource>
                  </feedSource>

                  <carrierName>
                  </carrierName>
               </allAtr>
            </text>
      </section>
   </chapter>
</book>


How do I get the <KeywordsAdd> and <KeywordsAdd> from the <details> node and
then concat that with <category> and <keywords> of <allAtr>?

Please help....

The resulting xml would be:

<?xml version="1.0" encoding="utf-8"?>
<book>
   <preface>
      <title>
      </title>

      <eid>EMP111111111</eid>

      <benefitType>MED</benefitType>

      <state>XX</state>

      <carrierName>Employee Benefit Plan</carrierName>

      <planCode>0001</planCode>
   </preface>

   <chapter>
      <title>
      <anchor id="Heading7" />

      ELIGIBILITY, FUNDING, EFFECTIVE DATE AND TERMINATION
PROVISIONS</title>



         <section name="S02.01">
            <title>
            <anchor id="Heading22" />

            Eligible Classes of Dependents.</title>

            <text name="P02.01.01">
               <details>A Dependent is any one of the following persons:
&lt;R03&gt;
               <emphasis role="bold">(&lt;N03&gt;1&lt;\N03&gt;)</emphasis>

               A covered Employee's Spouse and unmarried children from birth
to the limiting age of &lt;000I&gt;19&lt;\000I&gt; years. The Dependent
children must be primarily dependent upon the covered Employee for support
and maintenance. These persons are excluded as Dependents: other individuals
living in the covered Employee's home, but who are not eligible as defined;
the legally separated or divorced former Spouse of the Employee; any person
who is on active duty in any military service of any country; or any person
who is covered under the Plan as an Employee.
               <KeywordsAdd>
                  <emphasis role="bold"></emphasis>
               </KeywordsAdd>

               <CategoryAdd>
                  <emphasis role="bold"></emphasis>
               </CategoryAdd>
               </details>

               <allAtr>

<path>EMP111111111/1111111110001MEDXX/dCOC1111111110001MEDXX/S02/S02.01/P02.
01.01</path>

                  <category>CAT135,CAT452,CAT532,CAT444</category>

                  <title>Dependents</title>

                  <displayableName>Dependents</displayableName>

                  <keywords>dependent, eligibility, Dependent, Dependents,
Child, Children </keywords>

                  <iconLarge>
                  </iconLarge>

                  <benefitType>
                  </benefitType>

                  <WebTemplate>
                  </WebTemplate>

                  <pageTitle>
                  </pageTitle>

                  <tableTitle>Dependents</tableTitle>

                  <redirectURL>
                  </redirectURL>

                  <feedSource>
                  </feedSource>

                  <carrierName>
                  </carrierName>
               </allAtr>
            </text>
      </section>
   </chapter>
</book>




 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]