You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by "Lewis, Andrew J" <An...@jbosc.ksc.nasa.gov> on 2002/02/05 20:40:20 UTC

A small bug in the sitemap....

I accidentally discovered that if you use a <map:select> with only an
<xsl:otherwise> and no <xsl:when> tags, the sitemap is generated with an
else but no if and therefore failes to compile. 

Ok, I admit that generally speaking if you only have an otherwise, why even
use a select. However, I happened to have all of the other conditions
commented out during development.

I'm sure this has been seen before, and I would consider it a very low
priority, but thought you might like to know...

This is on JDK 1.3.1 on Win NT 4, with Cocoon 2.0.1


      <map:select type="browser">
        <!--
        <map:when test="wap"> </map:when>
        <map:when test="explorer6"> </map:when>
        <map:when test="explorer5"> </map:when>
        <map:when test="explorer"> </map:when>
        <map:when test="mozilla5"> </map:when>
        -->
        <map:otherwise>
          <map:generate src="WEB-INF/profiles/anonymous.xml"/>
          <map:transform src="stylesheets/default-other.xsl"/>
          <map:serialize/>
        </map:otherwise>
      </map:select>


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


RE: A small bug in the sitemap....

Posted by Carsten Ziegeler <cz...@s-und-n.de>.
I fixed this problem. Now, it is possible to have only a map:otherwise.
But perhaps it's better to not allow this and throw an exception instead?

Carsten

> -----Original Message-----
> From: Lewis, Andrew J [mailto:Andrew.Lewis@jbosc.ksc.nasa.gov]
> Sent: Tuesday, February 05, 2002 8:40 PM
> To: 'cocoon-dev@xml.apache.org'
> Subject: A small bug in the sitemap....
> 
> 
> 
> I accidentally discovered that if you use a <map:select> with only an
> <xsl:otherwise> and no <xsl:when> tags, the sitemap is generated with an
> else but no if and therefore failes to compile. 
> 
> Ok, I admit that generally speaking if you only have an 
> otherwise, why even
> use a select. However, I happened to have all of the other conditions
> commented out during development.
> 
> I'm sure this has been seen before, and I would consider it a very low
> priority, but thought you might like to know...
> 
> This is on JDK 1.3.1 on Win NT 4, with Cocoon 2.0.1
> 
> 
>       <map:select type="browser">
>         <!--
>         <map:when test="wap"> </map:when>
>         <map:when test="explorer6"> </map:when>
>         <map:when test="explorer5"> </map:when>
>         <map:when test="explorer"> </map:when>
>         <map:when test="mozilla5"> </map:when>
>         -->
>         <map:otherwise>
>           <map:generate src="WEB-INF/profiles/anonymous.xml"/>
>           <map:transform src="stylesheets/default-other.xsl"/>
>           <map:serialize/>
>         </map:otherwise>
>       </map:select>
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
> For additional commands, email: cocoon-dev-help@xml.apache.org
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org