![]() |
| ||
| PLMXML to generic xml Hi I am new to xslt and i was trying to generate a generic xml from the plmxml. Following is the plmxml.xml file <?xml version="1.0" encoding="utf-8"?>------------------------------------------------------- And in the output i want <GXML> instead of <PLMXML> and <Item> instead of <Product> i.e my output xml should look like <GXML> <Item> </Item> </GXML> ------------------------------------------------------- and following is my xslt but all i get is an empty file <?xml version='1.0'?>and I am using msxsl Processor. Can somone please help me understand where am i going wrong? All i could understand is there is some issues with namespace. I will be obliged is someone can shed more light on that or can correct my xslt. Thanx in advance |
| ||
| Re: PLMXML to generic xml Hi, I am having 1 solution for you pls check if that work for you. Rewriting ur xml as below <PLMXML date="2008-12-02" time="15:33:22" author="Teamcenter V2007.1.3.20080417.00 - PLM@TCLICSRV(498908465)"> Rewriting your xslt as below; <?xml version='1.0'?> Output I get as below; <?xml version="1.0" encoding="UTF-8"?> ********* In above example if you want to display the values of <Product> element as text you can use <xsl:value-of select="@" />. Please check ********* I think your assumption for namespace is correct but that can be changed in xml as well as xslt. ********* Cheers, Mahesh :) |
| ||
| Re: PLMXML to generic xml Following is my new xsl and it am able to create the tags but i am not able to write the value of the newly created attributes....... <?xml version="1.0" encoding="utf-8"?> If you will see in the Product Template I am not able to get the value of the attribute "id" |
| ||
| Re: PLMXML to generic xml Hi, After some modifications you can get the attribute value.... only modified code is as below.... <xsl:template name="PLMXML"> ************ Output for for-each as below... <GXML> <Item id="id2"/> <Item id="id3"/> </GXML> ************ output without for-each as below <GXML> <Item id="id2"/> </GXML> ************ If that works please mark this thread as solved. Cheers, Mahesh :) |
| All times are GMT -4. The time now is 3:19 am. |
Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC