[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Proper way to use XSL for HTML output?

Subject: Proper way to use XSL for HTML output?
From: "Kevin Duffey" <kevin.duffey@xxxxxxxx>
Date: Mon, 5 Feb 2001 01:58:22 -0800
use xsl in html
Hi there,

I am curious what others are doing when creating XSL pages to transform
dynamic XML (via JSP output of well-formed tags) into HTML. I simply do
something like this:

<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<xsl:template match="page">
  <html><head></head>
    <body>
      <div align="center">
        <xsl:for-each select="menu/link">
          <a>
            <xsl:attribute name="href">
              <xsl:value-of select="@href"/>
            </xsl:attribute>
            <xsl:attribute name="target">
              <xsl:value-of select="@target"/>
            </xsl:attribute>
            <xsl:value-of select="@name"/></a>&#160;&#160;
          </xsl:for-each>
      </div>
    </body>
  </html>
</xsl:template>

</xsl:stylesheet>




If I want to add more in between the <body></body>, I just do it right down
the list, as if I was doing normal HTML. I originally tried the "template"
format, where you call various templates in the main template, then define
each of those templates at the bottom of the page. I don't know which way is
best though. The way I am doing it now seems more like how HTML is usually
done (manually anyways). Is there a proper way, a "standard" way, or just do
it how I want as long as it works?

Thanks.


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.