|
ScriptInfo File
ScriptInfo.xml is a file placed in
the script's directory (along with ".js" files). It is read when
the script is loaded or imported and contains several information
related to the script such as its name, its description, the menus
it displays in Messenger, etc... the file does not need to be
created for scripts to run locally, however, its presence is
mandatory if the script has to be exported into a Script Pack.
The Schema file for
ScriptInfo can be temporarily placed in your script's directory
to validate your XML. However, the schema file must not be
redistributed with your script (it would only be dead weight
anyway). Here is how to write the first element of your XML file to
make your XML editor aware of the schema file:
<ScriptInfo xmlns="urn:msgplus:scripts"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:msgplus:scripts PlusScripts.xsd">
<Information>...</Information>
</ScriptInfo>
It is good practice to always link your xml files to their
respective schemas to prevent any possible run time error caused by
an error in your XML. XML files tend to grow rapidly and you'll
soon be thankful for the validation layer brought by the schema
file.
If your XML Editor does not come with graphical browsing of the
schema file, you can view a documentation generated by XMLSpy
in the ScriptInfo
Schema Documentation (some information may be missing in this
documentation). Some elements of the file are also explained in
details in Packaging your
Script.
See Also
ScriptInfo Schema
File, Schema Documentation,
ScriptInfo Examples.
|