Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

XSL for the XML

Status
Not open for further replies.

deepasona

Programmer
Apr 22, 2003
7
0
0
IN
hi,
I am new to this xsl ,xml..

I want to transform the XML to html using a XSL.

my xml is like as follows


<?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; ?>
<Invoice xmlns=&quot;xmlns:xsi=&quot;xsi:schemaLocation=&quot; invoice.xsd&quot;>
<Section>0.0.0.0</Section>
<Party AssociateType=&quot;C&quot;>
<AccountNo>postcust</AccountNo>
<AddressType>Billing Address</AddressType>
<Name>
<Name1>postpaid customer</Name1>
</Name>
;
;
;


My XSL is as follows

<?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; ?>
<xsl:stylesheet
xmlns:xsl=&quot; version=&quot;1.0&quot;>
<xsl:eek:utput method=&quot;html&quot; indent=&quot;yes&quot;/>
<xsl:template match=&quot;/&quot;>
<html>
<head>
<title>PPMS5.1.1</title>
</head>
<body bgcolor=&quot;#FFFFFF&quot; text=&quot;#000000&quot;>
<xsl:for-each select=&quot;Invoice&quot;>
<div id=&quot;Layer1&quot; style=&quot;position:absolute; width:200px; height:74px; z-index:1; left: 91px; top: 15px&quot;>
<table width=&quot;75%&quot; border=&quot;0&quot;>
<tr>
<td><xsl:value-of select=&quot;Party/Name/Name1&quot;/></td>
</tr>




Like the problem here is the


in my xml instead of

<Invoice xmlns=&quot;xmlns:xsi=&quot;xsi:schemaLocation=&quot; invoice.xsd&quot;>

if i give

<Invoice > the html gets properly generated.


How should be the xsl format to support the above thing

i tried this but not working
<xsl:stylesheet
xmlns:xsl=&quot;xmlns=&quot;xmlns:xsi=&quot;xsi:schemaLocation=&quot; invoice.xsd&quot;
version=&quot;1.0&quot;>



regards,
Deepa
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top