On 12/08/2011 04:08 PM, Kappes Florian (STS/FuE) wrote:
> Sorry that i reply so late but your suggestion does not work:
>
>
>
>>> please tell me how to specify the helpset name in the converion
>>> options of xmlMind.
>>> Please send me a link or documentation of possible options if available.
>
>
>> "jhelpset.hs" seems to be hardwired in the DocBook XSL stylesheets.
>> Therefore there is no way to change the name of this file.
>> I'm not sure that you really need to change the name of this file.
>> Something like:
>
>> new HelpSet(null, new URL("jar:file:/C:/bar/wiz/foo.jar!/jhelpset.hs"));
>
>> should work fine.
>
> Since the language is defined by the method:
>
> HelpSet.findHelpSet(null, "jhelpset.hs", Locale);
>
> ==> for german "jhelpset_de.hs" ... and so on. It is not differed from which
> jar file that comes. Since i don't want to hardwire the jar files your
> suggestion will not work for me.
There are almost certainly many simple ways to workaround this problem.
Since I don't really understand your context, I cannot suggest the
workaround which is the right one for you.
Here's the code snippet we use to load multiple, different, possibly
localized, helpsets, in XXE:
---
String language = Locale.getDefault().getLanguage();
String resName = "/" + name + "_" + language + "/jhelpset.hs";
URL helpSetURL = HelpSupport.class.getResource(resName);
if (helpSetURL == null) {
System.err.println("Don't find '"+ resName + "'");
resName = "/" + name + "/jhelpset.hs";
helpSetURL = HelpSupport.class.getResource(resName);
}
if (helpSetURL == null) {
System.err.println("Don't find '"+ resName + "'");
return;
}
try {
HelpSet helpSet = new HelpSet(null, helpSetURL);
...
---
In the above snippet, "name" corresponds to the name of the directory
(as found in the .jar java help file) containing "jhelpset.hs".
All the JavaHelp we use is always created the way below by XXE, out of
DocBook 4, DocBook 5 or DITA documents:
---
convertdoc db5.toJavaHelpWithPrefix help.xml \
-u ../../../5xxe_addon/mathml_config/common/mathml_help.jar \
-s mathml_help
---
Convertdoc is XXE without a GUI. See
http://www.xmlmind.com/xmleditor/_distrib/doc/commands/convertdoc.html
Unlike the toJavaHelp process command which creates resource
"/jhelpset.hs", the above toJavaHelpWithPrefix process command creates
resource "/mathml_help/jhelpset.hs".
Note that if I had a French translation of the MathML help, I would have
specified "-s mathml_help_fr" in order to create resource
"/mathml_help_fr/jhelpset.hs".
All this to explain that you are free to do any you want with helpsets,
it will work fine provided that your JavaHelp generation process and
your JavaHelp loading code are consistent.
>
> the help set is searched by the name with the locale appendix. The JavaHelp
> library searches all jar files within the classpath. The problem is, that the
> indexfile is hardwired. Could you please check if thats really not changeable?
>
>
I'm sorry but we, XMLmind, do not develop nor maintain nor provide
support for the DocBook XSL stylesheets. Please post a request for
enhancement to the DocBook XSL stylesheets mailing list.
--
XMLmind XML Editor Support List
[email protected]
http://www.xmlmind.com/mailman/listinfo/xmleditor-support