[XSL-LIST Mailing List Archive Home]
[By Thread]
[By Date]
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.)
At 03:05 AM 8/2/01, you wrote:
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
RE: [xsl] fixed position
Subject: RE: [xsl] fixed position From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx> Date: Thu, 02 Aug 2001 11:24:24 -0400 |
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: [xsl] 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 |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] fixed position, Meltem Kogelbauer | Thread | [xsl] Ancestors and Imported docs, Eric Schenfeld |
RE: [xsl] FOP table formatting prob, Seaborne, Mark | Date | RE: [xsl] correction: how to get ne, Michael Kay |
Month |
Keywords