On 18 February 2010 13:11, ashok _ <[email protected]> wrote:

> Many many thanks for following up with more questions -- I was finally
> able to get the correct expression.
>
> //text:change-sta...@text:change-id='ct-472232592']/following::text()[not(preceding::text:change-e...@text:change-id='ct-472232592'])]
>
> I am doing it relative to the document root thats why i have // instead of .//

Try testing with

 <text:change-start
           text:change-id="ct472232592"/>Change start</text:p>

   <text:p text:style-name="Standard">Sed ut perspiciatis unde omnis
   iste natus error sit voluptatem accusantium doloremque laudantium,
   totam rem aperiam, nihil molestiae consequatur, vel illum qui
   dolorem eum fugiat quo voluptas nulla pariatur?<text:change
   text:change-id="ct472209600"/> Unchanged</text:p>

I.e. do you pick up the text on the end of the current para element?


 <xsl:template match="text:section">
    <xsl:variable name='t' select='.//text:change-start/@text:change-id'/>
    <xsl:message>
      [<xsl:value-of select=".//text:change-start/following::*[1][text()]"/> ]
    </xsl:message>
    <diff>
      <xsl:value-of
select=".//text:change-start/following::*/text()[not(preceding::text:change/@text:change-id=$t)]
| .//text:change-start/text()"/>
  </diff>
  </xsl:template>

Gets 'most' of it, misses the 'Change start' text.

HTH


-- 
Dave Pawson
XSLT XSL-FO FAQ.
Docbook FAQ.
http://www.dpawson.co.uk

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to