New Citation Style HowTo
Revision as of 12:22, 12 May 2010 by Makarenko (talk | contribs) (→New citation style configuration)
This is a protected page.
Prerequisites[edit]
- java SDK 6
- svn
- maven
- jEdit
Preparations[edit]
$svn co https://zim02.gwdg.de/repos/common/trunk/common_services
$cd common_services/citationmanager
- check whether checkout can be compiled:
$mvn clean install
$cd src/main/resources/CitationStyles
$cp rm Default Test; rm -rf Test/.svn
- add new citation style
Test
in thesrc/main/resources/Schemas/explain-styles.xml
, defineoutput-formats
- get nice items-list XML from PubMan live, create src/test/resources/testFiles/Test directory, and save the XML into it under name
TestCollection.xml
. - changes in
src/test/java/test/TestCitationManager.java
:- define path to the new item list in the
itemListsFIleNames
hash- put("Test", "target/test-classes/testFiles/Test/TestCollection.xml");
- create new JUnit test new ctation style
testCitationStyleTest
. - set
testCitationStyles
to@Ignore
- define path to the new item list in the
New citation style configuration[edit]
- Structure:
src/main/resources/CitationStyles/Test/CitationStyle.xml
: main citation style configuration file.src/main/resources/CitationStyles/font-styles.xml
: list of available font style definitions, the font styles can be used in any citation style.src/main/resources/CitationStyles/functions.xml
: global function definitions, can be used in any citation stylesrc/main/resources/CitationStyles/variables.xml
: global variables xml, can be used in any citation style configurationsrc/main/resources/CitationStyles/Test/variables.xml
: local variables xml, the variables can be used only in Test citation style
Citation Style Configuration XMLs[edit]
- Location:
Debugging of citation style configuration[edit]
Debugging life circle consists of 3 consequent steps: validation, compilation and output. Compilation should always take place after any changes in citation style configuration file in order to have a correct output.
- start test with
$mvn -Dtest=TestCitationManager test
- check console output and
target/surefire-reports/test.TestCitationManager.txt
for errors. - check generated outputs in formats: pdf and escidoc_snippet in
target/
directory. The outputs should not be empty and have list of rendered citations.