[FOray-commit] SF.net SVN: foray:[14946] trunk/foray/foray-orthograp hy/src/main
Modular XSL-FO Implementation for Java.
Status: Alpha
Brought to you by:
victormote
|
From: <vic...@us...> - 2026-07-29 21:54:02
|
Revision: 14946
http://sourceforge.net/p/foray/code/14946
Author: victormote
Date: 2026-07-29 21:54:00 +0000 (Wed, 29 Jul 2026)
Log Message:
-----------
Conform to aXSL change: Allow individual derivative factory to be added to an orthography.
Modified Paths:
--------------
trunk/foray/foray-orthography/src/main/data/orthographies/foray-orthography-config.xml
trunk/foray/foray-orthography/src/main/java/org/foray/orthography/Orthography4aStandard.java
trunk/foray/foray-orthography/src/main/java/org/foray/orthography/util/OrthographyParser.java
Modified: trunk/foray/foray-orthography/src/main/data/orthographies/foray-orthography-config.xml
===================================================================
--- trunk/foray/foray-orthography/src/main/data/orthographies/foray-orthography-config.xml 2026-07-29 15:34:17 UTC (rev 14945)
+++ trunk/foray/foray-orthography/src/main/data/orthographies/foray-orthography-config.xml 2026-07-29 21:54:00 UTC (rev 14946)
@@ -102,6 +102,10 @@
<resource-location parsed="false" url="file:../dictionaries/eng-Latn-ZZZ-epoch-01.dict.xml"/>
</dictionary-resource>
+ <dictionary-resource id="org.foray.emen.Latn.ZZZ">
+ <resource-location parsed="false" url="file:../dictionaries/emen-Latn-ZZZ.dict.xml"/>
+ </dictionary-resource>
+
<dictionary-resource id="org.foray.ita.Latn.ZZZ">
<resource-location parsed="false" url="file:../dictionaries/ita-Latn-ZZZ.dict.xml"/>
</dictionary-resource>
@@ -172,6 +176,14 @@
<derivative-factories reference="eng-Latn-derivatives"/>
</orthography>
+ <orthography language-iso-3char="emen" script-iso-4char="Latn" country-iso-3char="ZZZ">
+ <match-rules reference="eng-Latn-match-rules"/>
+ <dictionary reference="org.foray.emen.Latn.ZZZ"/>
+ <hyphenation-patterns reference="hyph-patterns-eng"/>
+ <derivative-factories reference="eng-Latn-derivatives"/>
+ <derivative-factory class="org.foray.orthography.inflection.emen.EmenLatnSuffix_eth_Factory"/>
+ </orthography>
+
<orthography language-iso-3char="lat" script-iso-4char="Latn" country-iso-3char="ZZZ">
<match-rules reference="lat-Latn-match-rules"/>
<dictionary reference="org.foray.lat.Latn.ZZZ"/>
Modified: trunk/foray/foray-orthography/src/main/java/org/foray/orthography/Orthography4aStandard.java
===================================================================
--- trunk/foray/foray-orthography/src/main/java/org/foray/orthography/Orthography4aStandard.java 2026-07-29 15:34:17 UTC (rev 14945)
+++ trunk/foray/foray-orthography/src/main/java/org/foray/orthography/Orthography4aStandard.java 2026-07-29 21:54:00 UTC (rev 14946)
@@ -155,6 +155,14 @@
this.wordWrapperFactories = wordWrapperFactories;
}
+ /**
+ * Adds a single word wrapper factory to the list.
+ * @param factory The word wrapper factory to set.
+ */
+ public void registerWordWrapperFactory(final InflectionFactory<?> factory) {
+ this.wordWrapperFactories.add(factory);
+ }
+
@Override
public SegmentDictionary getDictionary() {
if (this.dictionaryResource == null) {
Modified: trunk/foray/foray-orthography/src/main/java/org/foray/orthography/util/OrthographyParser.java
===================================================================
--- trunk/foray/foray-orthography/src/main/java/org/foray/orthography/util/OrthographyParser.java 2026-07-29 15:34:17 UTC (rev 14945)
+++ trunk/foray/foray-orthography/src/main/java/org/foray/orthography/util/OrthographyParser.java 2026-07-29 21:54:00 UTC (rev 14946)
@@ -197,7 +197,11 @@
errorMessage("derivative-factory not found: {}", factoryClassName);
return;
}
- this.currentDerivateFactoryList.add(factory);
+ if (this.currentDerivateFactoryList != null) {
+ this.currentDerivateFactoryList.add(factory);
+ } else {
+ this.currentOrthographyConfig.registerWordWrapperFactory(factory);
+ }
return;
}
case "dictionary": {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|