Viewing .xsl files as html

Hi all

I’ve just started working with xslt and everything seems ok when I create xsl files in work using dreamweaver then press f12 to view the rendered html output, but now that I’m at home on my mac without dreamweaver using netbeans I have no idea how to view/preview my xsl files as html?

Do i need to download some software or is this a simply solution?

Many thanks, Barry

What’s the file extension of those files? If .html, then just open them in your browser. (I’m not familiar with .xsl, so forgive me if that’s a dumb question, but web pages are best tested in a browser.)

thanks Ralph, the files are .xsl basically a stylesheet for xml output.
As I mention above, if I’m in DW and preview the below it converts to html very easy just wondering what I need to do so I can view in the browser on mac?

<?xml version="1.0" encoding="utf-8"?><!-- DWXMLSource="listing.xml" -->

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html" encoding="utf-8"/>
<xsl:template match="/">

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>default</title>
</head>

<body>

<div class="wrapper">

Thnaks

If you rename the file to .html you can then open it in your browser.

yes Ralph but nothing is rendered I’ve already tried this, thanks

Is there any content in the file, though? There isn’t any in what you posted above, though I realize it’s incomplete.

That was just a small snippet Ralph to show you,
here is the full file I’m trying to view which is styling listing.xml

<?xml version="1.0" encoding="utf-8"?><!-- DWXMLSource="listing.xml" -->
<!DOCTYPE xsl:stylesheet  [
	<!ENTITY nbsp   "&#160;">
	<!ENTITY copy   "&#169;">
	<!ENTITY reg    "&#174;">
	<!ENTITY trade  "&#8482;">
	<!ENTITY mdash  "&#8212;">
	<!ENTITY ldquo  "&#8220;">
	<!ENTITY rdquo  "&#8221;">
	<!ENTITY pound  "&#163;">
	<!ENTITY yen    "&#165;">
	<!ENTITY euro   "&#8364;">
]>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html" encoding="utf-8"/>
<xsl:template match="/">

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>default</title>
</head>

<body>

<div class="wrapper">
	
    <ul>
    <xsl:for-each select="tshirts/tshirt">
    <xsl:sort select="color"/>

    <xsl:if test="cost > 10">
	
    	<li>
        <xsl:value-of select="name"/>
        <br />
        <xsl:value-of select="cost"/>
        <br />
        <select>
        <xsl:for-each select="colors/color">
            <option>
            <xsl:value-of select="."/>
            </option>
        </xsl:for-each>
        </select>
        </li>

    </xsl:if>
    </xsl:for-each>
    </ul>

</div>


</body>
</html>

</xsl:template>
</xsl:stylesheet>

Cheers

I found a free XSLT engine which does what I need with some good examples.
If you haven’t got DW, and like me, need something to process your XSLT I suggest Marc Liyanage - Software - Mac OS X Packages

Barry