[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: Split element with mixed content
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: 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
|
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
|