Re: [xsl] Revision Marking in HTML

Subject: Re: [xsl] Revision Marking in HTML
From: David Carlisle <davidc@xxxxxxxxx>
Date: Tue, 3 May 2005 00:11:46 +0100
   > I tried David's method, and I found one instance in which is does not work.

   what's different about that instance? It looks just like the other cases
   your described with PIs at well balanced positions. The method will work
   for that case as well as far as I can see.


Ah I see Wendell's answered that for me. Nothing is different about that
instance: the method as decribed doesn't work ever. It could be made to
work but I think it's probably easier not to use keys and instead walk
over the tree one step at a time:

<xsl:template match="section">
<xsl:apply-templates select="node()[1]" mode="w"/>

<xsl:template match="node()" mode="w">
<xsl:apply-templates select="."/>
<xsl:apply-templates select="following-sibling::node()[1]"/>

<xsl:template match="processing-instruction('xm-insertion-mark-start')" mode="w">
<div class="revision">
  <xsl:apply-templates select="following-sibling::node()[1]"/>
<xsl:apply-templates select="following-sibling::processing-instruction('xm-insertion-mark-start')[1]/following-sibling::node()[1]"/>

<xsl:template match="processing-instruction('xm-insertion-mark-end')" mode="w"/>

David (untested again:-)

This e-mail has been scanned for all viruses by Star. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:

Current Thread