posted 21 years ago
Hi Lasse,
Thanks for replying
Basically my problem is , i have an xml format through which i need to generate a text file using an Xsl. I also have fixed text format now i need xsl which can convert that xml into required text format using transformation engine.
Xml Format:-
-----------
<Template description="Vehsim" name="Vehsim" id="1" >
<Variable type="Tabular" description="MX_TOTAL_TABLE" name="MX_TOTAL_TABLE" id="5" maxSeriesSize="50" >
<Variable type="Simple" comments="" sourceName="CDM" modifiedTime="" argumentName="NULL" updatecount="1" description="Low Speed Threshhold for steering compliance to prevent numerical
instablily" source="" mappingtype="CDMField" name="*VLOW_STR_COMP(1)" semantics="SEMANTICS" id="12" maxSeriesSize="0" >
<Data id="1">987</Data>
</Variable>
<Variable type="Simple" comments="" sourceName="CDM" modifiedTime="" argumentName="NULL" updatecount="1" description="Low Speed Threshhold for steering compliance to prevent numerical
instablily" source="" mappingtype="CDMField" name="*VLOW_STR_COMP(1)" semantics="SEMANTICS" id="12" maxSeriesSize="0" >
<Data id="1">123</Data>
</Variable>
<Variable type="Simple" comments="" sourceName="CDM" modifiedTime="" argumentName="NULL" updatecount="1" description="lookup table characterizing Front Steer Compliance" source="" mappingtype="CDMField" name="STEER_COMP_TABLE(1)" semantics="SEMANTICS" id="10" maxSeriesSize="0" >
<Data id="1">478</Data></Variable>
</Variable>
<Variable type="Simple" comments="" sourceName="CDM" modifiedTime="" argumentName="NULL" updatecount="1" description="Low Speed Threshhold for steering compliance to prevent numerical
instablily" source="" mappingtype="CDMField" name="*VLOW_STR_COMP(1)" semantics="SEMANTICS" id="12" maxSeriesSize="0" >
<Data id="1">987</Data></Variable>
<Variable type="Simple" comments="" sourceName="CDM" modifiedTime="" argumentName="NULL" updatecount="1" description="lookup table characterizing Front Steer Compliance" source="" mappingtype="CDMField" name="STEER_COMP_TABLE(1)" semantics="SEMANTICS" id="10" maxSeriesSize="0" >
<Data id="1">478</Data></Variable>
<Variable type="Simple" comments="" sourceName="CDM" modifiedTime="" argumentName="NULL" updatecount="1" description="lookup table characterizing Rear Steer Compliance" source="" mappingtype="CDMField" name="STEER_COMP_TABLE(2)" semantics="SEMANTICS" id="11" maxSeriesSize="0" >
<Data id="1">200</Data></Variable>
<Variable type="Tabular" description="STEER_COMP_TABLE" name="STEER_COMP_TABLE" id="2" maxSeriesSize="50" >
<Variable type="Complex" comments="dfgdfgh" sourceName="Y" modifiedTime="" argumentName="NULL" updatecount="1" description="Y Coordinate of Steer Comp table" source="" mappingtype="Compliance Fit" name="Y" semantics="com.gm.transform.ComplianceSheet" id="2" maxSeriesSize="0" >
<Data id="2">54</Data>
</Variable>
<Variable type="Complex" comments="" sourceName="VALUE" modifiedTime="" argumentName="STEERCOMP_X" updatecount="0" description="Steer Comp" source="" mappingtype="Fill" name="SteerComp_X" semantics="com.gm.transform.Fill" id="4" maxSeriesSize="0" >
<Data id="2">155</Data>
</Variable>
<Variable type="Simple" comments="" sourceName="CDM" modifiedTime="" argumentName="COEFFICIENT_B" updatecount="0" description="Aligning Torque Steer Model B Coefficient" source="" mappingtype="CDMField" name="CoefficientB" semantics="SEMANTICS" id="5" maxSeriesSize="0" >
<Data id="4">144</Data>
<Data id="3">122</Data>
</Variable>
</Variable>
</Template>
Now i need to read the values(only name) inside node Variable and the Data in data node.
and display in the fashion mentioned below:
Name of the variable Value
For ex: *VLOW_STR_COMP(1) 987
SteerComp_X 155
this data is shown as an demo of text file which comes from above Xml file.
Now i need Xsl which can do this.
Thanks in advance
Waiting for your quick reply.
thanks again
akshay