This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: How to substring from XML content ?
- To: "'xsl-list at lists dot mulberrytech dot com'" <xsl-list at lists dot mulberrytech dot com>
- Subject: RE: [xsl] How to substring from XML content ?
- From: Rene de Vries <RdVries at PCL-HaGe dot nl>
- Date: Mon, 18 Jun 2001 13:53:29 +0200
- Organization: PCL HaGé b.v.
- Reply-To: xsl-list at lists dot mulberrytech dot com
Hi Kok,
<xsl:value-of select="substring(p, 0,1)"/>
should give you the "O"
<xsl:value-of select="substring(p, 1)"/>
should give you "verview"
Greetings Rene
{ @ @ }
^
\__/
"You don't need eyes to see, you need vision!"
-----Oorspronkelijk bericht-----
Van: kokchoon@brel.com [SMTP:kokchoon@brel.com]
Verzonden: vrijdag 15 juni 2001 13:14
Aan: XSL-List@lists.mulberrytech.com
Onderwerp: [xsl] How to substring from XML content ?
hi friends,
I am developing a system that generate xml from msword file, and than translate the xml with
xsl by using xalan. The msword content is something like this :
>
> ************** ms word example *************************
> Overview
>
> Try to do it better
> ....
> ...
> **************************************************
>
> so, when the doc be converted to xml, it will like this :
>
> <p id="1">Overview</p>
> <p id="2">Try to do it better</p>
> ......
> ......
>
> then, i need to write a xsl to translate with that xml and generate html...
> but the problem is i need to format the title "Overview" make it have a better look and feel,
> where the first char must be biger that other char... the html code is like <font
> size="3">O</font><font size="1">verview</font>. But how to make it posible when i use xsl ?
> the command <xsl:for-each><xsl:if test="@id='1'"><xsl:apply-templates
> select="p"/></xsl:if></xsl:for-each> will get the whole "Overview" word... so how to substring
> it so that i can display it which the font size i need ???
>
> Thank.
>
> >From Kok Choon.
>
--------------------------------------------------------
E-mail: kokchoon@brel.com
Date: 06/16/01
Time: 06:57:38
This message was sent by Z-Mail Pro - from NetManage
NetManage - delivers Standards Based IntraNet Solutions
--------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list