Running a transformation scenario replaces custom file icon

Having trouble installing Oxygen? Got a bug to report? Post it all here.
velda
Posts: 21
Joined: Fri Jul 18, 2008 9:48 pm

Running a transformation scenario replaces custom file icon

Post by velda »

I have about a thousand xml files with custom file extensions and document icons in OSX. Whenever I run one of these files through an XSLT in oXygen that saves the resulting document as ${currentFileURL} the new file looses the custom icon. Is this an issue related to the capital file extension issue already noted here or is this a separate issue? If oXygen is creating the new file does it need to know what icon to give that file extension? How would I specify this?

cheers,
-V
sorin_ristache
Posts: 4141
Joined: Fri Mar 28, 2003 2:12 pm

Re: Running a transformation scenario replaces custom file icon

Post by sorin_ristache »

Hello,

Do you need the icon displayed in the Finder application for that file? The icon is set by a file type association created in OS X and Oxygen does not change such associations. If the extension of the result file of the transformation is not the same as the extension of the original file then it is a different file type so OS X will display the icon of that file type association.

Do you mean that you set the value ${currentFileURL} in the field Save As in the scenario transformation dialog? In this case the file name of the output is the same as the file name of the input of the transformation. The extension is not changed. Is the file name changed in your case? If yes please specify the input file name and the output file name that you see on disk after the transformation.


Regards,
Sorin
velda
Posts: 21
Joined: Fri Jul 18, 2008 9:48 pm

Re: Running a transformation scenario replaces custom file icon

Post by velda »

Yes, I am referring to a transformation scenario using ${currentFileURL} as the Save As value. Seeing as how oXygen is knowingly replacing the file with a file of the exact same name, I would think it would copy the meta data from the original file to the new file (e.g. a custom file icon or label color.) After testing this a couple of times I noticed the Spotlight Comments is retained in the new file, but I am skeptical if this is intentionally done by oXygen or if OSX is working some spotlight mojo in the background based on file name.

Perhaps I am in the minority of seeing things this way, but if you are transforming a file only to save it as the exact same file name it would seem that you would want it to retain such meta data. In my case I am using a standard identity transformation that results in nearly the exact same document. It is very odd for this to be treated as an entirely new file. Perhaps this could be a scenario option?
sorin_ristache
Posts: 4141
Joined: Fri Mar 28, 2003 2:12 pm

Re: Running a transformation scenario replaces custom file icon

Post by sorin_ristache »

Hello,

Oxygen does not load or change any OS X file metadata. The filename of the output of the transformation should be the same as the filename of the input XML. If it is the same filename then the file type association that is set in OS X should be the same. That means if it is the same filename (the same letters and the same case for both the name and the extension - uppercase or lowercase) then OS X should display the same icon for that file. This is what happens on the Mac OS X machine where I tried an XSLT transformation where the Save As field is ${currentFileURL}. Otherwise it is a problem of file associations in OS X, not in Oxygen. A solution could be rebuilding the database of OS X file associations which means a sequence of commands executed from a command line on that Mac machine.

Is the file name changed in your case? If yes please specify the input file name and the output file name that you see on disk after the transformation.


Regards,
Sorin
Post Reply