[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: XSL Help
On 06/10/2010 12:33, chirag matkar wrote:
Your subject line isn't very distinctive given the subject of this mailing list, an it's quite hard to tell what transformation you are trying to do from your description.Hello , I have to tag the entities within text dot,comma,hyphen,semicolon,etc . How can i achieve this? -- Regards, Chirag Matkar please see the posting guidelines for the list. perhaps you want to put an element around punctuation characters turning <text>this, that; and the other!</text> into <text>this<punct>,</punct> that<punct>;</punct> and the other<punct>!</punct></text> If so, and you are using xslt 2 then <xsl:template match="text"> <xsl:analyze-substring select="." regexp="['.;!,]"> <xsl:matching-substring><punct><xsl:value-of select="."/></punct></xsl;matching-substring> <xsl:non-matching-substring><xsl:value-of select="."/></xsl:non-matching-substring> </xsl:analyze-string> </xsl:template> If that isn't what you meant, you'll need to ask again with a clearer question. David
This e-mail has been scanned for all viruses by Star. The service is powered by MessageLabs. ________________________________________________________________________
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|