[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Revision Marking in HTML

Subject: Re: Revision Marking in HTML
From: Nadia.Swaby@xxxxxx
Date: Mon, 02 May 2005 14:25:37 -0400
Re:  Revision Marking in HTML
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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.