[xsl] Assistance with recursion

Subject: [xsl] Assistance with recursion
From: Lynn Alford <lynn.alford@xxxxxxxxxx>
Date: Fri, 09 Sep 2005 15:43:39 +1000
Hi all,

I've been working toward taking one XML output and transforming it to a subset of the DocBook xml.

I've reached a point where my lack of understanding is likely to break what is already working. I'm fairly close to getting the output needed, but not quite there. Because of the length of the samples, I'll post links to the documents rather than send 2 very long and two medium documents straight to the list. The solution so far includes a first pass style sheet that transforms the xml partially into Docbook format and the second sheet which builds more structure into what was a flat structure.

Issues that I need help with:

Constructing a url that may consist of url part - which needs to be first if present but may not be present
<locator_url file_name="/courses/handbooks/2005/150_admission.html" host_name="www.jcu.edu.au" protocol="http"/>


and a bookmark part which needs to be prepended with a # but that should only happen when there is a bookmark part to follow
<locator_bookmark bookmark_name="title_31161"/>


also have the proper hyperlink text within the link rather than the link url.

It would be nice to recurse the lists so that instead of getting

      <orderedlist>
        <listitem>
          <para>This is a list</para>
        </listitem>
      </orderedlist>
      <orderedlist>
        <listitem>
          <para>Part 2 of list</para>
        </listitem>
      </orderedlist>

The outcome would be

      <orderedlist>
        <listitem>
          <para>This is a list</para>
        </listitem>
        <listitem>
          <para>Part 2 of list</para>
        </listitem>
      </orderedlist>

The complete files

http://homes.jcu.edu.au/~imla/xslt/flexion4multiStyles3.xml the original xml file
http://homes.jcu.edu.au/~imla/xslt/sheet1.xslt first transforming xslt sheet
http://homes.jcu.edu.au/~imla/xslt/sheet2.xslt second xslt
http://homes.jcu.edu.au/~imla/xslt/final_output.xml preferred outcome


navigate to all from http://homes.jcu.edu.au/~imla/xslt/

Lynn


Lynn Alford Tel (07) 47 81 6256 ITR Email: imla@xxxxxxxxxx JCU QLD 4811 Australia ICQ: 64096907 MSN: nicarra60@xxxxxxxxxxx Y!: nicarra60

Current Thread