xsl-list
[Top] [All Lists]

RE: [xsl] [XSL]Display Different Results Based on Count ofNodeSets

2007-09-24 04:39:32
Please start again at the beginning. Few people are going to try to analyze
your previous messages to work out what you mean my "as described
previously" or "the one I posted earlier".

Just give us a source document, a stylesheet, the output you are getting,
and the output you want. Please make each of them complete, but brief: don't
post fragments, and don't refer back to previous postings.

Michael Kay
http://www.saxonica.com/ 

-----Original Message-----
From: Alice Ju-Hsuan Wei [mailto:ajwei(_at_)indiana(_dot_)edu] 
Sent: 24 September 2007 12:18
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: RE: [xsl] [XSL]Display Different Results Based on 
Count ofNodeSets

Hi,

   This is what I got for the output (I am actually using 
XSLT to transform into HTML, so the XML, as described 
previously, was that
input)

   The output, oddly, when I used <xsl:value of 
select="count(title)"/> instead of position() it produced 2 
and 1, respectively, but when the <xsl:apply-templates was 
inserted, it generates output of

   <div><p>Tennison, Jeni.</p>
   <p><i>Beginning XSLT</i>.</p>
    <p><i>Begining XSLT 2.0</i>.</p></div>

     <div><p>Meyer, Eric.</p>
     <p><i>The Zen of CSS</i>.</p>
      </div>

When I used the one I posted earlier:

<xsl:template match="title">
       <xsl:choose>
           <xsl:when test="position() ='1'"/>
           <xsl:otherwise>
               <p>
                   <xsl:apply-templates/>

               </p>
           </xsl:otherwise>
       </xsl:choose>
   </xsl:template>

It brings back the same input. However, I wanted the one on 
the first of the <title> to be something like:

     <div><p>Tennison, Jeni. <i>Beginning XSLT</i>.</p>
         <p><i>Begining XSLT 2.0</i>.</p></div>

      <div><p>Meyer, Eric. <i>The Zen of CSS.</i></p></div>


Is there some way I can do this?

Many thanks.

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>
--~--



--~------------------------------------------------------------------
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>
--~--