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]
Other format: [Raw text]

RE: check if content value begins with some exact characters


Heppa,

> Any ideas about how to check if the element content begins, lets say
> with characters RE:? If it does not begin RE: -> add these characters
> in the beginning. If it does begin with these characters -> do 
> nothing, but insert the value of the element?

You can't "add these characters in the beginning", you can just output "RE:" followed by the the original string.

  <xsl:if test="not(starts-with(., 'RE:'))">RE:</xsl:if>
  <xsl:value-of select="." />

Cheers,

Santtu


 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]