Re: [xsl] Revision Marking in HTML

Subject: Re: [xsl] Revision Marking in HTML
From: Nadia.Swaby@xxxxxx
Date: Mon, 02 May 2005 14:25:37 -0400
Hi!

I think I found the solution all by my little self.

I changed the key to:

<xsl:key name="p"
match="node()[following-sibling::processing-instruction('xm-insertion_mark_end')]"

use="generate-id(preceding-sibling::processing-instruction('xm-insertion_mark_start')[1])"/>

and the "apply-templates" to:

<xsl:choose>
      <xsl:when test="text()[normalize-space()] and
processing-instruction('xm-insertion_mark_start')">
            <xsl:apply-templates
select="processing-instruction('xm-insertion_mark_start')[1]/preceding-sibling::node()"/>
            <xsl:for-each
select="processing-instruction('xm-insertion_mark_start')">
                  <span class="revcontrol">
                        <xsl:apply-templates
select="key('p',generate-id())"/>
                  </span>
                  <xsl:apply-templates
select="../processing-instruction('xm-insertion_mark_end')/following-sibling::node()"/>
            </xsl:for-each>
      </xsl:when>
      <xsl:when
test="child::processing-instruction('xm-insertion_mark_start')">
            <xsl:apply-templates
select="processing-instruction('xm-insertion_mark_start')[1]/preceding-sibling::node()"/>
            <xsl:for-each
select="processing-instruction('xm-insertion_mark_start')">
                  <div class="revcontrol">
                        <xsl:apply-templates
select="key('p',generate-id())"/>
                  </div>
                  <xsl:apply-templates
select="../processing-instruction('xm-insertion_mark_end')/following-sibling::node()"/>
            </xsl:for-each>
      </xsl:when>
      <xsl:otherwise>
            <xsl:apply-templates/>
      </xsl:otherwise>
</xsl:choose>

Anyone that can see any potential pitfalls to this solution, let me know.
Otherwise, I think it is good.

Hopefully, this is the last time I have to send a message to this list on
this subject.

Nadia Swaby

Current Thread