Re: Find content between <text:change-start /> and <text:change-end />

ashok _ <[email protected]> Thu, 18 Feb 2010 16:41:52 +0300
Newsgroups gmane.comp.openoffice.devel.xml
Message-ID <[email protected]>
On Thu, Feb 18, 2010 at 4:18 PM, Dave Pawson <[email protected]> wrote:
> Try testing with
>
> =A0<text:change-start
> =A0 =A0 =A0 =A0 =A0 text:change-id=3D"ct472232592"/>Change start</text:p>
>
> =A0 <text:p text:style-name=3D"Standard">Sed ut perspiciatis unde omnis
> =A0 iste natus error sit voluptatem accusantium doloremque laudantium,
> =A0 totam rem aperiam, nihil molestiae consequatur, vel illum qui
> =A0 dolorem eum fugiat quo voluptas nulla pariatur?<text:change
> =A0 text:change-id=3D"ct472209600"/> Unchanged</text:p>
>
> I.e. do you pick up the text on the end of the current para element?
>
>
> =A0<xsl:template match=3D"text:section">
> =A0 =A0<xsl:variable name=3D't' select=3D'.//text:change-start/@text:chan=
ge-id'/>
> =A0 =A0<xsl:message>
> =A0 =A0 =A0[<xsl:value-of select=3D".//text:change-start/following::*[1][=
text()]"/> ]
> =A0 =A0</xsl:message>
> =A0 =A0<diff>
> =A0 =A0 =A0<xsl:value-of
> select=3D".//text:change-start/following::*/text()[not(preceding::text:ch=
ange/@text:change-id=3D$t)]
> | .//text:change-start/text()"/>
> =A0</diff>
> =A0</xsl:template>
>
> Gets 'most' of it, misses the 'Change start' text.
>


Yeah it does miss the text if I do :

.//text:change-start/following::*/text()[not(preceding::text:change/@text:c=
hange-id=3D$t)]

instead if use : i.e. change following::*/text() to following::text() ..

.//text:change-start/following::text()[not(preceding::text:change/@text:cha=
nge-id=3D$t)]

it always picks up the 'Change start' text ..

ashok