Page 1 of 1

Search before/after date in 'track changes' PI

Posted: Mon Aug 27, 2012 9:50 am
by burbles
I have an XML file with multiple processing instructions that show added and deleted content, which include the dates shown as YYYYMMDD. When I switch to Text view in oXygen Author, I can search for an exact date in a processing instruction, but how do I search for PIs before or after a date (i.e. less than or greater than a date using the format YYYYMMDD)?
Thanks!

Re: Search before/after date in 'track changes' PI

Posted: Mon Aug 27, 2012 11:18 am
by Radu
Hi,

Thanks for the interesting use case.
In one of the future Oxygen versions we will provide a special "Review" panel showing all changes and it will also probably have certain filters like viewing all changes a certain author made or viewing changes between certain dates. We'll let you know when this happens.

Right now you could try to execute an XPath expression in the XPath toolbar.

The expression would be something like this:

Code: Select all

//processing-instruction()[name()='oxy_insert_start' or name()='oxy_delete'][replace(replace(., '(.*)timestamp="', ''), "T(.*)", '') < '20101010']
Basically for all PIs named oxy_insert_start or oxy_delete the "data" part of the PI is processed via a regexp to extract the timestamp value (before the "T" part) and then it can be compared with a "YYYYMMDD" value using simple string comparison.

Regards,
Radu

Re: Search before/after date in 'track changes' PI

Posted: Tue Aug 28, 2012 2:55 pm
by burbles
Thanks Radu, I'll try that XPath expression.