xsl-list
[Top] [All Lists]

RE: [xsl] [XSL]Display Different Results Based on Count of Node Sets

2007-09-23 09:53:57
Hi,

Sorry for the confusion. This should be what I am trying to do (The list is supposed to be based on the name of the auhor and their books, and not based on the dimensions of the book titles:

The XML:

    <book>

    <author>Tennison, Jeni
    <title>Beginning XSLT</title>
   <title>Beginning XSLT 2.0</title>
   </author>

   <author>Meyer, Eric
 <title>The Zen of CSS</title>
  </author>

</book>


The XSLT:

 <xsl:template match="author">

  <xsl:variable name="value">
               <xsl:number count="title"/>
           </xsl:variable>
                      <xsl:choose>
               <xsl:when test="$value ='1'">
                   <xsl:value-of select="."/>
               </xsl:when>
               <xsl:otherwise>
                <p><xsl:value-of select="."/></p>
               </xsl:otherwise>
           </xsl:choose>
       </xsl:template>

The new segment of the XSLT I generated above does not seem to be generating the proper output. All of my titles still follow the rules under the <xsl:otherwise> rule.

Thanks to anyone of those who may be able to help.

Alice



--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--