Author: jmorliaguet Date: Thu Dec 8 01:15:20 2005 New Revision: 1989 Modified: cpsskins/branches/jmo-perspectives/engines/sitedesigner/browser.py cpsskins/branches/jmo-perspectives/perspectives/perspective.xml Log:
- the xml header is used in the resource, but it must be removed when the resource is used as an xml fragment (e.g. in a setting) Modified: cpsskins/branches/jmo-perspectives/engines/sitedesigner/browser.py ============================================================================== --- cpsskins/branches/jmo-perspectives/engines/sitedesigner/browser.py (original) +++ cpsskins/branches/jmo-perspectives/engines/sitedesigner/browser.py Thu Dec 8 01:15:20 2005 @@ -81,15 +81,17 @@ response = request.response response.setHeader('content-type', 'text/xml') - response.setHeader('Content-disposition', - 'attachment; filename=%s' % setting_filename) + #response.setHeader('Content-disposition', + # 'attachment; filename=%s' % setting_filename) # export the resource exporter = getMultiAdapter((resource, request), name='exporter') + # remove the xml header used in the resource + resource_xml = exporter().replace('<?xml version="1.0"?>', '') return setting_xml % { 'name': name, 'title': setting.title, - 'resource': exporter(), + 'resource': resource_xml, } Modified: cpsskins/branches/jmo-perspectives/perspectives/perspective.xml ============================================================================== --- cpsskins/branches/jmo-perspectives/perspectives/perspective.xml (original) +++ cpsskins/branches/jmo-perspectives/perspectives/perspective.xml Thu Dec 8 01:15:20 2005 @@ -1,3 +1,4 @@ +<?xml version="1.0"?> <perspective xmlns:tal="http://xml.zope.org/namespaces/tal" tal:attributes="name context/name; title context/title" /> -- http://lists.nuxeo.com/mailman/listinfo/z3lab-checkins