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

Re: XSLT program outputs a series of items, how to ins

Subject: Re: XSLT program outputs a series of items, how to insert newlines between each item?
From: "Graham Heath graham.heath@xxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Thu, 25 Jun 2020 14:35:22 -0000
Re:  XSLT program outputs a series of items
Hi Roger,

I always use a variable for CR and as Martin says an xsl:value-of.
I also pass a parameter in with OS so that CR gets either Windows or Linux
separators..

Hope this hells
Graham

On Thu, 25 Jun 2020 at 15:16, Martin Honnen martin.honnen@xxxxxx <
xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote:

>
> On 25.06.2020 15:11, Roger L Costello costello@xxxxxxxxx wrote:
> > Hi Folks,
> >
> > My XSLT program has a loop. Each iteration outputs an item. I want each
> item on a new line. The following works. Is there a better way to insert
> newlines than by using xsl:text with the end tag on the next line?  /Roger
> >
> > <xsl:output method="text" />
> >
> > <xsl:template match="/">
> >      <xsl:for-each select="//xs:simpleType[@name eq
> 'DatumCode']//xs:enumeration">
> >          <xsl:value-of select="concat(@value, ' (',
> xs:annotation/xs:documentation, ')')/>
> > <xsl:text>
> > </xsl:text>
> >      </xsl:for-each>
> > </xsl:template>
>
>
> I would use xsl:value-of separator
>
>
> <xsl:value-of select="//xs:simpleType[@name eq
> 'DatumCode']//xs:enumeration/concat(@value, ' (',
> xs:annotation/xs:documentation, ')')" separator="&#10;"/>

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.