Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: [xsl] Revision Marking in HTML

From: Nadia.Swaby@------
To:
Date: 5/2/2005 6:26:00 PM
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


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent