You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Sylvain Wallez <sy...@anyware-tech.com> on 2001/06/11 13:29:06 UTC
Re: How to substring text from XML content ?
kokchoon@brel.com a écrit :
>
> hi,
>
> 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.
>
This is an XSL question you should better ask on the XSL mailing list at
http://www.mulberrytech.com/xsl/xsl-list/
Anyway, XSL provides a number string manipulation primitives such as
substring that can answer your need. See
http://www.w3.org/TR/xpath#section-String-Functions for a detailed list.
--
Sylvain Wallez
Anyware Technologies - http://www.anyware-tech.com
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>