Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
XML
data.xmlanalysis
mappoint.webservice
msf
msxml-webrelease
netmyservices.sdk
passport.sdk
soap
soapsdk
uddi.general
uddi.programming
uddi.specification
xml
xmlsqlwebrelease
xsl
  
 
date: Tue, 15 Jul 2008 18:49:29 -0700,    group: microsoft.public.xsl        back       


Differences between IIS5 and IIS6 affecting xsl:choose?   
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!
date: Tue, 15 Jul 2008 18:49:29 -0700   author:   SeanB_au

RE: Differences between IIS5 and IIS6 affecting xsl:choose?   
Oops, scratch that - just worked out there was a variable on my development 
platform that wasn't set in my live system - the option was nested far, far 
away inside another file, and now that its been set, everything's fine.

Sorry for being a bother!

- SeanB_au
date: Wed, 16 Jul 2008 00:00:04 -0700   author:   SeanB_au

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us