I am trying to export static portlet to xowiki. For some strange reason the following script returns in a file export.tcl a different output than in developer shell:
set package_id 48643
set content ""
db_multirow -extend edit_url content select_content {
select content_id, body,
pretty_name
from static_portal_content
where package_id = :package_id
} {
set obj [::xowiki::Page create $content_id \
-set text $body \
-set title $pretty_name \
-set creation_user [ad_conn user_id] \
-set modifying_user [ad_conn user_id] \
-name "portlet-$content_id" \
-parent_id -100 \
-package_id [ad_conn package_id]]
$obj volatile
append content [$obj marshall] \n
}
The only difference is that in the shell I call
set content
to see the result and
ns_return 200 text/plain $content
in export.tcl.
In export.tcl I see this:
namespace eval ::template {}
::xowiki::Page create ::template::48901 -noinit \
-set creator {} \
-set page_order {} \
-set lang en \
-set creation_user 27685 \
-set render_adp 1 \
-set text {...} \
-set absolute_links 0 \
-set package_id 1456 \
-set folder_id -100 \
-set nls_language en_US \
-set name portlet-48901 \
-set mime_type text/plain \
-set publish_status ready \
-set title Hilfe \
-set revision_id 0 \
-set modifying_user 27685 \
-set parent_id -100
namespace eval ::template {namespace export query request form element}
As you can see two things are added:
namespace eval ::template {}
namespace eval ::template {namespace export query request form element}
missing in the shell and template::::template::48901 instead of ::48901.
Any idea where the template namespace suddenly comes from?