Adding a new Document to Framework Templates

bds
Posts: 38

Adding a new Document to Framework Templates

Wed Jun 26, 2013 6:09 pm

Hi all,

I'd like to add a new template to the Framework Templates (New Document > Framework templates > TEI P5 > $newTemplate). I've copied the Lite.properties and Lite.xml in $oxygen/frameworks/tei/templates/TEI P5 to new files (DI-Lite.properties and DI-Lite.xml); additionally I've copied those two files to $oxygen/frameworks/tei/xml/tei/custom/templates.

I've restarted the application, but my template doesn't appear in the list. I see in the documentation that I can create & share new templates by using Options > Preferences > Editor > Templates > Document Templates. Do I need to create a new directory & put my new template there, or can I keep it with the other TEI P5 templates? If I can keep it with the other TEI P5 templates, do the files need to be in frameworks/tei/templates/TEI P5, or frameworks/tei/xml/tei/?

Thank you for your time & trouble.
Best,

Bridger
sorin_ristache
Posts: 4144

Re: Adding a new Document to Framework Templates

Thu Jun 27, 2013 1:08 pm

Hi Bridger,

The location where you add your template files depends on the category under which you want the template listed in the New dialog box. If you want to have the template listed under Framework templates -> TEI P5 then you have to add the new template files in directory [Oxygen-install-dir]/frameworks/tei/templates/TEI P5. If you want to have the template listed under Global templates you have to add the template files in directory [Oxygen-install-dir]/templates.

Do you mean you added the files DI-Lite.properties and DI-Lite.xml which are duplicates of the files Lite.properties and Lite.xml (which means we know that they are valid Oxygen template files) but after you restarted the Oxygen application the new template name DI-Lite was not listed in the New dialog box under Framework templates -> TEI P5? That should not happen because I tested this and I can see DI-Lite under Framework templates -> TEI P5.

What is the result of typing DI-Lite in the text box at the top of the New dialog box? Does the list of matching templates get empty? If yes please send us a zip archive with the template files that you added in the directory [Oxygen-install-dir]/frameworks/tei/templates/TEI P5 for checking if they are valid Oxygen template files.


Regards,
Sorin
bds
Posts: 38

Re: Adding a new Document to Framework Templates

Thu Jun 27, 2013 8:10 pm

sorin wrote:Do you mean you added the files DI-Lite.properties and DI-Lite.xml which are duplicates of the files Lite.properties and Lite.xml (which means we know that they are valid Oxygen template files) but after you restarted the Oxygen application the new template name DI-Lite was not listed in the New dialog box under Framework templates -> TEI P5? That should not happen because I tested this and I can see DI-Lite under Framework templates -> TEI P5.

What is the result of typing DI-Lite in the text box at the top of the New dialog box? Does the list of matching templates get empty? If yes please send us a zip archive with the template files that you added in the directory [Oxygen-install-dir]/frameworks/tei/templates/TEI P5 for checking if they are valid Oxygen template files.


Hi Sorin,
Thank you for your help! Yes, the files are in $oxygen/frameworks/tei/templates/TEI P5 but they do not appear in either the list of templates under New or in the results of typing DI-Lite in the text box. I will send a ZIP archive to you shortly.

I failed to mention that I did make one change to the DI-Lite.xml file -- I pointed the <?xml-model>'s @href to our local schema. You'll be able to see the change in the archive. Could this be the source of the problem?

Thanks again!
sorin_ristache
Posts: 4144

Re: Adding a new Document to Framework Templates

Fri Jun 28, 2013 11:11 am

Hi,

Thank you for the files. No, the problem does not come from changing the @href value with the schema location. You can set any URL you want in the @href attribute as the schema location.

I will try to look for some errors in the Oxygen log file created on your computer. Please follow the instructions that I sent you by email.


Regards,
Sorin

Return to “TEI”

Who is online

Users browsing this forum: No registered users and 0 guests