Click here to Skip to main content
15,899,679 members
Home / Discussions / XML / XSL
   

XML / XSL

 
Questionxsl formating Pin
AndieDu10-Sep-08 17:25
AndieDu10-Sep-08 17:25 
AnswerRe: xsl formating Pin
led mike11-Sep-08 4:58
led mike11-Sep-08 4:58 
GeneralRe: xsl formating Pin
AndieDu11-Sep-08 21:16
AndieDu11-Sep-08 21:16 
QuestionRead XML from VB.NET [modified] Pin
japel10-Sep-08 11:57
japel10-Sep-08 11:57 
AnswerRe: Read XML from VB.NET Pin
japel11-Sep-08 2:55
japel11-Sep-08 2:55 
QuestionSending Transformed XML as mail body Pin
brijbmishra9-Sep-08 6:46
brijbmishra9-Sep-08 6:46 
QuestionRe: Sending Transformed XML as mail body Pin
led mike9-Sep-08 9:06
led mike9-Sep-08 9:06 
QuestionRe: Sending Transformed XML as mail body Pin
brijbmishra9-Sep-08 9:17
brijbmishra9-Sep-08 9:17 
Yes, Actually I am working in Microsoft Dynamics NAV.
Here for using XML I can use 'Microsoft XML, v3.0'
and I have 1 xml, and 1 xsl given below
XSL:

<?xml version="1.0" encoding="ISO-8859-1" ?>
- <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
- <xsl:template match="/">
- <html>
<head />
- <body style="FONT-FAMILY: Tahoma;">
- <table border="0" width="100%">
- <!-- Main Table
-->
- <tr>
- <!-- The only row of main table
-->
- <!-- For Image
-->
- <table>
- <tr>
<img src="1.jpg" />
</tr>
</table>
<br />
- <!-- End For Image
-->
- <h3>
Dear
<xsl:value-of select="CUSTHTLVOUCHER/CUSTOMERNAME" />
</h3>
- <xsl:for-each select="CUSTHTLVOUCHER/TEXT">
- <table>
- <tr>
- <td style="FONT-SIZE: 10pt;">
- <p>
<xsl:value-of select="@LINE" />
</p>
</td>
</tr>
</table>
</xsl:for-each>
<br />
- <xsl:for-each select="CUSTHTLVOUCHER/HOTEL">
- <div style="BACKGROUND-COLOR: blue; WIDTH: 100%;">
- <table width="100%" style="BACKGROUND-COLOR: blue;">
- <tr>
- <td align="left" style="COLOR: white; FONT-WEIGHT: bold; FONT-SIZE: 10pt;">
<xsl:value-of select="LBL1" />
</td>
- <td align="right" style="COLOR: white; FONT-WEIGHT: bold; FONT-SIZE: 10pt;">
Booking Id :
<xsl:value-of select="BOOKINGID" />
</td>
</tr>
</table>
</div>
<br />
- <DIV align="center">
- <TABLE id="tblMain" style="Z-INDEX: 106; LEFT: 72px; POSITION: static; TOP: 352px" cellSpacing="0" cellPadding="0" width="80%" align="center" border="1" bordercolor="#0099ff">
- <TR>
- <TD style="FONT-SIZE: 12pt; FONT-WEIGHT: bold; COLOR: white; BACKGROUND-COLOR: #0099ff" colSpan="3" height="15">
- <DIV id="lblHotelName">
<xsl:value-of select="NAME" />
</DIV>
</TD>
</TR>
- <TR>
- <td colspan="3">
- <table width="100%" border="0">
<tr height="15" />
- <tr>
<td align="right">Check-In:</td>
- <td>
- <div id="lblCheckIn" style="FONT-WEIGHT: bold; FONT-SIZE: 10pt; COLOR: black">
<xsl:value-of select="CHECKINDATE" />
</div>
</td>
<td align="right">Check-Out:</td>
- <td>
- <div id="lblCheckOut" style="FONT-WEIGHT: bold; FONT-SIZE: 10pt; COLOR: black">
<xsl:value-of select="CHECKOUTDATE" />
</div>
</td>
<td align="right">Rooms:</td>
- <td>
- <div id="lblRooms" style="FONT-WEIGHT: bold; FONT-SIZE: 10pt; COLOR: black">
<xsl:value-of select="ROOMS" />
</div>
</td>
<td align="right">Guests:</td>
- <td>
- <div id="lblGuests" style="FONT-WEIGHT: bold; FONT-SIZE: 10pt; COLOR: black">
<xsl:value-of select="GUESTS" />
</div>
</td>
</tr>
- <tr>
<td />
- <td>
- <div id="lblCheckInTime" style="FONT-WEIGHT: bold; FONT-SIZE: 10pt; COLOR: black">
<xsl:value-of select="CHECKINTIME" />
</div>
</td>
<td />
- <td>
- <div id="lblCheckOutTime" style="FONT-WEIGHT: bold; FONT-SIZE: 10pt; COLOR: black">
<xsl:value-of select="CHECKOUTTIME" />
</div>
</td>
<td />
<td />
<td />
<td />
</tr>
- <tr>
<td />
<td />
<td />
<td />
- <td colspan="4">
<div id="lblRoomDetail" style="FONT-WEIGHT: bold; FONT-SIZE: 10pt; COLOR: black">Room 1:1 Adult, 0 Child</div>
</td>
</tr>
- <tr>
<td />
</tr>
</table>
</td>
</TR>
- <TR>
<td align="center" style="FONT-WEIGHT: bold">Room Options</td>
<td align="center" style="FONT-WEIGHT: bold">Inclusions</td>
<td align="center" style="FONT-WEIGHT: bold">Guest Name</td>
</TR>
- <TR>
- <td>
- <div id="lblRoomOptions" style="FONT-SIZE: 10pt;">
<xsl:value-of select="ROOMS" />
<xsl:value-of select="ROOMSOPS" />
</div>
</td>
- <td>
- <div id="lblInclusions" style="FONT-SIZE: 10pt;">
<xsl:value-of select="INCLUSIONS" />
</div>
</td>
- <td>
- <div id="lblHotelAddress" style="FONT-SIZE: 10pt;">
<xsl:value-of select="CLIENTNAME" />
<br />
</div>
</td>
</TR>
</TABLE>
</DIV>
<br />
</xsl:for-each>
- <!-- End of Hotel Tag Loop
-->
<br />
<br />
<br />
- <xsl:for-each select="CUSTHTLVOUCHER/FOOTERTEXT">
- <table>
- <tr>
- <td style="FONT-SIZE: 10pt;">
- <p>
<xsl:value-of select="@LINE" />
</p>
</td>
</tr>
</table>
</xsl:for-each>
- <!-- End of XSL
-->
</tr>
</table>
</body>
</html>
</xsl:template>
</xsl:stylesheet>

