Login
Quick Search
Feed Contents
by Dan McCrearydan@danmccreary.com26-1-2009 17:19
by Wolf28-11-2008 22:23

by Dan McCrearydan@danmccreary.com at 26-1-2009 17:19; Atom ID: urn:uuid:30496cb9-3837-4f36-aae6-f661b33bf4e7

Good posting.

Can I do conditional import with the import-module() function?

I want different sub-collections to import a different style module.

if (style-exists-for-collection) then (import style.xqm) else (check-parent-collection())

If the parent does not exist then it should use a default style for the web site.

Thanks - Dan

by Wolf at 28-11-2008 22:23; Atom ID: urn:uuid:98e33536-4dd9-4d39-bb12-bef3c07aec79

I guess the problem is that the moduleLoadPath in the XQueryContext remains the same throughout the import sequence. The moduleLoadPath is copied from the main query context to the first module context. We probably need to change it before copying to make it relative to the parent module, not the main xquery.

Links
Latest Posts
AtomicWiki 0.4