Wrox Programmer Forums
Go Back   Wrox Programmer Forums > XML > XSLT
|
XSLT General questions and answers about XSLT. For issues strictly specific to the book XSLT 1.1 Programmers Reference, please post to that forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the XSLT section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 27th, 2010, 06:37 PM
Authorized User
 
Join Date: Jul 2010
Posts: 27
Thanks: 6
Thanked 0 Times in 0 Posts
Default Tranform to expect xml file

I have the XML source file that presents like this:
Code:
<process id='a001' name='proc111'>

  <laneset>
   <lane name='User111'/>
   <lane name='User222'/>
  </laneset>

  <startevent id='d001' name='startevent111'/>

  <gateway id='d002' name='gateway111'/>

</process>

  <process id='a002' name='proc222'>

  <laneset>
   <lane name='customer'/>
  </laneset>

  <endevent id='d003' name='endevent111'/>

</process>
-----------------------------------------------

i wanna tranform to XML target as following document:
-----------------
Code:
<svg>

<g id='a001' class='pools'>

  <g id='b001' class='pool' name='Proc111'>
        <g id='c001' class='lane' name='User111' PoolID='b001'>
           <g id='d001' class='startevent' name='startevent111' LaneID='c001'></g>
      </g>  
        <g id='c002' class='lane' name='User222' PoolID='b001'>
            <g id='d002' class='gateway' name='gateway111' LaneID='c001'></g>
      </g>
    </g>

     <g id='b002' class='pool' name='Proc222'>
       <g id='c003' class='lane' name=' customer ' PoolID=' b002'>
          <g id='d003' class='endevent' name='endevent111' LaneID='c003'>  </g>
      </g>
    </g>
</g>
</svg>
-----------------
Do I need create the recursive for g? I am still a newbie for XSLT.

Anybody help me? Thank a lot!





Similar Threads
Thread Thread Starter Forum Replies Last Post
Tranform to expect xml file metinhoclam XSLT 2 July 28th, 2010 01:01 PM
Split xml file with result document and javax.xml.transform.Transformer. nisargmca XSLT 3 January 12th, 2010 06:26 AM
Using XSLT to tranform XML into JSF pdimilla XSLT 4 July 3rd, 2009 03:50 AM
VB.net, adding XML data to an existing XML file saikoboarder XML 11 April 17th, 2008 04:19 PM
get error while tranform blank xml pradipkumar XSLT 4 November 20th, 2007 01:42 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.