Quantcast

How to be sure i18n module code is installed?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

How to be sure i18n module code is installed?

Tony Graham
The example in the documentation for the i18n module [1] implies that
the module is at "/db/i18n/modules/i18n.xql":

    import module namespace i18n = "http://exist-db.org/xquery/i18n" at
"/db/i18n/modules/i18n.xql";

Currently, the i18n module is part of the demo apps, so the code is
installed in "/db/apps/demo/modules".

Since someone could decide to 'tidy up' their eXist-db installation and
remove their 'eXist-db Demo Apps' package, what is the best approach for
an app that would use the i18n code? Is it safe to assume that the code
won't change (since it currently hasn't changed in the last four years
[2]) and include a copy of the code in the app? Is it preferable to make
a library application for the i18n code so that it can (possibly) change
independently from the app code? Is it preferable for a 'real' app to
depend on the demo apps package (and possibly confuse the tidier)?

I currently think that depending on the demo apps is the best option.

Regards,


Tony Graham.
--
Senior Architect
XML Division
Antenna House, Inc.
----
Skerries, Ireland
[hidden email]


[1] http://exist-db.org/exist/apps/demo/examples/special/i18n-docs.html
[2] https://github.com/eXist-db/demo-apps/tree/master/modules

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Exist-open mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/exist-open
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to be sure i18n module code is installed?

Joe Wicentowski
Hi Tony,

You can declare a dependency on the demo app in your expath-pkg.xml,
and the package manager (or repo functions, if you call them directly)
will fetch the module during installation.  So it's safe to declare
this dependency and assume that if your users are online they will be
able to install your app and its dependencies just fine.  This
prevents a problem in case any of your users does not have the
demo-apps package pre-installed.

FYI, there's been some more recent work done in internationalization
in the tei-publisher-app repository - I'm not sure if this adds
anything of use to you:

  http://gitlab.exist-db.org/tei-publisher/tei-publisher-app/tree/master/modules/lib

I do think you're right that the location of the i18n.xql module
mentioned in the demo-apps page you referenced is wrong.  I've filed
an issue at https://github.com/eXist-db/demo-apps/issues/18.

Joe

On Wed, Mar 1, 2017 at 12:16 PM, Tony Graham <[hidden email]> wrote:

> The example in the documentation for the i18n module [1] implies that
> the module is at "/db/i18n/modules/i18n.xql":
>
>     import module namespace i18n = "http://exist-db.org/xquery/i18n" at
> "/db/i18n/modules/i18n.xql";
>
> Currently, the i18n module is part of the demo apps, so the code is
> installed in "/db/apps/demo/modules".
>
> Since someone could decide to 'tidy up' their eXist-db installation and
> remove their 'eXist-db Demo Apps' package, what is the best approach for
> an app that would use the i18n code? Is it safe to assume that the code
> won't change (since it currently hasn't changed in the last four years
> [2]) and include a copy of the code in the app? Is it preferable to make
> a library application for the i18n code so that it can (possibly) change
> independently from the app code? Is it preferable for a 'real' app to
> depend on the demo apps package (and possibly confuse the tidier)?
>
> I currently think that depending on the demo apps is the best option.
>
> Regards,
>
>
> Tony Graham.
> --
> Senior Architect
> XML Division
> Antenna House, Inc.
> ----
> Skerries, Ireland
> [hidden email]
>
>
> [1] http://exist-db.org/exist/apps/demo/examples/special/i18n-docs.html
> [2] https://github.com/eXist-db/demo-apps/tree/master/modules
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
> _______________________________________________
> Exist-open mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/exist-open

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Exist-open mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/exist-open
Loading...