XML Search & Replace image scale factor

This forum is for discussions on the Help & Manual Premium Pack and the Premium Pack Toolbox configuration utility introduced with Premium Pack 3

Moderators: Alexander Halser, Tim Green

Post Reply
Rainer Oehry
Posts: 102
Joined: Sun Dec 10, 2017 12:47 pm

XML Search & Replace image scale factor

Unread post by Rainer Oehry »

I am trying to use the Toolbox XML Search and Replace functionality to change images in a project from 100% to 99.90% of page width to make them automatically resizable in the browser.

When I try to set the search and replace options as I understand them and try to start the Preview, I get the following error message:
2019-03-12 16_33_46-.png
Could you please show me how I have to set the required options (tag name, attribute value, new attribute value etc.) to achieve this? Or is there another way?

Thank you.
You do not have the required permissions to view the files attached to this post.
Regards,

Rainer
Head of Technical Writing & Knowledge Management
TIG Technische Informationssysteme GmbH, Rankweil, Austria
User avatar
Tim Green
Site Admin
Posts: 23156
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany
Contact:

Re: XML Search & Replace image scale factor

Unread post by Tim Green »

Hi Rainer,

Here are the settings you would need for this:
change_images.png
If you continue to get this error please contact me on support AT ec-software.com (replace the AT with @) and I will help you out. You may be encountering one of the small errors that I have corrected in Toolbox recently. I have been waiting with the maintenance update to see if anything else crops up first.
You do not have the required permissions to view the files attached to this post.
Regards,
Tim (EC Software Documentation & User Support)

Private support:
Please do not email or PM me with private support requests -- post to the forum directly.
Rainer Oehry
Posts: 102
Joined: Sun Dec 10, 2017 12:47 pm

Re: XML Search & Replace image scale factor

Unread post by Rainer Oehry »

Thank you for your quick (as always) reply, Tim. I was out of the office and could not test it earlier.

It worked flawlessly as suggested. In fact, I had been trying to do the exactly same thing.

What I now found out is that, after previewing my project using whatever search & replace options, the tool complains about "invalid topics found during the search". As soon as this error message appeared once, I reproducibly get the above error with whatever I am trying to do next. It is not possible to dismiss the error by closing the Search & Replace window, one has to completely close the toolbox utility.

Not sure, though, what causes this error message in 2 topics. I find nothing out of the ordinary at the indicated XML code locations …

I will investigate that further and might eventually need further assistance :)

Thank you again.
Regards,

Rainer
Head of Technical Writing & Knowledge Management
TIG Technische Informationssysteme GmbH, Rankweil, Austria
User avatar
Tim Green
Site Admin
Posts: 23156
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany
Contact:

Re: XML Search & Replace image scale factor

Unread post by Tim Green »

Hi Rainer,

The VisualStudio XML check performed in Toolbox is quite strict and will warn about even very simple XML errors. All known XML errors have actually now been fixed in HM so what has happened in your case is most likely that the topics in question haven't been edited in a long time. If you edit both of them in the current version of Help+Manual any old XML errors will be fixed automatically. You just need to make any tiny change, like adding a space somewhere in the topic and then deleting it again and saving. After that the errors should also not show up in Toolbox any more. 8)
Regards,
Tim (EC Software Documentation & User Support)

Private support:
Please do not email or PM me with private support requests -- post to the forum directly.
Rainer Oehry
Posts: 102
Joined: Sun Dec 10, 2017 12:47 pm

Re: XML Search & Replace image scale factor

Unread post by Rainer Oehry »

Hi Tim,

I had the project in question open in H&M and did another search & replace preview in the toolbox, to identify again the two culprit topics. I then made a small change in the first topic and reverted it, as you suggested, and tried to save the project.

I encountered the following error:
2019-03-18 14_00_15-Help & Manual.png
I tried closing the toolbox, but that did not help.

What can I do? Should I expect to run into these problems when using the editor and the toolbox in parallel? (I did not make any changes from the toolbox, just a preview …)
You do not have the required permissions to view the files attached to this post.
Regards,

Rainer
Head of Technical Writing & Knowledge Management
TIG Technische Informationssysteme GmbH, Rankweil, Austria
User avatar
Tim Green
Site Admin
Posts: 23156
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany
Contact:

Re: XML Search & Replace image scale factor

Unread post by Tim Green »

Should I expect to run into these problems when using the editor and the toolbox in parallel? (I did not make any changes from the toolbox, just a preview …)
Toolbox does everything it can to make this impossible and it is something that you should never ever do. Once Toolbox opens a project it locks it, but if it is a HMXP project it can only lock the main project file and prevent you from then opening the project afterwards. If you open a project that is already open you can have problems.

It's difficult to say what exactly has happened here because it's an edge case that shouldn't be allowed. As a general principle, trying to edit the same files with two different programs at the same time is often asking for trouble.
Regards,
Tim (EC Software Documentation & User Support)

Private support:
Please do not email or PM me with private support requests -- post to the forum directly.
Rainer Oehry
Posts: 102
Joined: Sun Dec 10, 2017 12:47 pm

Re: XML Search & Replace image scale factor

Unread post by Rainer Oehry »

Tim Green wrote:As a general principle, trying to edit the same files with two different programs at the same time is often asking for trouble.
I agree. This is why I made sure to just do a preview in the toolbox … in my understanding, "editing" in this context means committing changes to a file, not just reading it. I was not aware that this already applies changes to the project file(s) that prevent the editor from saving the project.

If two or more authors work on the same project, we are being informed whenever a topic was changed by another instance. We can identify the topic, and we are offered to reload it, which then allows us to save the project and commit all the modifications to all the other topics we were working on. We are not just informed that saving the project is no longer possible and everything we did is lost … In my case, this was not a problem, because the only change was a "dummy" edit to one topic, so I discarded the change, reopened the project and reapplied the edit (which worked as expected, by the way, I was able to eliminate the "invalid XML" warning from the toolbox).

If, on the other hand, I had not tried to save the project immediately (in order to check whether the suggested modification worked), but had continued working on other topics, I might have lost work.

May I offer a suggestion? As soon as anything happens to the open project that will prohibit saving it, we should get a warning, something like "Caution … the project is corrupted … you will not be able to save the project anymore … everything you do from now on will probably be lost … please close the project and reopen it before continuing" or the like?
Regards,

Rainer
Head of Technical Writing & Knowledge Management
TIG Technische Informationssysteme GmbH, Rankweil, Austria
Post Reply