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

Re: Trouble With Multiple File Outputs Based on Letter

Subject: Re: Trouble With Multiple File Outputs Based on Letter
From: "J.Pietschmann" <j3322ptm@xxxxxxxx>
Date: Thu, 16 May 2002 22:39:02 +0200
Re:  Trouble With Multiple File Outputs Based on Letter
PHP User wrote:
Currently I am running it through XT, but that's not a necessity, so I can switch processors.

You should do this, your style sheet contains numerous syntax errors which apparently XT, being somewhat outdated, doesn't care about. Be aware that you are using a XT extension, other processors may have a slightly different syntax or no such extension at all (Xalan and Saxon have).

<xsl:variable name="initTitle" select="substring(//did/unittitle/title,'1','1')" />
                                                ^^^^^^^^^^^^^^
Here appearss to be your problem: the first argument to
the substring function is the node set of all the title
elements in the document, the substring will only take
the first, therefore the initTitle variable has always
the same value (probably an 'A')


Furthermore:
                 <xsl:call-template name="page">
		    <xsl:value-of select="$sTitle" />
		 </xsl:call-template>

That's several syntax errors rolled into one line.


<xsl:for-each select=".">

That's a no-op. Just omit it.


          <xsl:param name="lett" select="$lett" />
          <xsl:param name="sTitle" select="$Title" />

Also syntax errors.


Probably you need

<xsl:template name="page">
  <html>
    <head><title>The Letter <xsl:value-of select="." /></title></head>
    <body>
      <xsl:variable name="lett_case_mod" select="translate(.,'abcdef...','ABCDEF...')" />
      <xsl:for-each select="//did/unittitle[
        translate(substring(title,1,1),'abcdef...','ABCDEF...')=$lett_case_mod]">
        <h1><xsl:value-of select="title" /></h1>
        <xsl:call-template name="showbox"/>
      </xsl:for-each>
    </body>
  </html>
</xsl:template>

J.Pietschmann




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.