XML :

<?xml-stylesheet type="text/xsl" href="my.xsl"?>
<CUSTHTLVOUCHER><CUSTOMERNAME>Casa De </CUSTOMERNAME><TEXT LINE="some text."/><HOTEL><CLIENTNAME>MAX</CLIENTNAME><BOOKINGID>4398537</BOOKINGID><LBL1>1 Room(s) for 2 Night</LBL1><CHECKINDATE>04/18/08</CHECKINDATE><CHECKINTIME>12 pm</CHECKINTIME><CHECKOUTDATE>04/20/08</CHECKOUTDATE><CHECKOUTTIME>12 pm</CHECKOUTTIME><ROOMS>1</ROOMS><GUESTS>2</GUESTS><ROOMSOPS>Single</ROOMSOPS><INCLUSIONS>Breakfast#Two bottles of mineral water complimentary in room#Usage of Swiming Pool#</INCLUSIONS></HOTEL><TEXT LINE="The amount payable by MakeMyTrip for this booking is Rs. 8,930 including all taxes. Please email us at hotelpartner@makemytrip.com if there is any discrepancy in this payment amount."/><TEXT LINE="Line Text"/><FOOTERTEXT LINE="Sincerely,"/><FOOTERTEXT LINE="UR"/></CUSTHTLVOUCHER>

AND MY CODE IS


CREATE(xml);
CREATE(xsl);
CREATE(xmlOut);
xml.load('XML1.xml');
xsl.load('XSL1.xsl');
IF xsl.parseError.errorCode <> 0 THEN
MESSAGE('%1',xsl.parseError.reason);
xml.transformNodeToObject(xsl,xmlOut);
xmlOut.save('C:\Documents and Settings\Brij\Desktop\New Folder\mail.xml');

My requirement is to conver the XML using XSL to HTML so that
I can send that xml as mail
AnswerRe: Sending Transformed XML as mail body Pin
led mike9-Sep-08 9:24
led mike9-Sep-08 9:24 
GeneralRe: Sending Transformed XML as mail body Pin
Chris Maunderr10-Sep-08 0:29
Chris Maunderr10-Sep-08 0:29 
Questionxsd to xml Pin
amitsunnuu9-Sep-08 2:17
amitsunnuu9-Sep-08 2:17 
QuestionValidation of attributes in combination of other attributes? Pin
mav.northwind8-Sep-08 1:48
mav.northwind8-Sep-08 1:48 
AnswerRe: Validation of attributes in combination of other attributes? Pin
Erik Westermann12-Sep-08 10:29
professionalErik Westermann12-Sep-08 10:29 
GeneralRe: Validation of attributes in combination of other attributes? Pin
mav.northwind12-Sep-08 19:05
mav.northwind12-Sep-08 19:05 
Question&lt; symbols in <xsl:text xmlns:xsl="#unknown"></xsl:text> Pin
danielk_6-Sep-08 4:26
danielk_6-Sep-08 4:26 
AnswerRe: &lt; symbols in Pin
Saul Johnson6-Sep-08 10:43
Saul Johnson6-Sep-08 10:43 
AnswerRe: &lt; symbols in Pin
Michael Dunn9-Sep-08 12:43
sitebuilderMichael Dunn9-Sep-08 12:43 
AnswerRe: &lt; symbols in Pin
Erik Westermann10-Sep-08 4:17
professionalErik Westermann10-Sep-08 4:17 
QuestionNot Able to validate the MSXML Pin
Kuldeep Bhatnagar5-Sep-08 0:30
Kuldeep Bhatnagar5-Sep-08 0:30 
AnswerRe: Not Able to validate the MSXML Pin
Erik Westermann10-Sep-08 4:28
professionalErik Westermann10-Sep-08 4:28 
QuestionXML transform to SQL by XSL Pin
AndieDu4-Sep-08 16:18
AndieDu4-Sep-08 16:18 
AnswerRe: XML transform to SQL by XSL Pin
led mike5-Sep-08 4:57
led mike5-Sep-08 4:57 
GeneralRe: XML transform to SQL by XSL Pin
AndieDu7-Sep-08 13:47
AndieDu7-Sep-08 13:47 
GeneralRe: XML transform to SQL by XSL Pin
led mike8-Sep-08 5:02
led mike8-Sep-08 5:02 
GeneralRe: XML transform to SQL by XSL Pin
AndieDu8-Sep-08 13:38
AndieDu8-Sep-08 13:38 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.