This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Italicizing text, etc.


Charles Muller wrote:
> I am using XML/XSL to publish an on-line dictionary. By using <HTML> within
> the stylesheet I have been able to apply a certain amount of formatting to
> certain blocks of text. But I am wondering if it is possible, using XSL, to
> apply italics, bold, etc, to certain inline words within the dictionary
> entries that are marked up at <foreign>, etc.

See the XPath spec, in the String Functions section. contains(),
substring(), substring-before(), substring-after() will probably all be of
use to you. The use of a named template that recursively calls itself,
passing an ever-shrinking string and ever-growing result tree fragment to
itself with each iteration, may be needed to perform the actual
formatting, if the character data is not in a finite, predictable format.
Without seeing your data and knowing what formatting you want, it's hard
to offer a specific solution.

   - Mike
____________________________________________________________________
Mike J. Brown, software engineer at         My XML/XSL resources:
webb.net in Denver, Colorado, USA           http://www.skew.org/xml/


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]