xsl-list
[Top] [All Lists]

[xsl] Dynamically ordering/displaying columns specified inside of xml

2006-05-31 10:43:05
Hi everyone, I'm kinda new to XSL and have a XML file that I'm looking to
transform to an HTML table via XSLT.   The problem lies in where the XML
file actually contains the instructions of which data columns to display
and in what order.  Below is my XML where the columns are listed in the
"/weather-report/report-format-column-list" and the actual data is in
"/weather-report/weather-details/weather-data-list".   The values in
<column> are the element/attribute names in the <weather-data> nodes.  I
have so ability to change the <report-format> node set but no the
<weather-details> node set.  Any help would be appreciated.

<weather-report>
      <report-format>
            <column-list>
                  <column order="1">location</column>
                  <column order="2">temperature</column>
                  <column order="3">cloud-coverage</column>
                  <column order="4">accumulation</column>
                  <column order="5">parcipitation-chance</column>
            </column-list>
      </report-format>
      <weather-details>
            <weather-data-list>
                  <weather-data location="SFO">
                        <clouds>
                              <cloud-coverage>0.80</cloud-coverage>
                              <altitude>10000</altitude>
                        </clouds>
                        <parcipitation>

<parcipitation-chance>0.25</parcipitation-chance>
                              <accumulation>0.0</parcipitation-chance>
                        </parcipitation>
                        <temperature>68</temperature>
                        <wind-mph>10 NNW</wind-mph>
                  </weather-data>
                  <weather-data location="DET">
                        <clouds>
                              <cloud-coverage>0.95</cloud-coverage>
                              <altitude>12000</altitude>
                        </clouds>
                        <parcipitation>

<parcipitation-chance>0.95</parcipitation-chance>
                              <accumulation>3.2</parcipitation-chance>
                        </parcipitation>
                        <temperature>57</temperature>
                        <wind-mph>1 E</wind-mph>
                  </weather-data>
            </column-list>
      <weather-details>
</weather-report>

Thanks,
Pete


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>
  • [xsl] Dynamically ordering/displaying columns specified inside of xml, PCWETZEL <=