xsl-list
[Top] [All Lists]

[xsl] Advice for XSL development

2008-10-24 05:51:25
Dear list,

I am looking for some help about my xsl.
There are the information from
http://www.mulberrytech.com/xsl/xsl-list/processor-version.xsl
> XSLT Processor Version
> XSL version: 1
> Vendor: Transformiix
> Vendor URL: http://www.mozilla.org/projects/xslt/
> Product name: [Undefined]
> Product version: [Undefined]
> Is schema-aware: [Undefined]
> Supports serialization: [Undefined]
> Supports backwards compatibility: [Undefined]

There is my question:
I would like to transform some XML to div that contains a list.

XML input:
--------------------------------------------------------------
<Simple>
  <OSE>
    <String articleName="Description">some blabla</String>
    <String articleName="Name">test1</String>
    <Integer articleName="Id">681</Integer>
    <String articleName="FactorValue">Value1</String>
  </OSE>
</Simple>
<Simple>
  <OSE>
    <String articleName="Description">some blabla</String>
    <String articleName="Name">test1</String>
    <Integer articleName="Id">682</Integer>
    <String articleName="FactorValue">Value2</String>
  </OSE>
</Simple>
<Simple>
  <OSE>
    <String articleName="Description">some blabla</String>
    <String articleName="Name">test2</String>
    <Integer articleName="Id">683</Integer>
    <String articleName="FactorValue">Value3</String>
  </OSE>
</Simple>
<Simple>
  <OSE>
    <String articleName="Description">some blabla</String>
    <String articleName="Name">test2</String>
    <Integer articleName="Id">684</Integer>
    <String articleName="FactorValue">Value4</String>
  </OSE>
</Simple>
--------------------------------------------------
Basically I would like to transform that to:
<table>

  <tr onclick="dosomething('test1')">
    <td>test1</td>
    <td>some blabla</td>
  </tr>
  <tr>
        <td>
          <table id="test1">
                <tr>
                <td>Value1</td>
                <td>681</td>
                </tr>
                <tr>
                <td>Value2</td>
                <td>682</td>
                </tr>
          </table>
        </td>
  </tr>

  <tr onclick="dosomething('test2')">
    <td>test2</td>
    <td>some blabla</td>
  </tr>
  <tr>
        <td>
          <table id="test2">
                <tr>
                <td>Value3</td>
                <td>683</td>
                </tr>
                <tr>
                <td>Value4</td>
                <td>684</td>
                </tr>
          </table>
        </td>
  </tr>

</table>
------------------------------------------------------

I know how to fit the String element but I am not sure how I can group the element by Name to generate the table.

Has anyone ever done something like this ?

Thanks in advance for your help,

Best regards,

Pierre


--~------------------------------------------------------------------
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>