Education Prize Logo
Science SPORE Prize
November 2011

NSF Logo
The Open Source Physics Project is supported by NSF DUE-0442581.

Help about files post and replies

Return to the Help about files thread
Login to post to this thread

file naming convention - May 3, 2013 at 10:34AM
Jean-Philippe Grivet
3 Posts

My first attempts at EJS programming produced files with a .XML suffix. I have now written a slightly more complex program which EJS stores with a .ejs suffix; why ? Further, if I change the suffix to .xml, EJS opens the file in the Win notebook and shows unformatted xml ??

another question: I don't understand how I can choose files to be exported as HTML.

Thank you in advance for your time and help
JP Grivet


Replies to file naming convention

Re: file naming convention - Apr 13 12:42AM
Ralph Trimnell
1 Posts

this is not an answer but a similar query. I am also new, just trying to run the three trace plot shown as an example in the wiki. My file is titled "test 4.ejs" and won't run giving a "unknown source error" Changing the extention to xml gives similar strange results as  listed by Jean-Phillipe




> Re: file naming convention
>
> My first attempts at EJS programming produced files
> with a .XML suffix. I have now written a slightly
> more complex program which EJS stores with a .ejs
> suffix; why ? Further, if I change the suffix to .xml,
> EJS opens the file in the Win notebook and shows unformatted
> xml ??
>
> another question: I don't understand how I
> can choose files to be exported as HTML.
>
> Thank you
> in advance for your time and help
> JP Grivet



Re: Re: file naming convention - Apr 13 5:10AM
Francisco Esquembre
104 Posts

Ralph,

Please, upload your file to this discussion or send it to me at fem@um.es, so that I can see what the problem is. I guess this is not a problem of the extension, but something else.

Paco



Re: file naming convention - Apr 13 5:09AM
Francisco Esquembre
104 Posts

Hi Jean-Phillipe,

EJS changed to the .ejs extension to distinguish old XML files from new XML files. The only (but big) difference is that the .ejs files are saved using UTF 16 encoding format (instead of the previously unspecified encoding). This change respects mainly special characters in different languages, particularly if you switch from a Windows to a Mac computer, or viceversa.

EJS understands now any  of the two files, each with its corresponding encoding. You need to do nothing for EJS to select the right encoding.

What you should NOT do is to change the extension to an .ejs file into .xml, because, then, you are fooling EJS by telling it a UTF16 file is not a UTF16 file. This confuses EJS, and when EJS does not understand a file, it passes it over to your default editing tool in the OS. (Notebook in your case.)

Again, respect the original extension of an EJS file that you get from someone else, and let EJS save its files in the suggested .ejs format. There is no reason why you would ant to change the extension to an EJS file.

Paco



The OSP Network:
Open Source Physics - Tracker - EJS Modeling
Physlet Physics
Physlet Quantum Physics