defining new character entities
Oxygen general issues.
-
- Posts: 1
- Joined: Mon Oct 22, 2012 1:42 am
defining new character entities
Hallo,
I'm encodying a manuscript transcription basing my docs on TEI DTD. I need to implement the list of character entities with new ones, so that the user could select one from the entities' panels (where signs like minus than <, etc., appear) avoiding to remember all entities' names.
Is it possible to do it? I cannot find any suggesion in help panels about this topic.
Otherwise I find in TEI P5 DTD a dedicated markup, <g ref="entity_name">caharcter</g>, but it seems again that it is not possibile to get help in inserting attribute "ref" values, although these names are defined like id values of another element over in the same documents.
Thanks for any help
Ilaria Bonincontro
I'm encodying a manuscript transcription basing my docs on TEI DTD. I need to implement the list of character entities with new ones, so that the user could select one from the entities' panels (where signs like minus than <, etc., appear) avoiding to remember all entities' names.
Is it possible to do it? I cannot find any suggesion in help panels about this topic.
Otherwise I find in TEI P5 DTD a dedicated markup, <g ref="entity_name">caharcter</g>, but it seems again that it is not possibile to get help in inserting attribute "ref" values, although these names are defined like id values of another element over in the same documents.
Thanks for any help
Ilaria Bonincontro
-
- Posts: 4141
- Joined: Fri Mar 28, 2003 2:12 pm
Re: defining new character entities
Post by sorin_ristache »
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:
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:
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:
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
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
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 -->
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;
]>
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
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service