Subject: RE: [xsl] Split element with mixed content From: "Kevin Bird" <kevin.bird@xxxxxxxxxxxxxxxxxxxxxxx> Date: Thu, 2 Aug 2007 16:56:22 +0100 |
Input ----- <root> <p>The quick <b>brown</b> fox jumped over the lazy dog.</p> </root> Stylesheet ---------- <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0"> <xsl:output method="xml" indent="yes"/> <xsl:strip-space elements="*"/> <xsl:template match="root"> <root> <xsl:analyze-string select="p" regex="over .*"> <xsl:matching-substring> <p> <xsl:copy-of select="."/> </p> </xsl:matching-substring> <xsl:non-matching-substring> <p> <xsl:copy-of select="."/> </p> </xsl:non-matching-substring> </xsl:analyze-string> </root> </xsl:template> </xsl:stylesheet> Output ------ <root> <p>The quick brown fox jumped </p> <p>over the lazy dog.</p> </root> Kind regards. -- Kevin Bird Matrix > -----Original Message----- > From: Florent Georges [mailto:darkman_spam@xxxxxxxx] > Sent: 02 August 2007 16:42 > To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx > Subject: Re: [xsl] Split element with mixed content > > Kevin Bird wrote: > > Hi > > > Using analyze-string and tokenize only gives me the string value of > > the <b> element. Am I missing something very obvious? > > What did you try so far? > > Regards, > > --drkm > > > > > > > > > > > > > > > > > > > > > > > > _______________________________________________________________________ > ______ > Ne gardez plus qu'une seule adresse mail ! Copiez vos mails vers Yahoo! > Mail
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Split element with mixed , Florent Georges | Thread | RE: [xsl] Split element with mixed , Michael Kay |
Re: [xsl] Split element with mixed , Florent Georges | Date | [xsl] RE: Troubling passing paramet, Jessica Hennessey |
Month |