Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Differences between IIS5 and IIS6 affecting xsl:choose?

From: SeanB_au@-----------.---------.---
To: NULL
Date: 7/15/2008 6:49:00 PM

Hi all,

I'm still learning xsl, but was hoping someone here might be able to help. 
I've built an xsl:choose command as follows:

<xsl:choose>
  <xsl:when test="string(inm:SUMMARY)">
    <p><a onClick="toggle_rows('summary_{inm:RN}')" style="cursor:pointer; 
text-decoration:underline; font-size:11px">Click here to show/hide more 
information on this item</a></p>
      <div style="display:none; font:11px verdana, arial, sans-serif; 
margin:0; padding:6px; border:1px solid #33478E" 
id="summary_{inm:RN}"><b>Summary</b>
        <br /><xsl:value-of select="inm:SUMMARY" />
        <xsl:if test="string(inm:COPYRIGHT)">
          <br /><br /><xsl:value-of select="inm:COPYRIGHT" />
        </xsl:if>
		<xsl:if test="string(inm:LEGAL-DISCLAIMER)">
          <br /><br /><xsl:value-of select="inm:LEGAL-DISCLAIMER" />
        </xsl:if>
		<xsl:if test="string(inm:FSTA-COPYRIGHT-TITLE)">
          <br /><br /><xsl:value-of select="inm:FSTA-COPYRIGHT-TITLE" />
        </xsl:if>
		<xsl:if test="string(inm:ARTICLE-TITLE)">
        <br /><br /><a 
href="http://scholar.google.com.au/scholar?hl=en&lr=&q="{inm:ARTICLE-TITLE}"&btnG=Search" target="_blank">Search for this article on Google Scholar</a>
      </xsl:if>
	  <xsl:if test="string(inm:BOOK)">
			<br /><a 
href="http://scholar.google.com.au/scholar?hl=en&lr=&q="{inm:BOOK}"&btnG=Search" target="_blank">Search for this book on Google Scholar</a>
	  </xsl:if>
	  </div>
  </xsl:when>

  <xsl:when test="string(inm:TABLE-OF-CONTENTS)">
      <p><a onClick="toggle_rows('toc_{inm:RN}')" style="cursor:pointer; 
text-decoration:underline; font-size:11px">Click here to show/hide more 
information on this item</a></p>
        <div style="display:none; font:11px verdana, arial, sans-serif; 
margin:0; padding:6px; border:1px solid #33478E" id="toc_{inm:RN}"><b>Table 
of contents</b>
          <ul>
		    <xsl:for-each select="inm:TABLE-OF-CONTENTS">
              <li><xsl:value-of select="."/></li>
            </xsl:for-each>
		  </ul>
		  <xsl:if test="string(inm:COPYRIGHT)">
            <br /><br /><xsl:value-of select="inm:COPYRIGHT" />
          </xsl:if>
		  <xsl:if test="string(inm:LEGAL-DISCLAIMER)">
            <br /><br /><xsl:value-of select="inm:LEGAL-DISCLAIMER" />
          </xsl:if>
		  <xsl:if test="string(inm:FSTA-COPYRIGHT-TITLE)">
            <br /><br /><xsl:value-of select="inm:FSTA-COPYRIGHT-TITLE" />
          </xsl:if>
		  <xsl:if test="string(inm:BOOK)">
			<a 
href="http://scholar.google.com.au/scholar?hl=en&lr=&q="{inm:BOOK}"&btnG=Search" target="_blank">Search for this book on Google Scholar</a>
		  </xsl:if>
        </div>
  </xsl:when>

  <xsl:otherwise>
    <p style="font-size:11px">No further information available for this 
record.</p>
	<xsl:if test="string(inm:ARTICLE-TITLE)">
        <p style="font-size:11px"><a 
href="http://scholar.google.com.au/scholar?hl=en&lr=&q="{inm:ARTICLE-TITLE}"&btnG=Search" target="_blank">Search for this article on Google Scholar</a></p>
    </xsl:if>
	<xsl:if test="string(inm:BOOK)">
			<p style="font-size:11px"><a 
href="http://scholar.google.com.au/scholar?hl=en&lr=&q="{inm:BOOK}"&btnG=Search" target="_blank">Search for this book on Google Scholar</a></p>
		  </xsl:if>
  </xsl:otherwise>

</xsl:choose>

I originally developed this on my local WinXP Pro install, which was running 
IIS5, but when I put it on my Webserver, which is running IIS6 on Windows 
Server 2003 SP2, it always selects the <xsl:otherwise> option, even though 
both instances (i.e. WinXp and Server 2k3) are dealing with exactly the same 
xml data. The only difference I could determine after some thinking is WinXP 
Pro is running IIS5 and Server 2k3 is running IIS6 and something might have 
changed between versions? I've tried the pages in Firefox 2, IE6 and IE7, and 
all have the same problem. I'm sure my arguments must be working, as the 
xsl:if in the xsl:otherwise tags are applying themselves selectively 
according to what I've programmed. Any help would be greatly appreciated!

Thanks!


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent