Hello Ilaria,
You can follow the example of the entities in the TEI DTD which comes with Oxygen, for example the entity definitions from the file:
Code: Select all
[Oxygen-install-dir]/frameworks/tei/xml/teip4/schema/dtd/iso-lat1.ent
Instead of creating new .ent files you could add your entity definitions to the existing .ent files. For example in the
iso-lat1.ent file with the above path you add a new entity called
ILARIA at the beginning of the file as follows:
Code: Select all
<!ENTITY ILARIA "text_of_new_ILARIA_entity">
<!ENTITY aacute "á"> <!-- LATIN SMALL LETTER A WITH ACUTE -->
<!ENTITY Aacute "Á"> <!-- LATIN CAPITAL LETTER A WITH ACUTE -->
<!ENTITY acirc "â"> <!-- LATIN SMALL LETTER A WITH CIRCUMFLEX -->
After you saved the edited file (in this example
[Oxygen-install-dir]/frameworks/tei/xml/teip4/schema/dtd/iso-lat1.ent), you create a new TEI P4 document by going to menu
File -> New (or pressing the first icon from the left on the toolbar, also called
New), typing
tei in the text box from the
New dialog box and selecting
TEI P4 Document from the filtered list of file templates. The new TEI P4 document starts with:
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE TEI.2 PUBLIC "-//TEI P4//DTD Main Document Type//EN" "http://www.tei-c.org/Guidelines/DTD/tei2.dtd" [
<!ENTITY % TEI.prose 'INCLUDE'>
<!ENTITY % TEI.linking 'INCLUDE'>
<!ENTITY % TEI.figures 'INCLUDE'>
<!ENTITY % TEI.analysis 'INCLUDE'>
<!ENTITY % TEI.XML 'INCLUDE'>
<!ENTITY % ISOlat1 SYSTEM 'http://www.tei-c.org/Entity_Sets/Unicode/iso-lat1.ent'>
%ISOlat1;
<!ENTITY % ISOlat2 SYSTEM 'http://www.tei-c.org/Entity_Sets/Unicode/iso-lat2.ent'>
%ISOlat2;
<!ENTITY % ISOnum SYSTEM 'http://www.tei-c.org/Entity_Sets/Unicode/iso-num.ent'>
%ISOnum;
<!ENTITY % ISOpub SYSTEM 'http://www.tei-c.org/Entity_Sets/Unicode/iso-pub.ent'>
%ISOpub;
]>
If you look in
the Entities view you can see the
ILARIA entity in the
Name column. You may need to sort the
Entities table by clicking on the
Name column header if you cannot locate the entity quickly in the long list of all TEI entities. If the
Entities view is not visible you can make it visible by going to menu
Window -> Show View -> Entities.
This is possible because Oxygen maps the URL of the original file that is declared in this XML file (that is
http://www.tei-c.org/Entity_Sets/Unicode/iso-lat1.ent) to the local file that comes with Oxygen (that is the file modified earlier:
[Oxygen-install-dir]/frameworks/tei/xml/teip4/schema/dtd/iso-lat1.ent), and uses the local file instead of the remote one through the TEI XML catalog for faster operation (that is the file
[Oxygen-install-dir]/frameworks/tei/catalog.xml).
A quick method for opening the entities file: place the cursor inside the file path
http://www.tei-c.org/Entity_Sets/Unicode/iso-lat1.ent inside the DOCTYPE declaration in the new TEI XML document that you just created, and press Ctrl+Enter (or right-click and select
Open -> Open File at Caret from the contextual menu). Oxygen will open automatically the file that you just saved earlier, that is the file
[Oxygen-install-dir]/frameworks/tei/xml/teip4/schema/dtd/iso-lat1.ent file. This is possible due to the mapping created by the XML catalog file
[Oxygen-install-dir]/frameworks/tei/catalog.xml.
Regards,
Sorin