On 05/17/2012 09:07 PM, Harris, Susan wrote: > We have a few questions regarding the 4.5.2_01 XML Mind Editor > Spellchecker functionality that is configurable (or not) using the > applet version embedded within a website war file.
The applet is the desktop application in disguise. Therefore anything which works for the desktop application will also work for the applet. > We currently utilize the standard en.dar dictionary file provided by XML > Mind. It is located under the directory /addon/spell/en.dar. > We compile the editor applet using the following DOS batch file command: > bin\deploywebstart -codebase "" -applet editor1 –index > We initially launch the editor applet from our Java web code JSP wrapper > code using the following code: > <% > //Java > String favorites = > "áÁàÀçÇéÉèÈ"; > %> > <appletname=/"XXE"/id=/"XXE"/mayscript=_/"true"/_code=/"com.xmlmind.xmleditapp.applet.Applet"/ > codebase=/"/../xxe/"/width=/"100%"/height=/"92%"/> > <paramname=/"jnlp_href"/value=/"/xxe.jnlp/> > <paramname=/"appClass"/value=/"com.xmlmind.xmleditapp.applet.Editor1App"//> > <paramname=/"separate_jvm"/value=/"true"//> > <paramname=/"classloader_cache"/value=/"false"//> > <paramname=/"argument1"/value=/"-putpref"//> > <paramname=/"argument2"/value=/"defaultFontSize"//> > <paramname=/"argument3"/value=/"13"//> > <paramname=/"argument4"/value=/"-putpref"//> > <paramname=/"argument5"/value=/"favoriteCharsInTable"//> > <paramname=/"argument6"/value=/"/<%=favorites%>/"//> > <paramname=/"argument7"/value=/"-putpref"//> > <paramname=/"argument8"/value=/"rightSplit.dividerLocation"//> > <paramname=/"argument9"/value=/"1250"//> > Sorry but XMLmind XML Editor requires the Java <sup>TM</sup> > Plug-In version 1.6.0_10 and above in order to run. > </applet> > We have some questions related to if the XML Mind Editor applet (as > described above) can be configured to support the features described by > the questions below: > Multiple Users within one en.dar Dictionary: > > 1. Can the XML Mind Editor applet be configured to provide users with > the ability add new words to the spellchecker en.dar file, while > in the editor applet launched within a web war file? Yes. The user needs the "Learn" button found in the right-click spell popup menu and in the "Spell" tool. > 2. If so, are the changes persistent upon the next time the applet is > launched? Yes. Learned words are stored in <XXE_user_preferences_dir>/spell/dict_<lang>.txt, a plain text file. > 3. If so, are the changes global to all users, or specific to just > the user who made them? They are specific to the user who has clicked the "Learn" button. > 4. If not, is there a way to develop these automated features > compiled within addon.jar/a web war file, running the txt -> > spelling dictionary conversion script provided by XML Mind in a > programmatic fashion in the code? Yes. You need to customize the en.dar dictionary by adding words to it. How to do this is explained here: Dictionary Builder http://www.xmlmind.com/dictbuilder.shtml More precisely here: Storage Structure of Dictionaries http://www.xmlmind.com/_dictbuilder/doc/storage_of_dicts.html and here: Dictionary types http://www.xmlmind.com/_dictbuilder/doc/dict_types.html This should not be technically difficult to do once you have understood the concept of "Composite Dictionary". However we provide no technical support for this task. > > Multiple Dictionaries within one XML Mind Editor Applet: > > 5. Does the XML Mind Editor applet provide the ability to configure a > different spellchecker file per schema/directory configured under > the /addon directory, with the above applet configuration? No. --> Just an idea: may be this is not needed... If the root element of document template 1 (conforming to schema 1) has xml:lang="en-US-Variant1" and you have created a dictionary for en-US-Variant1, then XXE will automatically select this dictionary. If the root element of document template 2 (conforming to schema 2) has xml:lang="en-US-Variant2" and you have created a dictionary for en-US-Variant2, then XXE will automatically select this dictionary. Etc. --> XXE also has <spellCheckOptions defaultLanguage="XXX"/> configuration element in case your schema does not have a lang or xml:lang attribute. See http://www.xmlmind.com/xmleditor/_distrib/doc/configure/spellCheckOptions.html > 6. Or does the XML Mind Editor applet only allow for one or more > global dictionaries to be accessed by all schema/directories under > /addon directory? Yes. > 7. If it does not, could two XML Mind applets being launched within > the same web war file coexist, with separate configurations, > spellchecker dictionaries, etc.? > I've never tested this. However I don't see why it would not work. I assume that you run deploywebstart twice with a different target directory for each run. That is, that you won't mix files in the same target directory. -- XMLmind XML Editor Support List [email protected] http://www.xmlmind.com/mailman/listinfo/xmleditor-support

