xml editor

Supported platforms

Compatible with Windows7 & Mac OS X Snow Leopard

Ready for data server software
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

[xsl] blockQuotes to blockQuote p p


Subject: [xsl] blockQuotes to blockQuote p p
From: Jim_Albright@xxxxxxxxxxxx
Date: Sun, 4 May 2003 09:16:26 -0400

Here is final working code ... Thanks to all who helped.

<xsl:template match="blockQuotes"/>

<xsl:template match="blockQuotes[not(preceding-sibling::*[1][self::blockQuotes])]">
        <xsl:element name="blockQuote">
                <xsl:call-template name="lineGroupOrP"/>
                <xsl:apply-templates select="following-sibling::*[1][self::blockQuotes]" mode="blockQuotes"/>
        </xsl:element>
</xsl:template>

<xsl:template match="blockQuotes" mode="blockQuotes">
        <xsl:call-template name="lineGroupOrP"/>
        <!-- start recursion - - end when there is not -->
        <xsl:apply-templates select="following-sibling::*[1][self::blockQuotes]" mode="blockQuotes"/>
</xsl:template>

<xsl:template name="lineGroupOrP">
        <xsl:choose>
                <xsl:when test="child::paragraph-continuation">
                                <xsl:apply-templates select="child::paragraph-continuation"/>
                </xsl:when>
                <xsl:when test="child::lineGroup">
                        <xsl:apply-templates select="child::lineGroup"/>
                </xsl:when>
                <xsl:otherwise>
                        <xsl:element name="p">
                                <xsl:apply-templates/>
                        </xsl:element>
                </xsl:otherwise>
        </xsl:choose>
</xsl:template>

Jim Albright
704 843-0582
Wycliffe Bible Translators



 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list



Current Thread
XML Editor | XML Author | WYSIWYG Editors | Schema Editor | XSD Documentation | XSL/XSLT Editor | XQuery | XML Databases | SVN Client
© 2002-2011 SyncRO Soft Ltd. All rights reserved. | Sitemap | Privacy Policy | This website was created & generated with <oXygen/>®XML Editor