Subject:Transform a XML file with simple type nodes to complex type nodes Author:Kalyani Yemche Date:05 Apr 2005 09:49 AM
Hi ,
I am trying to transform following file to a file with complex nodes.
The source file contains all the info in two simple records and I want it in a linked format.
For example, here for each header there may be many manufacturers linked with it,
for each manufacturer, there may be many product types and so on till individual items represented by <item> tags.
I am new to XSLT but still I tried a lot.Please do help me if any one can.
Subject:Transform a XML file with simple type nodes to complex type nodes Author:(Deleted User) Date:05 Apr 2005 11:24 AM
your tansformation is basically a grouping issue, you need to group on manufacture id
for the transformation.It is not very straight forward in XSLT 1, you need to create
a nodeset contains unique element first, then iterate on this nodeset to
do further transformation. It is much easier to do grouping in XSLT 2 using xsl:for-each-group.
Stylus Studio support both XSLT 1 and XSLT 2.
In the past, we have many people ask simmilar question in this forum, if you
search 'grouping' here, you will find some interesting thread that could help
you with your task.