This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

methods of inserting html into output?


This inquiry is more inline with constructing a FAQ, but I am sitting
here wondering about the various techniques one can use to insert
html in the output. So let me ask, "What are the various ways of
inserting html/css/javascript into the output? When would you use
each technique?" I seem to just write what I need an innovate when
it doesn't work. Now I would like a more thorough understanding.
This is what I come up with on first thought:

1) In-line literal elements into template body:
<xsl:template ...>
   <tag> ... </tag>
</xsl:template>

USE WHEN SIMPLICITY IS NEEDED

2) Wrap in CDATA section

<!--CDATA[
  <tag> ... </tag>
]]>

USE WHEN NEED TO PRESERVE INDENTATION IN OUTPUT?

3) <xsl:element> and <xsl:attribute>
   <xsl:element name="tag">
    <xsl:attribute name="attr" value="value"/>
   </xsl:element>

USE WHEN ?

4) <xsl:text>

USE WHEN?

5) <xsl:comment>

USE WHEN?

6), 7) ,8) ???

Can other add their advice?

_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]