[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Advice for XSL development

Subject: Advice for XSL development
From: Pierre-Yves <pingou@xxxxxxxxxxxx>
Date: Fri, 24 Oct 2008 11:50:47 +0200
 Advice for XSL development
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

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.