xsl-list
[Top] [All Lists]

Re: Revision Marking in HTML

2005-05-03 04:25:19

Holy cr*p.  This is going to be long and involved isn't it?

Is it any easier in XSLT 2.0?  I don't exactly have all year to work on it,
so I am thinking that it may be easier to stick to the old stylesheet, and
then change it when we are in the position to use XSLT 2.0.

Thanks

Nadia Swaby



                                                                                
                                             
                      David Carlisle                                            
                                             
                      <davidc(_at_)nag(_dot_)co(_dot_)u         To:      
xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com                                
      
                      k>                       cc:                              
                                             
                                               Subject: Re: [xsl] Revision 
Marking in HTML                                   
                      2005-05-02 19:11                                          
                                             
                      Please respond                                            
                                             
                      to xsl-list                                               
                                             
                                                                                
                                             
                                                                                
                                             






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

   David


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">
<div>
<xsl:apply-templates select="node()[1]" mode="w"/>
</div>
</xsl:template>


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


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

</xsl:template>

<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:
http://www.star.net.uk
________________________________________________________________________

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






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