Stylesheets icon indicating copy to clipboard operation
Stylesheets copied to clipboard

Add conversion of track change markup to docx2tei

Open GVogeler opened this issue 1 year ago • 4 comments

docx2tei currently seems to neglect the w:del and w:ins annotations in the docx XML (and exporting the content of both as a simple sequence). Converting them into tei:del and tei:add could be beneficial. Covering full range of track change (comments, transpositions, responsibilities for the deletings and additions from @w:author @w:date etc.) seems to be a larger set of work.

GVogeler avatar Mar 31 '24 11:03 GVogeler

https://github.com/TEIC/Stylesheets/blob/released/docx/from/textruns.xsl#L870-L916 should handle this. I cannot find where the in the stylesheets stack the parameter processChangeInformation (defined in https://github.com/TEIC/Stylesheets/blob/released/docx/from/docxtotei.xsl#L54 ) is set to further debug. @sydb ?

GVogeler avatar Apr 01 '24 15:04 GVogeler

It's not clear to me whether you can pass in XSLT parameters via the transformtei / Ant build-from.xml (looks superficially like the answer is no), so you might have to invoke the XSLT directly (assuming an unpacked docx file), modify the Ant build to pass in the parameter, or change the default value to 'true'.

hcayless avatar Apr 01 '24 16:04 hcayless

Myself and @joeytakeda at Council F2F: We think the proper course of action would be:

  1. Add handling for this parameter to transformtei
  2. Add handling for this parameter in the docx/build-from.xml

That should allow passing of that parameter to the docxtotei alias, and that should invoke the correct processing.

martindholmes avatar Sep 15 '25 09:09 martindholmes

(Just to note: This would be a proper course of action to resolve this precise issue, but it is a bit of an ad hoc solution: there are approximately 19 parameters in the docx, and many of them won't be addressed)

joeytakeda avatar Sep 15 '25 09:09 joeytakeda