Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 1 of 1
  1. #1
    New to the CF scene
    Join Date
    Aug 2012
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Multiple XSL Templates

    Hi,

    How do I insert multiple XSL templates? I currently have the below:
    Code:
    <?xml version="1.0" encoding="UTF-8"?>
    <!-- DWXMLSource="PO_Zone 11 SAPPI.xml" -->
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
        xmlns:fo="http://www.w3.org/1999/XSL/Format">
      <!--<xsl:include href="Initials_Dictionary.xsl"/>
      <xsl:include href="Globals_v1.1.xsl"/> -->
      
      <!-- Below template to keep adding rows if less than the page length -->
        <!--begin_: Define_The_Output_Loop -->
        <xsl:template name="add_lines">
            <xsl:param name="i"      />
            <xsl:param name="count"  />
            <!--begin_: Line_by_Line_Output -->
            <xsl:if test="$i &lt;= $count">
              <tr class="header">
                <td width="10%"><xsl:text disable-output-escaping="yes">&amp;nbsp;</xsl:text></td>
                <td colspan="3"  width="45%"><xsl:text disable-output-escaping="yes">&amp;nbsp;</xsl:text></td>
                <td width="15%"><xsl:text disable-output-escaping="yes">&amp;nbsp;</xsl:text></td>
                <td width="10%"><xsl:text disable-output-escaping="yes">&amp;nbsp;</xsl:text></td>
                <td width="10%"><xsl:text disable-output-escaping="yes">&amp;nbsp;</xsl:text></td>
                <td width="10%"><xsl:text disable-output-escaping="yes">&amp;nbsp;</xsl:text></td>
              </tr>
            </xsl:if>
            
            <!--begin_: RepeatTheLoopUntilFinished-->
            <xsl:if test="$i &lt;= $count">
              <xsl:call-template name="add_lines">
                <xsl:with-param name="i">
                  <xsl:value-of select="$i + 1"/>
                </xsl:with-param>
                <xsl:with-param name="count">
                  <xsl:value-of select="$count"/>
                </xsl:with-param>
              </xsl:call-template>
            </xsl:if>
        </xsl:template>
        
      <xsl:template match="/">
        <html xmlns="http://www.w3.org/1999/xhtml">
        <head>
        <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-2"/>
        <title></title>
        <style type="text/css">
    .....and the rest of the code


    I am using Adobe Dreamweaver CS6, as soon as I insert the 1st template (which all it does is adds rows) the Design view is lost, and as soon as I remove it, it comes back!

    Is there something I am doing wrong, like the syntax?

    Thanks.
    Last edited by Alex Vincent; 08-07-2012 at 06:59 PM. Reason: adding code tags


 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •