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

RE: fixed position

Subject: RE: fixed position
From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx>
Date: Thu, 02 Aug 2001 11:24:24 -0400
fixed position
Meltem,

I think you'll find that Jim's latest is the neatest solution, and should work fine.

Note that his observation that your original problem is somewhat underspecified is also correct, so you may have to make allowances for that if your input data is not always exactly what you expect. (You could validate ahead of time to prevent this -- note that DTD validation won't do it, though XML-Schema might -- or even perform some exception-checking within your XSLT.)

Cheers,
Wendell

At 03:05 AM 8/2/01, you wrote:
Thanks for the replies. I will try them all. I will give you an update later
today on that.

Meltem

-----Original Message-----
From: James Melton [mailto:james.melton@xxxxxxxxxxx]
Sent: Wednesday, August 01, 2001 9:57 PM
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: Re:  fixed position


Oops as always I have missed something. The first example does not work in every case. Instead try:

<xsl:template match="/">
    <xsl:for-each select="data/item[text() != 'Solution']">
        <xsl:value-of select="." />
        <xsl:text> </xsl:text>
        <xsl:if test="position() = 3">
            <xsl:text>Solution </xsl:text>
        </xsl:if>
    </xsl:for-each>
</xsl:template>


======================================================================
Wendell Piez                            mailto:wapiez@xxxxxxxxxxxxxxxx
Mulberry Technologies, Inc.                http://www.mulberrytech.com
17 West Jefferson Street                    Direct Phone: 301/315-9635
Suite 207                                          Phone: 301/315-9631
Rockville, MD  20850                                 Fax: 301/315-8285
----------------------------------------------------------------------
  Mulberry Technologies: A Consultancy Specializing in SGML and XML
======================================================================


XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list



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.