|
Subject: Re: [xsl] Re: Grouping by attribute From: Martin Honnen <Martin.Honnen@xxxxxx> Date: Wed, 21 Oct 2009 15:04:08 +0200 |
<par class="Bullet 6" xml:lang="hu">
Valami szoveg <inline style="color: #ff0000;">
Sima inline
</inline>
szoveg <inline style="color: #ff0000;">
inline break elott.
<linebreak/> inline break utan
</inline>
szoveg break elott <linebreak/>
szoveg break utan <inline style="color: #ff0000;">
inline bold elott <bold>
inline bold break elott <linebreak/>
inline bold break utan
</bold> inline bold utan
</inline> Sima szoveg.
</par>
Indenting is not too pretty but it can be seen that there are linebreaks in <par> in <par><inline> and in <par><inline><bold>
I need to break up this into :
<par class="Bullet 6" xml:lang="hu">
Valami szoveg <inline style="color: #ff0000;">
Sima inline
</inline>
szoveg <inline style="color: #ff0000;">
inline break elott. </inline>
</par>
<par class="Bullet 6" xml:lang="hu">
<inline style="color: #ff0000;"> inline break utan
</inline> szoveg break elott </par>
<par class="Bullet 6" xml:lang="hu">
szoveg break utan <inline style="color: #ff0000;">
inline bold elott <bold>
inline bold break elott </bold>
</inline>
</par>
<par class="Bullet 6" xml:lang="hu">
<inline style="color: #ff0000;">
<bold>
inline bold break utan
</bold> inline bold utan
</inline> Sima szoveg.
</par>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0" xmlns:xsd="http://www.w3.org/2001/XMLSchema" exclude-result-prefixes="xsd">
<xsl:template match="@*">
<xsl:copy/>
</xsl:template> <xsl:template match="node()">
<xsl:param name="cn"/>
<xsl:if test="descendant-or-self::node() intersect $cn">
<xsl:copy>
<xsl:apply-templates select="@*, node()">
<xsl:with-param name="cn" select="$cn"/>
</xsl:apply-templates>
</xsl:copy>
</xsl:if>
</xsl:template>Martin Honnen http://msmvps.com/blogs/martin_honnen/
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| RE: [xsl] Re: Grouping by attribute, Michael Kay | Thread | Re: [xsl] Re: Grouping by attribute, Lajos Joo |
| Re: [xsl] Filename encoding, Jesper Tverskov | Date | Re: [xsl] Filename encoding, Syd Bauman |
| Month |