xsl-list
[Top] [All Lists]

Re: Revision Marking in HTML

2005-05-02 11:25:37

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




--~------------------------------------------------------------------
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>
--~--



<Prev in Thread] Current Thread [Next in Thread>