![]() |
![]() | ![]() | ![]() | Altova Mailing List Archives>Archive Index >microsoft.public.xsl Archive Home >Recent entries [Thread Prev] >Thread Next - Re: Transform help required Transform help requiredTo: NULL Date: 6/1/2008 8:37:00 AM
Can someone help me with the XSL to transform my XML document. The input
document's Record element can contain any number of paired Name[N] &
Value[N] elements where N starts at 1 and is incremented by 1 for each
subsequent pair of elements.
Input:
<Records>
<Record>
<Id>1</Id>
<Name1>SomeName10</Name1>
<Value1>SomeValue15</Value1>
<Name2>SomeName20</Name2>
<Value2>SomeValue25</Value2>
</Record>
<Record>
<Id>2</Id>
...
</Record>
</Records>
Output:
<MyRecords>
<MyRecord>
<Id>1</Id>
<Items>
<Item name="SomeName10" value="SomeValue15"/>
<Item name="SomeName20" value="SomeValue25"/>
</Items>
</MyRecord>
<MyRecord>
<Id>2</Id>
...etc
</MyRecord>
</MyRecords>
| ![]() | ![]() | ![]() |
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | |||||
|
