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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

need your help again mrtom! 1

Status
Not open for further replies.

birney29

Programmer
Oct 11, 2001
140
GB
Ive got the following XSL code which works fine, but is this transforming? if not whats the diff between this and transforming. thanks for the help!
 
<?xml version='1.0'?>
<xsl:stylesheet xmlns:xsl=&quot;<xsl:template match=&quot;/&quot;>
<html>
<body>
<table border=&quot;2&quot; bgcolor=&quot;red&quot;>
<tr>
<th>Element</th>
<th>Attribute</th>
</tr>
<xsl:for-each select=&quot;page&quot;>
<tr>
<td><xsl:value-of select=&quot;text&quot;/></td>
<td><xsl:value-of select=&quot;@title&quot;/></td>
</tr>
</xsl:for-each>
</table>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
 
yeah, this is transforming. the transforming is in the grouping of your xml data into a new xml structure eg. html.
the difference between xsl and xslt is confusing. xslt was all rapped up in xsl in the early days then kinda moved out into it's own thing. the other part of xsl is xsl-fo (formatting objects).
i like to think of xsl as being xslt and xsl-fo together but this is probably wrong.
i've not used xsl-fo at all which is why i can't see the overlap in it. they are all just silly buzz words tho and as long as i can make xml turn into html or whatever i want i'm happy :)

also, unless you're really sure, you shouldn't really use <xsl:stylesheet xmlns:xsl=&quot;as your namespace. if you search for &quot;WD-xsl obsolete&quot; on google you'll see why. the xslt1.0 namespace is xmlns:xsl=&quot;
 
thanks, that helps a lot. one more question (sorry to bug you!) if (using the above code), i have transformed the data/file, should it not appear in the address bar as .html? forgive my ignorance. your help is much appriciated, so many people are arrogant and talk down to newbies but people like you are refreshing to talk to
 
i would say it's similar to a site with php or jsp. the url might have a .php or .jsp extension but what you get is html (not php) ie. the url points to the source document, but not necessarily the result.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top