Page 1 of 1

Find&Replace attribute values across files

Posted: Tue Apr 02, 2019 11:02 am
by syed
Hi,
I have used audience=compA and audience=compB across dita files. This attribute is used by the ditaval file. I would like to swap the values. How can i do that effectively across files?

When i look for the value using 'Find and Replace in Files' option, the tool finds that across attributes. I would like the tool to find it only in the 'audience' attribute. Is there a way to specify that in the tool?

Thanks...

Re: Find&Replace attribute values across files

Posted: Tue Apr 02, 2019 2:47 pm
by Radu
Hi,

The "Find/Replace in Files" dialog has a "Restrict to XPath" filter which could be set to @audience.
Or you can create a predefined XSLT-based XML refactoring operation:

https://www.oxygenxml.com/doc/versions/ ... ample.html

which uses a stylesheet like this to modify the values of a profiling attribute to something else:

https://github.com/oxygenxml/dita-refac ... eValue.xsl

Regards,
Radu

Re: Find&Replace attribute values across files

Posted: Wed Apr 03, 2019 6:36 pm
by syed
Thanks Radu. That helped.