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(_at_)yahoo(_dot_)fr]
Sent: 02 August 2007 16:42
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
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
--~------------------------------------------------------------------
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>
--~--