[thelist] Data from DB in xsl

Stevenson Ngila Stevenson at epr.footman-walker.com
Thu Aug 29 10:14:01 CDT 2002


Hi guy,
i got the solution, see the code below::

<xsl:template name="paragrapher">
  <xsl:param name="sText"/>
  <xsl:choose>
    <xsl:when test="contains($sText, '&#xA;&#xA;')">
      <p>
        <xsl:value-of select="substring-before($sText, '&#xA;&#xA;')"/>
      </p>
	<xsl:call-template name="paragrapher">
        <xsl:with-param name="sText" select="substring-after($sText,
'&#xA;&#xA;')" />
      </xsl:call-template>
    </xsl:when>
    <xsl:otherwise>
      <p>
        <xsl:value-of select="$sText"/>
      </p>
    </xsl:otherwise>
  </xsl:choose>
</xsl:template>


-----Original Message-----
From: thelist-admin at lists.evolt.org
[mailto:thelist-admin at lists.evolt.org]On Behalf Of Gary Bland
Sent: 28 August 2002 19:42
To: thelist at lists.evolt.org
Subject: Re: [thelist] Data from DB in xsl


Stevenson Ngila wrote:
> I have an intranet which user add data ot it using form, and it's saved in
> the SQL 2000 DB. If the user put a paragraph in this form and saves it in
> the DB, how can this data be displayed using xml/xslt so that it appears
> exactly th way the user input it i.e. with paragraphs?
>
> Please assist!!

You would probably have to print it to page  inside a <pre></pre> tag.


--
Gary Bland
StarChaser Web Architecture
http://star-chaser.com
Building Tomorrow's World Today

--
For unsubscribe and other options, including
the Tip Harvester and archive of thelist go to:
http://lists.evolt.org Workers of the Web, evolt !





More information about the thelist mailing list