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

RE: Display Different Results Based on Count of Node S

Subject: RE: Display Different Results Based on Count of Node Sets
From: XSL-List Owner <xsl-list-owner@xxxxxxxxxxxxxxxxxxxxxx>
Date: Sun, 23 Sep 2007 13:00:59 -0400
RE: Display Different Results Based on Count of Node 	S
It would be easier to answer your question if you provided a sample of the desired result document - in XML. (You have provided XML of the input and your XSLT, but only a narrative description of your intended output.)

-- Tommie


At 12:53 PM -0400 9/23/07, Alice Ju-Hsuan Wei wrote:
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


--

======================================================================
B. Tommie Usdin                        mailto:btusdin@xxxxxxxxxxxxxxxx
Mulberry Technologies, Inc.                http://www.mulberrytech.com
17 West Jefferson Street                           Phone: 301/315-9631
Suite 207                                    Direct Line: 301/315-9634
Rockville, MD  20850                                 Fax: 301/315-8285
----------------------------------------------------------------------
  Mulberry Technologies: A Consultancy Specializing in XML and SGML
======================================================================

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.