xsl-list
[Top] [All Lists]

Re: Isolate spezial text term with pattern

2005-07-25 14:55:01
Hello,

thanks for your answer.

That is nearly thats what i want. But i want only PB123.
With the function substring-after i get "PB123 Rest of the Comment".

Any solution ?

Greets Oliver

----- Original Message ----- From: "Jon Gorman" <jonathan(_dot_)gorman(_at_)gmail(_dot_)com>
To: <xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com>
Sent: Monday, July 25, 2005 4:29 PM
Subject: Re: [xsl] Isolate spezial text term with pattern


What i now what to do is the following: I will islote the terms "PB123" and "PB456" and so on in the hole document. Therefore i need a spezial pattern i think. The pattern is always the same: "PB" and then 3 or 4 numbers. I will
write this terms in an extra column in a HTML table.

Check out the XPath string functions http://www.w3.org/TR/xpath.  The
function substring-after seems to be what you're looking for.

Quick and dirty example (untested)

<xsl:template match="comment">
<td>PB<xsl:value-of select="substring-after(.,"PB")" /></td>
</xsl:template>


Jon Gorman

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--




--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



<Prev in Thread] Current Thread [Next in Thread>