Permalink
Cannot retrieve contributors at this time
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
eoa-xmlmind/README.md
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
125 lines (94 sloc)
5.51 KB
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Addon for EOA specific editing | |
This addon is a customization of the original metopes addon for Edition Open Access. | |
in `tei.xxe` is a line which references a new user interface: | |
<include location="eoa/eoa.incl"/> | |
in the same file, the line | |
<rootElementAttribute localName="change" substring="true" value="metopes"/> | |
controls which user interface elements are shown. The | |
rootElementAttribute is used to launch the addon when opening a file. | |
Depends on the `change` attribute in the root of an XML file, e.g. | |
`metopes_edition`. This is as of now unchanged. | |
Also, the file `xxe/ui/toolbars_ue/t_ue_impr.incl` includes another link to a user interface element. | |
Could we define the core of common commands and how we could manage link between those two addons ? | |
So maybe an easy and clean way to proceed would be to define a separate eao addon (encoding, schema would be different) and include metopes | |
commands (or toolbars) needed. In that way, it would be easier to deal with metopes updates too. | |
## Configuration | |
### Mode-specific files | |
Most of the configuration is done in a directory, `eoa`, which | |
contains the commands for EOA specific export actions. The directory | |
contains relevant scripts and files and also the XSD schema. | |
### User interface | |
An entry in `xxe/ui/toolbarSwitch.incl` changes the `@change` attribute and the EOA mode can be loaded. | |
The menus for the modes are in `xxe/ui/toolbars_ue`. There are two generic ones, `t_ue_annotation.incl` and `t_ue_annotation.incl` plus the publication-specific modes (Like OpenEdition, JATS-NLM, EPUB or EOA). In the generic modes `t_ue_annotation.incl` and `t_ue_annotation.incl`, the default publication mode can be set. The publication modes all have their own menus and commands that are defined in e.g. `xxe/eoa/eoa.incl`. | |
## Tips | |
## How to modify things | |
In the Preferences in `General`/`Features`, enable `Enable the Developer Tools` | |
For minor changes in the config close all documents in XMLmind and run `Options` -> `Reload all Configurations`. | |
For bigger changes, a restart of the program is recommended. | |
### Complex commands | |
How to insert XML elements like | |
``` | |
<bibl><ref type="authoryear" target="#Cusanus_2010/1"/><citedRange from="6" to="7"/></bibl> | |
``` | |
Is there a way to get a dialogue box to enter the attribute values? | |
You can set attribute value using the `putAttribute` command | |
(http://www.xmlmind.com/xmleditor/_distrib/doc/commands/putAttribute.html). | |
See also `addAttribute` and `editAttributes` commands, depending if | |
you want to propose or save preset attributes values. | |
About the `@target`, we are working on the `linkType` functionality that permits the user to choose the target in a list. | |
Here is the user documentation based on DocBook example : http://www.xmlmind.com/xmleditor/_tutorial/setup_olinks/index.html | |
Here is the configuration documentation : http://www.xmlmind.com/xmleditor/_distrib/doc/configure/linkType_for_attribute_editors.html. | |
Basically for TEI crossed references like `<ref @target=#Cusanus_2010>`, commands would look like : | |
* Definition of references system : | |
``` | |
<linkType> | |
<link match="*[@target]" href="@target" /> | |
<anchor match="*[@xml:id]" name="@xml:id" /> | |
</linkType> | |
``` | |
* Custom @target attribute editor : | |
``` | |
<attributeEditor attribute="target" elementMatches="tei:ref"> | |
<class>com.xmlmind.xmleditapp.linktype.HrefChoicesFactory</class> | |
</attributeEditor> | |
``` | |
### Set parameters for XSL scripts | |
``` | |
<command name="eoa2tex"> | |
<process> | |
<mkdir dir="%P%SEOA%S" quiet="true"/> | |
<mkdir dir="%P%SEOA%Stemp%S" quiet="true"/> | |
<transform file="%D" label="eoa2tex" stylesheet="xsl%Stei2eoatex.xsl" | |
to="%P%SEOA%Stemp%S%R.xml" version="2.0"> | |
<parameter name="directory">%p</parameter> | |
<parameter name="frontmatter">false</parameter> | |
<parameter name="contributors">false</parameter> | |
<parameter name="strictfigures">false</parameter> | |
<parameter name="verbosity">1</parameter> | |
<parameter name="parts">false</parameter> | |
</transform> | |
<!-- <delete files="%P%SEOA%Stemp%S" quiet="true" recurse="true"/> --> | |
</process> | |
</command> | |
``` | |
#### Description : | |
* creates 2 folders : EOA and EOA/temp ; | |
* transforms the file opened in xmlmind with the parameters : directory, frontmatter, contributors, strictfigures, verbosity, parts. | |
* The directory parameter could help for the result-document XSL function as XMLMind requires the full path to write an output document (eg. <xsl:result-document href=“{concat($directory, ’EOA%Stexfiles/chapter’, format-number(position(), '00'), '.tex')}” …… >. + %S is used as folder separator for both Mac and Windows). | |
* we could do afterwards the integration of parameters for the user in a pop-up windows. | |
### Active schema | |
Link between file and schema are define in the "catalog" file (for | |
metopes, located in `/Users/<user>/Library/ApplicationSupport/XMLmind/XMLEditor7/addon/metopes_tei/documentation/tei_catalog.xml`) | |
More precise documentation here: http://www.xmlmind.com/xmleditor/_distrib/doc/configure/config_xml_catalog.html | |
The schema is also set in the `tei.xxe` file: | |
``` | |
<schema> | |
<location>http://www.tei-c.org/ns/1.0 ../xxe/xsd/EditionOpenAccess.xsd</location> | |
</schema> | |
``` | |
### Keyboard shortcuts | |
Shortcuts are defined by binding commands : | |
http://www.xmlmind.com/xmleditor/_distrib/doc/configure/binding.html | |
Keybindings can be added in the file `xxe/typo/typo.incl`. | |
### CSS rules | |
EOA specific css rules can be edited in `css/tei_ue_eoa.css`. |