Index: documentViewer.py
===================================================================
--- documentViewer.py	(revision 501)
+++ documentViewer.py	(revision 503)
@@ -116,4 +116,5 @@
     # templates and forms
     viewer_text = PageTemplateFile('zpt/viewer_text', globals())
+    viewer_xml = PageTemplateFile('zpt/viewer_xml', globals())
     viewer_images = PageTemplateFile('zpt/viewer_images', globals())
     viewer_index = PageTemplateFile('zpt/viewer_index', globals())
@@ -259,15 +260,15 @@
   
     security.declareProtected('View','index_html')
-    def index_html(self,url,mode="texttool",viewMode="auto",viewType=None,tocMode="thumbs",start=1,pn=1):
+    def index_html(self,url,mode="texttool",viewMode="auto",viewLayer=None,tocMode="thumbs",start=1,pn=1):
         """
         view page
         @param url: url which contains display information
         @param mode: defines how to access the document behind url 
-        @param viewMode: 'images': display images, 'text': display text, default is 'auto'
-        @param viewType: sub-type of viewMode, e.g. 'dict' for viewMode='text'
+        @param viewMode: 'images': display images, 'text': display text, 'xml': display xml, default is 'auto'
+        @param viewLayer: sub-type of viewMode, e.g. 'dict' for viewMode='text'
         @param tocMode: type of 'table of contents' for navigation (thumbs, text, figures, none)
         """
         
-        logging.debug("documentViewer(index_html) mode=%s url=%s viewMode=%s viewType=%s start=%s pn=%s"%(mode,url,viewMode,viewType,start,pn))
+        logging.debug("documentViewer(index_html) mode=%s url=%s viewMode=%s viewLayer=%s start=%s pn=%s"%(mode,url,viewMode,viewLayer,start,pn))
         
         if not hasattr(self, 'template'):
@@ -289,5 +290,5 @@
             if docinfo.get('textURL', None) or docinfo.get('textURLPath', None): 
                 viewMode = "text"
-                viewType = "dict"
+                viewLayer = "dict"
             else:
                 viewMode = "images"
@@ -296,12 +297,12 @@
             # legacy fix
             viewMode = "text"
-            viewType = "dict"
-            
-        # stringify viewType
-        if isinstance(viewType, list):
-            logging.debug("index_html: viewType is list:%s"%viewType)
-            viewType = ','.join([t for t in viewType if t])
+            viewLayer = "dict"
+            
+        # stringify viewLayer
+        if isinstance(viewLayer, list):
+            logging.debug("index_html: viewLayer is list:%s"%viewLayer)
+            viewLayer = ','.join([t for t in viewLayer if t])
                         
-        pageinfo = self.getPageinfo(start=start, current=pn, docinfo=docinfo, viewMode=viewMode, viewType=viewType, tocMode=tocMode)
+        pageinfo = self.getPageinfo(start=start, current=pn, docinfo=docinfo, viewMode=viewMode, viewLayer=viewLayer, tocMode=tocMode)
                     
         # get template /template/viewer_$viewMode
@@ -704,10 +705,10 @@
     
 
-    def getPageinfo(self, current=None, start=None, rows=None, cols=None, docinfo=None, viewMode=None, viewType=None, tocMode=None):
+    def getPageinfo(self, current=None, start=None, rows=None, cols=None, docinfo=None, viewMode=None, viewLayer=None, tocMode=None):
         """returns pageinfo with the given parameters"""
-        logging.debug("getPageInfo(current=%s, start=%s, rows=%s, cols=%s, viewMode=%s, viewType=%s, tocMode=%s)"%(current,start,rows,cols,viewMode,viewType,tocMode))
+        logging.debug("getPageInfo(current=%s, start=%s, rows=%s, cols=%s, viewMode=%s, viewLayer=%s, tocMode=%s)"%(current,start,rows,cols,viewMode,viewLayer,tocMode))
         pageinfo = {}
         pageinfo['viewMode'] = viewMode
-        pageinfo['viewType'] = viewType
+        pageinfo['viewLayer'] = viewLayer
         pageinfo['tocMode'] = tocMode
 
@@ -731,5 +732,5 @@
             if docinfo.get('textURLPath', None):
                 # cache text page as well
-                pageinfo['textPage'] = self.getTextPage(mode=viewType, pn=current, docinfo=docinfo, pageinfo=pageinfo)
+                pageinfo['textPage'] = self.getTextPage(mode=viewLayer, pn=current, docinfo=docinfo, pageinfo=pageinfo)
                 np = int(docinfo.get('numPages', 0))
                 
