Whenever I use the mapper, i.e. I draw a new line or I edit ('set text value') an element in the target document the 'import module ...' line is removed from the xquery document.
Is this a bug or do I need to configure Stylus Studio somewhere?
When using such 'library' functions, the functions of these imported libraries are not visible in the 'user defined functions' popup menu of the mapper. Therefore it is not possible to use them with the mapper, and they must be included manually in the xquery source text, which works fine. It would be more efficient to see them also in the popup menus 'user defined functions'.
What you are experiencing is a bug in the current 2006 Release 2 version; this issue will still be present in the coming 2006 Release 3 next week, but it will be corrected in a maintenance package in the coming weeks.
About your suggestion for improvement, we agree on that, and it will soon be part of the Stylus Studio functionality.