From fc45c836399f02806d24667670365fc1cc0f828b Mon Sep 17 00:00:00 2001
From: Alexander Golubev <fatzer2@gmail.com>
Date: Thu, 19 Mar 2026 05:17:02 +0300
Subject: [minor] Fixup indents and whitespaces

Signed-off-by: Alexander Golubev <fatzer2@gmail.com>
---
 src/kxsldbgpart/libtqtnotfier/xsldbgevent.cpp | 496 ++++++++--------
 src/kxsldbgpart/libxsldbg/debugXSL.cpp        | 628 ++++++++++-----------
 src/kxsldbgpart/libxsldbg/files.cpp           | 227 ++++----
 src/kxsldbgpart/libxsldbg/help_unix.cpp       |  10 +-
 src/kxsldbgpart/libxsldbg/nodeview_cmds.cpp   | 380 ++++++-------
 src/kxsldbgpart/libxsldbg/option_cmds.cpp     | 104 ++--
 src/kxsldbgpart/libxsldbg/xsldbg.cpp          | 780 +++++++++++++-------------
 7 files changed, 1309 insertions(+), 1316 deletions(-)

diff --git a/src/kxsldbgpart/libtqtnotfier/xsldbgevent.cpp b/src/kxsldbgpart/libtqtnotfier/xsldbgevent.cpp
index 0f377db..c96bf22 100644
--- a/src/kxsldbgpart/libtqtnotfier/xsldbgevent.cpp
+++ b/src/kxsldbgpart/libtqtnotfier/xsldbgevent.cpp
@@ -103,13 +103,13 @@ XsldbgEvent::XsldbgEvent(XsldbgMessageEnum type, const void *data)
       /* add an empty event data item which indicates the start of a list */
       eventData  = new XsldbgEventData();
       if (eventData != 0L)
-	list.append(eventData);
+        list.append(eventData);
     }
     for (int index = 0; index < arrayListCount(msgList->list); index++){
       msgData = ::arrayListGet(msgList->list, index);
       eventData = createEventData(msgList->type, msgData);
       if (eventData != 0L)
-	list.append(eventData);
+        list.append(eventData);
     }
     ::arrayListFree(msgList->list);
     msgList->list = 0L;
@@ -166,9 +166,9 @@ XsldbgEventData *XsldbgEvent::createEventData(XsldbgMessageEnum type, const void
     case XSLDBG_MSG_PROCESSING_RESULT:       /* 8: An error occured performing command
                                          * requested command */
       if (msgData != 0L){
-	xsldbgErrorMsgPtr msg = (xsldbgErrorMsgPtr)msgData;
-	if (msg->text)
-	  result->setText(0, XsldbgDebuggerBase::fromUTF8(msg->text));
+        xsldbgErrorMsgPtr msg = (xsldbgErrorMsgPtr)msgData;
+        if (msg->text)
+          result->setText(0, XsldbgDebuggerBase::fromUTF8(msg->text));
       }
       break;
 
@@ -178,7 +178,7 @@ XsldbgEventData *XsldbgEvent::createEventData(XsldbgMessageEnum type, const void
       break;
 
     case XSLDBG_MSG_FILE_CHANGED:    /* 10: Changed selection for source/data/output file */
-	// not used 
+      // not used
       break;
 
     case XSLDBG_MSG_BREAKPOINT_CHANGED:      /* 11: Response to a showbreak command */
@@ -199,31 +199,31 @@ XsldbgEventData *XsldbgEvent::createEventData(XsldbgMessageEnum type, const void
                                  * Free form text in file */
       /* this is actualy the  file to load */
       {
-	KURL url(XsldbgDebuggerBase::fromUTF8FileName((xmlChar*)msgData));
-	if (!url.isLocalFile()){
-	    tqDebug("Remote path to temp file %s unsupported, unable to read message from xsldbg", url.prettyURL().local8Bit().data());
-	    break;
-	}
-	    
-	TQString fileName = url.path();
-	TQString outputText;
-	if (!fileName.isNull()){
-	  TQFile file (fileName);
-	  if (file.open(IO_ReadOnly)){
-	    TQTextStream textFile(&file);
-	    TQString textIn = "";
-	    textFile.setEncoding(TQTextStream::UnicodeUTF8);
-	    while (1){
-	      textIn = textFile.readLine();
-	      if (textIn.isNull())
-		break;
-	      outputText.append(textIn).append("\n");
-	    }
-	    file.close();
-	  }
-	  outputText.append("\n");
-	  result->setText(0, outputText);
-	}
+        KURL url(XsldbgDebuggerBase::fromUTF8FileName((xmlChar*)msgData));
+        if (!url.isLocalFile()){
+          tqDebug("Remote path to temp file %s unsupported, unable to read message from xsldbg", url.prettyURL().local8Bit().data());
+          break;
+        }
+
+        TQString fileName = url.path();
+        TQString outputText;
+        if (!fileName.isNull()){
+          TQFile file (fileName);
+          if (file.open(IO_ReadOnly)){
+            TQTextStream textFile(&file);
+            TQString textIn = "";
+            textFile.setEncoding(TQTextStream::UnicodeUTF8);
+            while (1){
+              textIn = textFile.readLine();
+              if (textIn.isNull())
+                break;
+              outputText.append(textIn).append("\n");
+            }
+            file.close();
+          }
+          outputText.append("\n");
+          result->setText(0, outputText);
+        }
       }
       break;
 
@@ -325,15 +325,15 @@ void XsldbgEvent::emitMessage(XsldbgEventData *eventData)
 
     /* input status ( once thread is running) */
     case XSLDBG_MSG_AWAITING_INPUT:  /* 5: Waiting for user input */
-      	if  ((getInputReady() == 0) && (debugger->commandQueue().count() > 0)){
-		tqDebug("Command queue not empty");
-      		TQTimerEvent *e = new TQTimerEvent(debugger->getUpdateTimerID());
-      		TQApplication::postEvent(debugger, e);
-      	}
-	if (!updateText.isEmpty()){
-	  debugger->queueMessage(updateText);
-	  updateText = "";
-	}
+      if  ((getInputReady() == 0) && (debugger->commandQueue().count() > 0)){
+        tqDebug("Command queue not empty");
+        TQTimerEvent *e = new TQTimerEvent(debugger->getUpdateTimerID());
+        TQApplication::postEvent(debugger, e);
+      }
+      if (!updateText.isEmpty()){
+        debugger->queueMessage(updateText);
+        updateText = "";
+      }
       break;
 
     case XSLDBG_MSG_READ_INPUT:      /* 6: Read user input */
@@ -348,7 +348,7 @@ void XsldbgEvent::emitMessage(XsldbgEventData *eventData)
     case XSLDBG_MSG_PROCESSING_RESULT:       /* 8: An error occured performing command
                                          * requested command */
       if (!eventData->getText(0).isNull())
-	updateText.append(eventData->getText(0));
+        updateText.append(eventData->getText(0));
       break;
 
     case XSLDBG_MSG_LINE_CHANGED:    /* 9: Changed to new line number
@@ -357,11 +357,11 @@ void XsldbgEvent::emitMessage(XsldbgEventData *eventData)
       break;
 
     case XSLDBG_MSG_FILE_CHANGED:    /* 10: Loaded source/data file */
-	if (beenCreated == false){
-	    /* Empty data */
-	}else{
-	    emit debugger->fileDetailsChanged();
-	}
+      if (beenCreated == false){
+        /* Empty data */
+      }else{
+        emit debugger->fileDetailsChanged();
+      }
       break;
 
     case XSLDBG_MSG_BREAKPOINT_CHANGED:      /* 11: Response to a showbreak command */
@@ -379,13 +379,13 @@ void XsldbgEvent::emitMessage(XsldbgEventData *eventData)
       emit debugger->showMessage(eventData->getText(0));
       */
       if (!eventData->getText(0).isNull())
-	updateText.append(eventData->getText(0));
+        updateText.append(eventData->getText(0));
       break;
 
  case XSLDBG_MSG_FILEOUT:         /* 14 : Response to cat commmand */
       if (!eventData->getText(0).isNull())
-	updateText.append(eventData->getText(0));
-	break;
+        updateText.append(eventData->getText(0));
+      break;
 
     case XSLDBG_MSG_LOCALVAR_CHANGED:        /* 15 : Response to locals command ie a
                                          * local variable */
@@ -440,14 +440,14 @@ void XsldbgEvent::handleLineNoChanged(XsldbgEventData *eventData, const  void *m
     if (beenCreated == false){
       /* add our specific data to eventData*/
       if (xsldbgUrl() != 0L){
-	eventData->setText(0, XsldbgDebuggerBase::fromUTF8FileName(xsldbgUrl()));
-	eventData->setInt(0, xsldbgLineNo());
-	eventData->setInt(1, msgData != 0L);
+        eventData->setText(0, XsldbgDebuggerBase::fromUTF8FileName(xsldbgUrl()));
+        eventData->setInt(0, xsldbgLineNo());
+        eventData->setInt(1, msgData != 0L);
       }
     }else{
       /* emit the event data via debugger*/
       emit debugger->lineNoChanged(eventData->getText(0), eventData->getInt(0),
-				   eventData->getInt(1));
+                                   eventData->getInt(1));
     }
   }
 }
@@ -459,7 +459,7 @@ void XsldbgEvent::handleShowMessage(XsldbgEventData *eventData, const  void *msg
     if (beenCreated == false){
       /* add our specific data to eventData*/
       if (msgData != 0L){
-	eventData->setText(0, XsldbgDebuggerBase::fromUTF8((xmlChar*)msgData));
+        eventData->setText(0, XsldbgDebuggerBase::fromUTF8((xmlChar*)msgData));
       }
     }else{
       /* emit the event data via debugger*/
@@ -475,31 +475,31 @@ void XsldbgEvent::handleBreakpointItem(XsldbgEventData *eventData, const  void *
     if (beenCreated == false){
       /* add our specific data to eventData*/
       if (msgData != 0L){
-	breakPointPtr breakItem = (breakPointPtr)msgData;
-	/* set the file name*/
-	eventData->setText(0, XsldbgDebuggerBase::fromUTF8FileName(breakItem->url));
-	/* line number*/
-	eventData->setInt(0, (int)breakItem->lineNo);
-
-	/* templateName */
-	eventData->setText(1, XsldbgDebuggerBase::fromUTF8(breakItem->templateName));
-
-	/* modeName */
-	eventData->setText(2, XsldbgDebuggerBase::fromUTF8(breakItem->modeName));
-	/*  enabled state */
-	eventData->setInt(1, (int)(breakItem->flags & BREAKPOINT_ENABLED));
-
-	/* id value */
-	eventData->setInt(2, (int)breakItem->id);
+        breakPointPtr breakItem = (breakPointPtr)msgData;
+        /* set the file name*/
+        eventData->setText(0, XsldbgDebuggerBase::fromUTF8FileName(breakItem->url));
+        /* line number*/
+        eventData->setInt(0, (int)breakItem->lineNo);
+
+        /* templateName */
+        eventData->setText(1, XsldbgDebuggerBase::fromUTF8(breakItem->templateName));
+
+        /* modeName */
+        eventData->setText(2, XsldbgDebuggerBase::fromUTF8(breakItem->modeName));
+        /*  enabled state */
+        eventData->setInt(1, (int)(breakItem->flags & BREAKPOINT_ENABLED));
+
+        /* id value */
+        eventData->setInt(2, (int)breakItem->id);
       }
     }else{
       /* emit the event data via debugger*/
       emit debugger->breakpointItem(eventData->getText(0), /* file name*/
-				    eventData->getInt(0), /* line number*/
-				    eventData->getText(1), /* template name */
-				    eventData->getText(2), /* mode name */
-				    eventData->getInt(1),  /* enabled state*/
-				    eventData->getInt(2)  /* id*/);
+                                    eventData->getInt(0), /* line number*/
+                                    eventData->getText(1), /* template name */
+                                    eventData->getText(2), /* mode name */
+                                    eventData->getInt(1),  /* enabled state*/
+                                    eventData->getInt(2)  /* id*/);
     }
   }
 }
@@ -511,40 +511,40 @@ void XsldbgEvent::handleGlobalVariableItem(XsldbgEventData *eventData, const  vo
     if (beenCreated == false){
       /* add our specific data to eventData*/
       if (msgData != 0L){
-	xsltStackElemPtr item = (xsltStackElemPtr)msgData;
-	TQString name, fileName, selectXPath;
-	int lineNumber = -1;
-
-	/* variable name*/
-	if (item->nameURI)
-	  name = (XsldbgDebuggerBase::fromUTF8FileName(item->nameURI)).append(":");
-	name.append(XsldbgDebuggerBase::fromUTF8(item->name));
-
-
-
-	if (item->computed && item->comp && item->comp->inst && item->comp->inst->doc){
-	  fileName = XsldbgDebuggerBase::fromUTF8FileName(item->comp->inst->doc->URL);
-	  lineNumber= xmlGetLineNo(item->comp->inst);
-	}
-	
-	if (item->select)
-	    selectXPath   = XsldbgDebuggerBase::fromUTF8(item->select);
-
-	  eventData->setText(0, name);
-	  eventData->setText(1, "");
-	  eventData->setText(2, fileName);
-	  eventData->setText(3, selectXPath);
-	  eventData->setInt(0, lineNumber);
-	  eventData->setInt(1, 0); 
+        xsltStackElemPtr item = (xsltStackElemPtr)msgData;
+        TQString name, fileName, selectXPath;
+        int lineNumber = -1;
+
+        /* variable name*/
+        if (item->nameURI)
+          name = (XsldbgDebuggerBase::fromUTF8FileName(item->nameURI)).append(":");
+        name.append(XsldbgDebuggerBase::fromUTF8(item->name));
+
+
+
+        if (item->computed && item->comp && item->comp->inst && item->comp->inst->doc){
+          fileName = XsldbgDebuggerBase::fromUTF8FileName(item->comp->inst->doc->URL);
+          lineNumber= xmlGetLineNo(item->comp->inst);
+        }
+
+        if (item->select)
+          selectXPath   = XsldbgDebuggerBase::fromUTF8(item->select);
+
+        eventData->setText(0, name);
+        eventData->setText(1, "");
+        eventData->setText(2, fileName);
+        eventData->setText(3, selectXPath);
+        eventData->setInt(0, lineNumber);
+        eventData->setInt(1, 0);
       }
     }else{
       /* emit the event data via debugger*/
       emit debugger->variableItem(eventData->getText(0), /* variable name*/
-				       eventData->getText(1), /* templatecontext*/
-				       eventData->getText(2), /* file name */
-				       eventData->getInt(0), /* line number */
-				       eventData->getText(3), /* select XPath */
-				       eventData->getInt(1) /* Is this a local variable */ );
+                                  eventData->getText(1), /* templatecontext*/
+                                  eventData->getText(2), /* file name */
+                                  eventData->getInt(0), /* line number */
+                                  eventData->getText(3), /* select XPath */
+                                  eventData->getInt(1) /* Is this a local variable */ );
     }
   }
 }
@@ -556,58 +556,58 @@ void XsldbgEvent::handleLocalVariableItem(XsldbgEventData *eventData, const  voi
     if (beenCreated == false){
       /* add our specific data to eventData*/
       if (msgData != 0L){
-	xsltStackElemPtr item = (xsltStackElemPtr)msgData;
-	TQString name, templateContext, fileName, selectXPath;
-	int lineNumber = -1;
-	xmlNodePtr varXmlNode;
-
-	/* variable name */
-	if (item->nameURI)
-	  name = (XsldbgDebuggerBase::fromUTF8FileName(item->nameURI)).append(":");
-	name.append(XsldbgDebuggerBase::fromUTF8(item->name));
-
-	if (item->computed && item->comp && item->comp->inst){
-	  varXmlNode = item->comp->inst;
-
-	  /* try to find out what template this variable belongs to */
-	  if (varXmlNode->parent && IS_XSLT_NAME(varXmlNode->parent, "template")) {
-	    xmlChar* value = xmlGetProp(varXmlNode->parent, (xmlChar *) "name");
-	    if (value) {
-	      templateContext   = XsldbgDebuggerBase::fromUTF8(value);
-	      xmlFree(value);
-	    }else{
-	      value = xmlGetProp(varXmlNode->parent, (xmlChar *) "match");
-	      if (value) {
-		templateContext   = XsldbgDebuggerBase::fromUTF8(value);
-		xmlFree(value);
-	      }
-	    }
-	  }
-
-	  if (varXmlNode->doc)  {
-	    fileName = XsldbgDebuggerBase::fromUTF8FileName(varXmlNode->doc->URL);
-	    lineNumber = xmlGetLineNo(varXmlNode);
-	  }
-	
-	  if (item->select)
-		selectXPath   = XsldbgDebuggerBase::fromUTF8(item->select);
-
-	  eventData->setText(0, name);
-	  eventData->setText(1, templateContext);
-	  eventData->setText(2, fileName);
-	  eventData->setText(3, selectXPath);
-	  eventData->setInt(0, lineNumber);
-	  eventData->setInt(1, 1);
-	}
+        xsltStackElemPtr item = (xsltStackElemPtr)msgData;
+        TQString name, templateContext, fileName, selectXPath;
+        int lineNumber = -1;
+        xmlNodePtr varXmlNode;
+
+        /* variable name */
+        if (item->nameURI)
+          name = (XsldbgDebuggerBase::fromUTF8FileName(item->nameURI)).append(":");
+        name.append(XsldbgDebuggerBase::fromUTF8(item->name));
+
+        if (item->computed && item->comp && item->comp->inst){
+          varXmlNode = item->comp->inst;
+
+          /* try to find out what template this variable belongs to */
+          if (varXmlNode->parent && IS_XSLT_NAME(varXmlNode->parent, "template")) {
+            xmlChar* value = xmlGetProp(varXmlNode->parent, (xmlChar *) "name");
+            if (value) {
+              templateContext   = XsldbgDebuggerBase::fromUTF8(value);
+              xmlFree(value);
+            }else{
+              value = xmlGetProp(varXmlNode->parent, (xmlChar *) "match");
+              if (value) {
+                templateContext   = XsldbgDebuggerBase::fromUTF8(value);
+                xmlFree(value);
+              }
+            }
+          }
+
+          if (varXmlNode->doc)  {
+            fileName = XsldbgDebuggerBase::fromUTF8FileName(varXmlNode->doc->URL);
+            lineNumber = xmlGetLineNo(varXmlNode);
+          }
+
+          if (item->select)
+            selectXPath   = XsldbgDebuggerBase::fromUTF8(item->select);
+
+          eventData->setText(0, name);
+          eventData->setText(1, templateContext);
+          eventData->setText(2, fileName);
+          eventData->setText(3, selectXPath);
+          eventData->setInt(0, lineNumber);
+          eventData->setInt(1, 1);
+        }
       }
     }else{
       /* emit the event data via debugger*/
       emit debugger->variableItem(eventData->getText(0), /* variable name*/
-				       eventData->getText(1), /* templatecontext*/
-				       eventData->getText(2), /* file name */
-				       eventData->getInt(0), /* line number */
-				       eventData->getText(3), /* select XPath */
-				       eventData->getInt(1) /* Is this a local variable */ );
+                                  eventData->getText(1), /* templatecontext*/
+                                  eventData->getText(2), /* file name */
+                                  eventData->getInt(0), /* line number */
+                                  eventData->getText(3), /* select XPath */
+                                  eventData->getInt(1) /* Is this a local variable */ );
     }
   }
 }
@@ -619,35 +619,35 @@ if (eventData != 0L){
     if (beenCreated == false){
       /* add our specific data to eventData*/
       if(msgData != 0L){
-	xsltTemplatePtr item = (xsltTemplatePtr)msgData;
-	TQString name, mode,  fileName;
-	int lineNumber = -1;
-
-	if (item->nameURI)
-	  name.append(XsldbgDebuggerBase::fromUTF8FileName(item->nameURI)).append(":");
-
-	if (item->name)
-	  name.append(XsldbgDebuggerBase::fromUTF8(item->name));
-	else if (item->match)
-	  name.append(XsldbgDebuggerBase::fromUTF8(item->match));
-
-	mode = XsldbgDebuggerBase::fromUTF8(item->mode);
-
-	if (item->elem && item->elem->doc){
-	  fileName = XsldbgDebuggerBase::fromUTF8FileName(item->elem->doc->URL);
-	  lineNumber = xmlGetLineNo(item->elem);
-	}
-	eventData->setText(0, name);
-	eventData->setText(1, mode);
-	eventData->setText(2, fileName);
-	eventData->setInt(0, lineNumber);
+        xsltTemplatePtr item = (xsltTemplatePtr)msgData;
+        TQString name, mode,  fileName;
+        int lineNumber = -1;
+
+        if (item->nameURI)
+          name.append(XsldbgDebuggerBase::fromUTF8FileName(item->nameURI)).append(":");
+
+        if (item->name)
+          name.append(XsldbgDebuggerBase::fromUTF8(item->name));
+        else if (item->match)
+          name.append(XsldbgDebuggerBase::fromUTF8(item->match));
+
+        mode = XsldbgDebuggerBase::fromUTF8(item->mode);
+
+        if (item->elem && item->elem->doc){
+          fileName = XsldbgDebuggerBase::fromUTF8FileName(item->elem->doc->URL);
+          lineNumber = xmlGetLineNo(item->elem);
+        }
+        eventData->setText(0, name);
+        eventData->setText(1, mode);
+        eventData->setText(2, fileName);
+        eventData->setInt(0, lineNumber);
       }
     }else{
       /* emit the event data via debugger*/
       emit debugger->templateItem(eventData->getText(0), /* tempalte name*/
-				  eventData->getText(1), /* mode*/
-				  eventData->getText(2), /* file name*/
-				  eventData->getInt(0) /* line number*/);
+                                  eventData->getText(1), /* mode*/
+                                  eventData->getText(2), /* file name*/
+                                  eventData->getInt(0) /* line number*/);
     }
   }
 
@@ -660,26 +660,26 @@ void XsldbgEvent::handleIncludedSourceItem(XsldbgEventData *eventData, const  vo
     if (beenCreated == false){
       /* add our specific data to eventData*/
       if (msgData != 0L){
-	xmlNodePtr item = (xmlNodePtr)msgData;
-	TQString name,  fileName;
-	int lineNumber = -1;
-
-	if (item->doc)
-	  name = XsldbgDebuggerBase::fromUTF8FileName(item->doc->URL);
-
-	if (item->parent && item->parent->doc){
-	  fileName = XsldbgDebuggerBase::fromUTF8FileName(item->parent->doc->URL);
-	  lineNumber = xmlGetLineNo((xmlNodePtr)item->parent->doc);
-	}
-	eventData->setText(0, name);
-	eventData->setText(1, fileName);
-	eventData->setInt(0, lineNumber);
+        xmlNodePtr item = (xmlNodePtr)msgData;
+        TQString name,  fileName;
+        int lineNumber = -1;
+
+        if (item->doc)
+          name = XsldbgDebuggerBase::fromUTF8FileName(item->doc->URL);
+
+        if (item->parent && item->parent->doc){
+          fileName = XsldbgDebuggerBase::fromUTF8FileName(item->parent->doc->URL);
+          lineNumber = xmlGetLineNo((xmlNodePtr)item->parent->doc);
+        }
+        eventData->setText(0, name);
+        eventData->setText(1, fileName);
+        eventData->setInt(0, lineNumber);
       }
     }else{
       /* emit the event data via debugger*/
       emit debugger->sourceItem(eventData->getText(0), /* file name*/
-				eventData->getText(1), /* parent file name*/
-				eventData->getInt(0) /* parent line number*/);
+                                eventData->getText(1), /* parent file name*/
+                                eventData->getInt(0) /* parent line number*/);
     }
   }
 }
@@ -690,27 +690,27 @@ void XsldbgEvent::handleSourceItem(XsldbgEventData *eventData, const  void *msgD
     if (beenCreated == false){
       /* add our specific data to eventData*/
       if (msgData != 0L){
-	xsltStylesheetPtr item = (xsltStylesheetPtr)msgData;
-	TQString name,  fileName;
-	int lineNumber = -1;
+        xsltStylesheetPtr item = (xsltStylesheetPtr)msgData;
+        TQString name,  fileName;
+        int lineNumber = -1;
 
-	if (item->doc)
-	  name = XsldbgDebuggerBase::fromUTF8FileName(item->doc->URL);
+        if (item->doc)
+          name = XsldbgDebuggerBase::fromUTF8FileName(item->doc->URL);
 
-	if (item->parent && item->parent->doc){
-	  fileName = XsldbgDebuggerBase::fromUTF8FileName(item->parent->doc->URL);
-	  lineNumber = xmlGetLineNo((xmlNodePtr)item->parent->doc);
-	}
+        if (item->parent && item->parent->doc){
+          fileName = XsldbgDebuggerBase::fromUTF8FileName(item->parent->doc->URL);
+          lineNumber = xmlGetLineNo((xmlNodePtr)item->parent->doc);
+        }
 
-	eventData->setText(0, name);
-	eventData->setText(1, fileName);
-	eventData->setInt(0, lineNumber);
+        eventData->setText(0, name);
+        eventData->setText(1, fileName);
+        eventData->setInt(0, lineNumber);
       }
     }else{
       /* emit the event data via debugger*/
       emit debugger->sourceItem(eventData->getText(0), /* name*/
-				eventData->getText(1), /* parent file name*/
-				eventData->getInt(0) /* parent line number*/);
+                                eventData->getText(1), /* parent file name*/
+                                eventData->getInt(0) /* parent line number*/);
     }
   }
 }
@@ -721,19 +721,19 @@ void XsldbgEvent::handleParameterItem(XsldbgEventData *eventData, const  void *m
     if (beenCreated == false){
       /* add our specific data to eventData*/
       if (msgData != 0L){
-	parameterItemPtr paramItem = (parameterItemPtr)msgData;
-	TQString name, value;
+        parameterItemPtr paramItem = (parameterItemPtr)msgData;
+        TQString name, value;
 
-	name = XsldbgDebuggerBase::fromUTF8(paramItem->name);
-	value = XsldbgDebuggerBase::fromUTF8(paramItem->value);
+        name = XsldbgDebuggerBase::fromUTF8(paramItem->name);
+        value = XsldbgDebuggerBase::fromUTF8(paramItem->value);
 
-	eventData->setText(0, name);
-	eventData->setText(1, value);
+        eventData->setText(0, name);
+        eventData->setText(1, value);
       }
     }else{
       /* emit the event data via debugger*/
       emit debugger->parameterItem(eventData->getText(0), /* param name*/
-				   eventData->getText(1) /* param value*/);
+                                   eventData->getText(1) /* param value*/);
     }
   }
 }
@@ -745,26 +745,26 @@ void XsldbgEvent::handleCallStackItem(XsldbgEventData *eventData, const  void *m
     if (beenCreated == false){
       /* add our specific data to eventData*/
       if (msgData != 0L){
-	callPointPtr item = (callPointPtr)msgData;
-	TQString templateName,  fileName;
-	int lineNumber = -1;
-
-	/* template name */
-	if (item->info){
-	  templateName = XsldbgDebuggerBase::fromUTF8(item->info->templateName);
-	  fileName = XsldbgDebuggerBase::fromUTF8FileName(item->info->url);
-	  lineNumber = item->lineNo;
-	}
-
-	eventData->setText(0, templateName);
-	eventData->setText(1, fileName);
-	eventData->setInt(0, lineNumber);
+        callPointPtr item = (callPointPtr)msgData;
+        TQString templateName,  fileName;
+        int lineNumber = -1;
+
+        /* template name */
+        if (item->info){
+          templateName = XsldbgDebuggerBase::fromUTF8(item->info->templateName);
+          fileName = XsldbgDebuggerBase::fromUTF8FileName(item->info->url);
+          lineNumber = item->lineNo;
+        }
+
+        eventData->setText(0, templateName);
+        eventData->setText(1, fileName);
+        eventData->setInt(0, lineNumber);
       }
     }else{
       /* emit the event data via debugger*/
       emit debugger->callStackItem(eventData->getText(0), /* template name*/
-				   eventData->getText(1), /* fileName */
-				   eventData->getInt(0) /* line number*/);
+                                   eventData->getText(1), /* fileName */
+                                   eventData->getInt(0) /* line number*/);
     }
   }
 }
@@ -776,19 +776,19 @@ void XsldbgEvent::handleEntityItem(XsldbgEventData *eventData, const  void *msgD
     if (beenCreated == false){
       /* add our specific data to eventData*/
       if (msgData != 0L){
-	TQString SystemID, PublicID;
+        TQString SystemID, PublicID;
 
-	entityInfoPtr info =  (entityInfoPtr)msgData;
-	SystemID = XsldbgDebuggerBase::fromUTF8FileName(info->SystemID);
-	PublicID = XsldbgDebuggerBase::fromUTF8(info->PublicID);
+        entityInfoPtr info =  (entityInfoPtr)msgData;
+        SystemID = XsldbgDebuggerBase::fromUTF8FileName(info->SystemID);
+        PublicID = XsldbgDebuggerBase::fromUTF8(info->PublicID);
 
-	eventData->setText(0, SystemID);
-	eventData->setText(1, PublicID);
+        eventData->setText(0, SystemID);
+        eventData->setText(1, PublicID);
       }
     }else{
       /* emit the event data via debugger*/
       emit debugger->entityItem(eventData->getText(0), /* SystemID*/
-				eventData->getText(1) /* PublicID*/);
+                                eventData->getText(1) /* PublicID*/);
     }
   }
 }
@@ -800,9 +800,9 @@ void XsldbgEvent::handleResolveItem(XsldbgEventData *eventData, const  void *msg
     if (beenCreated == false){
       /* add our specific data to eventData*/
       if (msgData != 0L){
-	TQString URI = XsldbgDebuggerBase::fromUTF8FileName((const xmlChar*)msgData);
+        TQString URI = XsldbgDebuggerBase::fromUTF8FileName((const xmlChar*)msgData);
 
-	eventData->setText(0, URI);
+        eventData->setText(0, URI);
       }
     }else{
       /* emit the event data via debugger*/
@@ -818,14 +818,14 @@ void XsldbgEvent::handleIntOptionItem(XsldbgEventData *eventData, const  void *m
     if (beenCreated == false){
       /* add our specific data to eventData*/
       if (msgData != 0L){
-	parameterItemPtr paramItem = (parameterItemPtr)msgData;
-	eventData->setText(0, XsldbgDebuggerBase::fromUTF8(paramItem->name));
-	eventData->setInt(0, paramItem->intValue);
+        parameterItemPtr paramItem = (parameterItemPtr)msgData;
+        eventData->setText(0, XsldbgDebuggerBase::fromUTF8(paramItem->name));
+        eventData->setInt(0, paramItem->intValue);
       }
     }else{
       /* emit the event data via debugger*/
       emit debugger->intOptionItem(eventData->getText(0), /* option name*/
-				   eventData->getInt(0) /* value*/);
+                                   eventData->getInt(0) /* value*/);
     }
   }
 }
@@ -837,14 +837,14 @@ void XsldbgEvent::handleStringOptionItem(XsldbgEventData *eventData, const  void
     if (beenCreated == false){
       /* add our specific data to eventData*/
       if (msgData != 0L){
-	parameterItemPtr paramItem = (parameterItemPtr)msgData;
-	eventData->setText(0, XsldbgDebuggerBase::fromUTF8(paramItem->name));
-	eventData->setText(1, XsldbgDebuggerBase::fromUTF8(paramItem->value));
+        parameterItemPtr paramItem = (parameterItemPtr)msgData;
+        eventData->setText(0, XsldbgDebuggerBase::fromUTF8(paramItem->name));
+        eventData->setText(1, XsldbgDebuggerBase::fromUTF8(paramItem->value));
       }
     }else{
       /* emit the event data via debugger*/
       emit debugger->stringOptionItem(eventData->getText(0), /* option name*/
-				   eventData->getText(1) /* value*/);
+                                      eventData->getText(1) /* value*/);
     }
   }
 }
diff --git a/src/kxsldbgpart/libxsldbg/debugXSL.cpp b/src/kxsldbgpart/libxsldbg/debugXSL.cpp
index 481793d..c865713 100644
--- a/src/kxsldbgpart/libxsldbg/debugXSL.cpp
+++ b/src/kxsldbgpart/libxsldbg/debugXSL.cpp
@@ -17,7 +17,7 @@
  ***************************************************************************/
 
 /*
- * Orinal file : debugXML.c : This is a set of routines used for 
+ * Orinal file : debugXML.c : This is a set of routines used for
  *              debugging the tree produced by the XML parser.
  *
  * New file : shell.c : Debug support version
@@ -25,7 +25,7 @@
  * See Copyright for the status of this software.
  *
  * Daniel Veillard <daniel@veillard.com>
- * 
+ *
  * Permission obtained to modify the LGPL'd code and extend to include breakpoints, inspections of
  * stylesheet source, xml data, stylesheet variables
  */
@@ -78,7 +78,7 @@ extern FILE *terminalIO;
 
 int xsldbgStop = 0;
 int xsldbgValidateBreakpoints = BREAKPOINTS_NEED_VALIDATION;
-int xsldbgHasLineNumberFix;  
+int xsldbgHasLineNumberFix;
 bool xsldbgReachedFirstTemplate = false;
 
 /* valid commands of xslDbgShell */
@@ -160,7 +160,7 @@ const char *commandNames[] = {
 
     /*variable value change */
     "set",
-    
+
     /* language change */
     "lang",
 
@@ -323,8 +323,8 @@ int xslDbgCd(xsltTransformContextPtr styleCtxt, xmlShellCtxtPtr ctxt,
 
 /**
  * xslDbgPrintCallStack:
- * @arg : the number of frame to print, NULL if all items 
- * 
+ * @arg : the number of frame to print, NULL if all items
+ *
  * Print all items found on the callStack
  *
  * Returns 1 on success,
@@ -337,7 +337,7 @@ int xslDbgPrintCallStack(const xmlChar * arg);
  * xslDbgSleep:
  * @delay : the number of microseconds to delay exection by
  *
- * Delay execution by a specified number of microseconds. On some system 
+ * Delay execution by a specified number of microseconds. On some system
  *      this will not be at all accurate.
  */
 void xslDbgSleep(long delay);
@@ -362,8 +362,8 @@ int xslDbgWalkContinue(void);
  * @payload : valid breakPointPtr
  * @data : not used
  * @name : not used
- * 
- * Convert payload into format needed, and add to search dataBase 
+ *
+ * Convert payload into format needed, and add to search dataBase
  */
 void
   addBreakPointNode(void *payload, void *data,
@@ -375,8 +375,8 @@ void
  * @payload : valid xsltStylesheetPtr
  * @data : not used
  * @name : not used
- * 
- * Convert payload into format needed, and add to search dataBase 
+ *
+ * Convert payload into format needed, and add to search dataBase
  */
 void
   addSourceNode(void *payload, void *data,
@@ -388,8 +388,8 @@ void
  * @payload : valid xsltTemplatePtr
  * @data : not used
  * @name : not used
- * 
- * Convert payload into format needed, and add to search dataBase 
+ *
+ * Convert payload into format needed, and add to search dataBase
  */
 void
   addTemplateNode(void *payload, void *data,
@@ -400,8 +400,8 @@ void
  * @payload : valid xmlNodePtr of global variable
  * @data : not used
  * @name : not used
- * 
- * Convert payload into format needed, and add to search dataBase 
+ *
+ * Convert payload into format needed, and add to search dataBase
  */
 void
   addGlobalNode(void *payload, void *data,
@@ -412,8 +412,8 @@ void
  * @payload : valid xmlNodePtr of local variable
  * @data : not used
  * @name : not used
- * 
- * Convert payload into format needed, and add to search dataBase 
+ *
+ * Convert payload into format needed, and add to search dataBase
  */
 void
   addLocalNode(void *payload, void *data,
@@ -425,8 +425,8 @@ void
  * @payload : valid xmlNodePtr of include instuction
  * @data : not used
  * @name : not used
- * 
- * Convert payload into format needed, and add to search dataBase 
+ *
+ * Convert payload into format needed, and add to search dataBase
  */
 void
   addIncludeNode(void *payload, void *data,
@@ -436,8 +436,8 @@ void
 
 /**
  * addCallStackItems:
- * 
- * Convert call stack items into format needed, and add to search dataBase 
+ *
+ * Convert call stack items into format needed, and add to search dataBase
  */
 void
   addCallStackItems(void);
@@ -450,7 +450,7 @@ void
  * @filename: Not used
  * @input: The function to call to when reading commands from stdio
  * @output: Where to put the results
- * @styleCtxt: Is valid 
+ * @styleCtxt: Is valid
  *
  * Present to the user the xsldbg shell
  */
@@ -459,7 +459,7 @@ void shellPrompt(xmlNodePtr source, xmlNodePtr doc,
                  xmlShellReadlineFunc input,
                  FILE * output, xsltTransformContextPtr styleCtxt);
 
-/* ------------------------------------- 
+/* -------------------------------------
     End private functions
 ---------------------------------------*/
 
@@ -467,7 +467,7 @@ void shellPrompt(xmlNodePtr source, xmlNodePtr doc,
 
 /**
  * debugXSLGetTemplate:
- * 
+ *
  * Return the last template node found, if an
  *
  * Returns The last template node found, if any
@@ -480,9 +480,9 @@ debugXSLGetTemplate(void)
 
 
 /****************************************************************
- *								*
- *	 	The XSL shell related functions			*
- *								*
+ *                                                              *
+ *              The XSL shell related functions                 *
+ *                                                              *
  ****************************************************************/
 
 
@@ -491,7 +491,7 @@ debugXSLGetTemplate(void)
  * @styleCtxt : current stylesheet context
  * @ctxt : current shell context
  * @arg : path to change to and in UTF-8
- * @source : is valid 
+ * @source : is valid
  *
  * Returns 1 on success,
  *         0 otherwise
@@ -623,8 +623,8 @@ xslDbgCd(xsltTransformContextPtr styleCtxt, xmlShellCtxtPtr ctxt,
 
 /**
  * xslDbgPrintCallStack:
- * @arg : the number of frame to print, NULL if all items 
- * 
+ * @arg : the number of frame to print, NULL if all items
+ *
  * Print all items found on the callStack
  *
  * Returns 1 on success,
@@ -649,83 +649,83 @@ xslDbgPrintCallStack(const xmlChar * arg)
             }
             notifyListSend();
         } else {
-	    xmlChar *nameTemp, *modeTemp; 
+            xmlChar *nameTemp, *modeTemp;
             for (depth = callStackGetDepth(); depth >= 1; depth--) {
                 callPointItem = callStackGet(depth);
-		nameTemp = NULL;
-		modeTemp = NULL;
+                nameTemp = NULL;
+                modeTemp = NULL;
                 if (callPointItem && callPointItem->info) {
                     if (depth == callStackGetDepth()) {
                         xmlChar *curUrl = xsldbgUrl();
                         long curLine = xsldbgLineNo();
                         /* if possible list the current location */
                         if (rootCopy && (rootCopy->match || rootCopy->name)
-                            && curUrl) {			    
-			    xmlChar *rootNameTemp, *rootModeTemp;
-			    rootNameTemp = fullTQName(rootCopy->nameURI, rootCopy->name);
-			    rootModeTemp = fullTQName(rootCopy->modeURI, rootCopy->mode);
-			    if (rootNameTemp && rootModeTemp){
-			      if (rootCopy->match)
-			        /* display information about the current XSLT template */
+                            && curUrl) {
+                            xmlChar *rootNameTemp, *rootModeTemp;
+                            rootNameTemp = fullTQName(rootCopy->nameURI, rootCopy->name);
+                            rootModeTemp = fullTQName(rootCopy->modeURI, rootCopy->mode);
+                            if (rootNameTemp && rootModeTemp){
+                              if (rootCopy->match)
+                                /* display information about the current XSLT template */
                                 xsldbgGenericErrorFunc(i18n("#%1 template: \"%2\" mode: \"%3\"").arg(depth).arg(xsldbgText(rootCopy->match)).arg(xsldbgText(rootModeTemp)));
-			      else
-			        /* display information about the current XSLT template */
+                              else
+                                /* display information about the current XSLT template */
                                 xsldbgGenericErrorFunc(i18n("#%1 template: \"%2\" mode: \"%3\"").arg(depth).arg(xsldbgText(rootNameTemp)).arg(xsldbgText(rootModeTemp)));
-			      /* display where we are in the source/document file */	
-			      xsldbgGenericErrorFunc(i18n(" in file \"%1\" at line %2\n").arg(xsldbgUrl(curUrl)).arg(curLine));
-			    }else{
-			      xsldbgGenericErrorFunc(i18n("Error: Out of memory.\n"));
-			      result = 0;
-			    }
-			    if (rootNameTemp){
-			      xmlFree(rootNameTemp);
-			      rootNameTemp = NULL;
-			    }
-			    if (rootModeTemp){
-			      xmlFree(rootModeTemp);
-			      rootModeTemp = NULL;
-			    }
+                              /* display where we are in the source/document file */
+                              xsldbgGenericErrorFunc(i18n(" in file \"%1\" at line %2\n").arg(xsldbgUrl(curUrl)).arg(curLine));
+                            }else{
+                              xsldbgGenericErrorFunc(i18n("Error: Out of memory.\n"));
+                              result = 0;
+                            }
+                            if (rootNameTemp){
+                              xmlFree(rootNameTemp);
+                              rootNameTemp = NULL;
+                            }
+                            if (rootModeTemp){
+                              xmlFree(rootModeTemp);
+                              rootModeTemp = NULL;
+                            }
                         } else if (curUrl) {
-			    /* display information about the current XSLT template */
+                            /* display information about the current XSLT template */
                             xsldbgGenericErrorFunc(i18n("#%1 template: \"LIBXSLT_DEFAULT\" mode: \"\"").arg(depth));
-			    /* display where we are in the source/document file */	
+                            /* display where we are in the source/document file */
                             xsldbgGenericErrorFunc(i18n(" in file \"%1\" at line %2\n").arg(xsldbgUrl(curUrl)).arg(curLine));
                         }
                         if (curUrl)
                             xmlFree(curUrl);
 
                     }
-		    nameTemp = fullTQName(callPointItem->info->templateURI,
-					 callPointItem->info->templateName);
-		    modeTemp = fullTQName(callPointItem->info->modeURI,
-					 callPointItem->info->modeName);
-		    if (nameTemp && modeTemp){
-		      /* display information about the current XSLT template */
-		      xsldbgGenericErrorFunc(i18n("#%1 template: \"%2\" mode: \"%3\"").arg(depth - 1).arg(xsldbgText(nameTemp)).arg(xsldbgText(modeTemp)));
-		      if (callPointItem->info->url)
-			/* display where we are in the source/document file */	
-                        xsldbgGenericErrorFunc(i18n(" in file \"%1\" at line %2\n").arg(xsldbgUrl(callPointItem->info->url)).arg(callPointItem->lineNo));
-		      else
-                        xsldbgGenericErrorFunc("\n");
-		    }else{
-		      xsldbgGenericErrorFunc(i18n("Error: Out of memory.\n"));
-		      result = 0;
-		    }
-		    if (nameTemp){ 
-		      xmlFree(nameTemp);
-		      nameTemp = NULL;
-		    }
-		    if(modeTemp){
-		      xmlFree(modeTemp);
-		      modeTemp = NULL;
-		    }
-		    
+                    nameTemp = fullTQName(callPointItem->info->templateURI,
+                                          callPointItem->info->templateName);
+                    modeTemp = fullTQName(callPointItem->info->modeURI,
+                                          callPointItem->info->modeName);
+                    if (nameTemp && modeTemp){
+                        /* display information about the current XSLT template */
+                        xsldbgGenericErrorFunc(i18n("#%1 template: \"%2\" mode: \"%3\"").arg(depth - 1).arg(xsldbgText(nameTemp)).arg(xsldbgText(modeTemp)));
+                        if (callPointItem->info->url)
+                            /* display where we are in the source/document file */
+                            xsldbgGenericErrorFunc(i18n(" in file \"%1\" at line %2\n").arg(xsldbgUrl(callPointItem->info->url)).arg(callPointItem->lineNo));
+                        else
+                            xsldbgGenericErrorFunc("\n");
+                    }else{
+                        xsldbgGenericErrorFunc(i18n("Error: Out of memory.\n"));
+                        result = 0;
+                    }
+                    if (nameTemp){
+                        xmlFree(nameTemp);
+                        nameTemp = NULL;
+                    }
+                    if(modeTemp){
+                        xmlFree(modeTemp);
+                        modeTemp = NULL;
+                    }
+
                 } else {
 #ifdef WITH_XSLDBG_DEBUG_PROCESS
                     xsltGenericError(xsltGenericErrorContext,
                                      "Error: Call stack item not found at depth %d : xslDbgPrintCallStack\n", depth);
 #endif
-		    result = 0;
+                    result = 0;
                     break;
                 }
             }
@@ -739,24 +739,24 @@ xslDbgPrintCallStack(const xmlChar * arg)
 
 
         if (getThreadStatus() == XSLDBG_MSG_THREAD_RUN) {
-            /* should never happen but just in case, when running as a 
+            /* should never happen but just in case, when running as a
              * thread always provide NO params to the where command */
 #ifdef WITH_XSLDBG_DEBUG_PROCESS
             xsltGenericError(xsltGenericErrorContext,
                              "Error: Notification of a frame not supported\n");
 #endif
-	    result = 0;
+            result = 0;
             return result;
         }
 
         if (templateDepth >= 0) {
             callPointItem = callStackGet(templateDepth + 1);
             if (callPointItem && callPointItem->info) {
-		/* display information about the current XSLT template */
+                /* display information about the current XSLT template */
                 xsldbgGenericErrorFunc(i18n("#%1 template: \"%2\"").arg(templateDepth).arg(xsldbgText(callPointItem->info->templateName)));
                 /* should alays be present but .. */
                 if (callPointItem->info->url)
-		    /* display where we are in the source/document file */	
+                    /* display where we are in the source/document file */
                     xsldbgGenericErrorFunc(i18n(" in file \"%1\" at line %2\n").arg(xsldbgUrl(callPointItem->info->url)).arg(callPointItem->lineNo));
                 else
                     xsldbgGenericErrorFunc("\n");
@@ -765,7 +765,7 @@ xslDbgPrintCallStack(const xmlChar * arg)
                 xsltGenericError(xsltGenericErrorContext,
                                  "Error: Call stack item not found at templateDepth %d : xslDbgPrintCallStack\n", depth);
 #endif
-		result = 0;
+                result = 0;
             }
         }
     }
@@ -777,7 +777,7 @@ xslDbgPrintCallStack(const xmlChar * arg)
  * xslDbgSleep:
  * @delay : the number of microseconds to delay exection by
  *
- * Delay execution by a specified number of microseconds. On some system 
+ * Delay execution by a specified number of microseconds. On some system
  *      this will not be at all accurate.
  */
 void
@@ -789,8 +789,8 @@ xslDbgSleep(long delay)
 #ifdef WIN32
     Sleep(delay / 1000);
 #else
-    /* try to delay things by doing a lot of floating point 
-     * multiplication   
+    /* try to delay things by doing a lot of floating point
+     * multiplication
      */
     long loop1, loop2;
     float f1 = 1.0000001, f2;
@@ -853,8 +853,8 @@ xslDbgWalkContinue(void)
  * @payload : valid breakPointPtr
  * @data : not used
  * @name : not used
- * 
- * Convert payload into format needed, and add to search dataBase 
+ *
+ * Convert payload into format needed, and add to search dataBase
  */
 void
 addBreakPointNode(void *payload, void *data,
@@ -873,8 +873,8 @@ addBreakPointNode(void *payload, void *data,
  * @payload : valid xsltStylesheetPtr
  * @data : not used
  * @name : not used
- * 
- * Convert payload into format needed, and add to search dataBase 
+ *
+ * Convert payload into format needed, and add to search dataBase
  */
 void
 addSourceNode(void *payload, void *data,
@@ -893,8 +893,8 @@ addSourceNode(void *payload, void *data,
  * @payload : valid xsltTemplatePtr
  * @data : not used
  * @name : not used
- * 
- * Convert payload into format needed, and add to search dataBase 
+ *
+ * Convert payload into format needed, and add to search dataBase
  */
 void
 addTemplateNode(void *payload, void *data,
@@ -913,8 +913,8 @@ addTemplateNode(void *payload, void *data,
  * @payload : valid xmlNodePtr of global variable
  * @data : not used
  * @name : not used
- * 
- * Convert payload into format needed, and add to search dataBase 
+ *
+ * Convert payload into format needed, and add to search dataBase
  */
 void
 addGlobalNode(void *payload, void *data,
@@ -933,8 +933,8 @@ addGlobalNode(void *payload, void *data,
  * @payload : valid xmlNodePtr of local variable
  * @data : not used
  * @name : not used
- * 
- * Convert payload into format needed, and add to search dataBase 
+ *
+ * Convert payload into format needed, and add to search dataBase
  */
 void
 addLocalNode(void *payload, void *data,
@@ -953,8 +953,8 @@ addLocalNode(void *payload, void *data,
  * @payload : valid xmlNodePtr of include instuction
  * @data : not used
  * @name : not used
- * 
- * Convert payload into format needed, and add to search dataBase 
+ *
+ * Convert payload into format needed, and add to search dataBase
  */
 void
 addIncludeNode(void *payload, void *data,
@@ -970,8 +970,8 @@ addIncludeNode(void *payload, void *data,
 
 /**
  * addCallStackItems:
- * 
- * Convert call stack items into format needed, and add to search dataBase 
+ *
+ * Convert call stack items into format needed, and add to search dataBase
  */
 void
 addCallStackItems(void)
@@ -1063,7 +1063,7 @@ debugXSLBreak(xmlNodePtr templ, xmlNodePtr node, xsltTemplatePtr root,
     static char mybuff[6] = " 0\n\x0";
 
     if (ctxt && templ && root && !xsldbgReachedFirstTemplate)
-	xsldbgReachedFirstTemplate = true;
+        xsldbgReachedFirstTemplate = true;
 
     if (templ == NULL) {
         tempDoc = xmlNewDoc((xmlChar *) "1.0");
@@ -1095,53 +1095,53 @@ debugXSLBreak(xmlNodePtr templ, xmlNodePtr node, xsltTemplatePtr root,
     }
     if (root) {
         xmlChar *nameTemp = NULL, *modeTemp = NULL;
-	nameTemp = fullTQName(root->nameURI, root->name);
-	modeTemp = fullTQName(root->modeURI, root->mode);
-	if (!nextCommandActive){
-	  /* we only want messages if we are not
-	    in the process of completing the next command */
-	  if (terminalIO == NULL) {
+        nameTemp = fullTQName(root->nameURI, root->name);
+        modeTemp = fullTQName(root->modeURI, root->mode);
+        if (!nextCommandActive){
+            /* we only want messages if we are not
+               in the process of completing the next command */
+            if (terminalIO == NULL) {
 
             if (root->match){
                 xsldbgGenericErrorFunc(i18n("\nReached template: \"%1\" mode: \"%2\"\n").arg(xsldbgText(root->match)).arg(xsldbgText(modeTemp)));
-		if (lastTemplate != root->match && buffer){
-		    xmlBufferCCat(buffer, "\nreached matched template:");
-		    xmlBufferCat(buffer, root->match); 
-		    xmlBufferCCat(buffer, mybuff);
-		    xsltCopyTextString(ctxt, ctxt->insert,xmlBufferContent(buffer),0);
-		    mybuff[1]++;
-		    lastTemplate = root->match;
-		}
+                if (lastTemplate != root->match && buffer){
+                    xmlBufferCCat(buffer, "\nreached matched template:");
+                    xmlBufferCat(buffer, root->match);
+                    xmlBufferCCat(buffer, mybuff);
+                    xsltCopyTextString(ctxt, ctxt->insert,xmlBufferContent(buffer),0);
+                    mybuff[1]++;
+                    lastTemplate = root->match;
+                }
             }else{
                 xsldbgGenericErrorFunc(i18n("\nReached template: \"%1\" mode: \"%2\"\n").arg(xsldbgText(nameTemp)).arg(xsldbgText(modeTemp)));
-		if (lastTemplate != root->name && buffer){
-		    xmlBufferCCat(buffer, "\nreached named template:");
-		    xmlBufferCat(buffer,root->match); 
-		    xmlBufferCCat(buffer,mybuff);
-		    xsltCopyTextString(ctxt, ctxt->insert,xmlBufferContent(buffer),0);
-		    mybuff[1]++;
-		    lastTemplate = root->name;
-		}
-		
-	    }
-	    if (buffer)
-	       xmlBufferFree(buffer);
-	  } else {
+                if (lastTemplate != root->name && buffer){
+                    xmlBufferCCat(buffer, "\nreached named template:");
+                    xmlBufferCat(buffer,root->match);
+                    xmlBufferCCat(buffer,mybuff);
+                    xsltCopyTextString(ctxt, ctxt->insert,xmlBufferContent(buffer),0);
+                    mybuff[1]++;
+                    lastTemplate = root->name;
+                }
+
+            }
+            if (buffer)
+                xmlBufferFree(buffer);
+            } else {
             if ((xslDebugStatus == DEBUG_TRACE) ||
                 (xslDebugStatus == DEBUG_WALK)) {
-		TQString message;
+                TQString message;
                 if (root->match)
-		  message = i18n("\nReached template: \"%1\" mode: \"%2\"\n").arg(xsldbgText(root->match)).arg(xsldbgText(modeTemp));
+                    message = i18n("\nReached template: \"%1\" mode: \"%2\"\n").arg(xsldbgText(root->match)).arg(xsldbgText(modeTemp));
                 else
-		  message = i18n("\nReached template: \"%1\" mode: \"%2\"\n").arg(xsldbgText(nameTemp)).arg(xsldbgText(modeTemp));
-		fprintf(terminalIO, "%s", message.local8Bit().data());
+                    message = i18n("\nReached template: \"%1\" mode: \"%2\"\n").arg(xsldbgText(nameTemp)).arg(xsldbgText(modeTemp));
+                fprintf(terminalIO, "%s", message.local8Bit().data());
+            }
             }
-	  }
-	}
-	if (nameTemp)
-	  xmlFree(nameTemp);
-	if (modeTemp)
-	  xmlFree(modeTemp);
+        }
+        if (nameTemp)
+            xmlFree(nameTemp);
+        if (modeTemp)
+            xmlFree(modeTemp);
     }
 
     shellPrompt(templ, node, (xmlChar *) "index.xsl",
@@ -1160,7 +1160,7 @@ debugXSLBreak(xmlNodePtr templ, xmlNodePtr node, xsltTemplatePtr root,
  * @filename: Not used
  * @input: The function to call to when reading commands from stdio
  * @output: Where to put the results
- * @styleCtxt: Is valid 
+ * @styleCtxt: Is valid
  *
  * Present to the user the xsldbg shell
  */
@@ -1173,7 +1173,7 @@ shellPrompt(xmlNodePtr source, xmlNodePtr doc, xmlChar * filename,
     xmlChar *cmdline = NULL, *cur;
     int nbargs = 0;
     int loadedFiles = 0;
-    int commandId = -1;         /* stores what was the last 
+    int commandId = -1;         /* stores what was the last
                                  * command id entered  by user */
     xmlChar command[DEBUG_BUFFER_SIZE]; /* holds the command user entered */
     xmlChar arg[DEBUG_BUFFER_SIZE];     /* holds any extra arguments to
@@ -1187,7 +1187,7 @@ shellPrompt(xmlNodePtr source, xmlNodePtr doc, xmlChar * filename,
     xmlChar *baseUri = NULL;    /* for used for included xml entities */
     const xmlChar *breakUri;
 
-    /* for convenience keep track of which node was last 
+    /* for convenience keep track of which node was last
      * selected of source and doc */
     xmlNodePtr lastSourceNode, lastDocNode;
 
@@ -1197,42 +1197,42 @@ shellPrompt(xmlNodePtr source, xmlNodePtr doc, xmlChar * filename,
 
     if (source == NULL){
 #ifdef WITH_XSLDBG_DEBUG_PROCESS
-	xsltGenericError(xsltGenericErrorContext,
-			 "Error: Source NULL in shellPrompt\n");
+        xsltGenericError(xsltGenericErrorContext,
+                         "Error: Source NULL in shellPrompt\n");
 #endif
         return;
     }
     if (doc == NULL){
 #ifdef WITH_XSLDBG_DEBUG_PROCESS
-	xsltGenericError(xsltGenericErrorContext,
-			 "Error: doc NULL in shellPrompt\n");
+        xsltGenericError(xsltGenericErrorContext,
+                         "Error: doc NULL in shellPrompt\n");
 #endif
         return;
     }
     if (filename == NULL){
 #ifdef WITH_XSLDBG_DEBUG_PROCESS
-	xsltGenericError(xsltGenericErrorContext,
-			 "Error: fileName NULL in shellPrompt\n");
+        xsltGenericError(xsltGenericErrorContext,
+                         "Error: fileName NULL in shellPrompt\n");
 #endif
         return;
     }
     if (input == NULL){
 #ifdef WITH_XSLDBG_DEBUG_PROCESS
-	xsltGenericError(xsltGenericErrorContext,
-			 "Error: Input function NULL in shellPrompt\n");
+        xsltGenericError(xsltGenericErrorContext,
+                         "Error: Input function NULL in shellPrompt\n");
 #endif
         return;
     }
     if (output == NULL){
 #ifdef WITH_XSLDBG_DEBUG_PROCESS
-	xsltGenericError(xsltGenericErrorContext,
-			 "Error: Output NULL in shellPrompt\n");
+        xsltGenericError(xsltGenericErrorContext,
+                         "Error: Output NULL in shellPrompt\n");
 #endif
         return;
     }
     ctxt = (xmlShellCtxtPtr) xmlMalloc(sizeof(xmlShellCtxt));
     if (ctxt == NULL){
-	xsldbgGenericErrorFunc(i18n("Error: Out of memory.\n"));
+        xsldbgGenericErrorFunc(i18n("Error: Out of memory.\n"));
         return;
     }
 
@@ -1259,9 +1259,9 @@ shellPrompt(xmlNodePtr source, xmlNodePtr doc, xmlChar * filename,
 
     if (xsldbgStop == 1){
         xslDebugStatus = DEBUG_STOP;
-	optionsSetIntOption(OPTIONS_TRACE,  TRACE_OFF);
+        optionsSetIntOption(OPTIONS_TRACE,  TRACE_OFF);
         optionsSetIntOption(OPTIONS_WALK_SPEED, WALKSPEED_STOP);
-	xsldbgStop = 0;
+        xsldbgStop = 0;
     }
 
     /* let any listener know that we got to a new line */
@@ -1273,11 +1273,11 @@ shellPrompt(xmlNodePtr source, xmlNodePtr doc, xmlChar * filename,
     }
 
 
-    /* If using a thread and the thread is running then we don't need to 
+    /* If using a thread and the thread is running then we don't need to
      * send this as the application will see the XSLDBG_MSG_LINE_CHANGED message */
     if ((getThreadStatus() == XSLDBG_MSG_THREAD_NOTUSED) ||
         (xslDebugStatus == DEBUG_TRACE)) {
-	TQString messageTxt;
+        TQString messageTxt;
         if (!nextCommandActive && ctxt->node && ctxt->node && ctxt->node->doc
             && ctxt->node->doc->URL) {
             if (!showSource) {
@@ -1290,7 +1290,7 @@ shellPrompt(xmlNodePtr source, xmlNodePtr doc, xmlChar * filename,
                 breakUri = ctxt->node->doc->URL;
 
             if (xmlGetLineNo(ctxt->node) != -1)
-		messageTxt = i18n("Breakpoint for file \"%1\" at line %2.\n").arg(xsldbgUrl(breakUri)).arg(xmlGetLineNo(ctxt->node));
+                messageTxt = i18n("Breakpoint for file \"%1\" at line %2.\n").arg(xsldbgUrl(breakUri)).arg(xmlGetLineNo(ctxt->node));
             else
                 messageTxt = i18n("Breakpoint at text node in file \"%1\".\n").arg(xsldbgUrl(breakUri));
             if (baseUri != NULL) {
@@ -1302,32 +1302,32 @@ shellPrompt(xmlNodePtr source, xmlNodePtr doc, xmlChar * filename,
                  (xslDebugStatus == DEBUG_WALK)) && (terminalIO != NULL))
                 fprintf(terminalIO, "%s", messageTxt.utf8().data());
             else
-		xsldbgGenericErrorFunc(messageTxt);
+                xsldbgGenericErrorFunc(messageTxt);
 
         }
     }
-    if ((showWatchesActive && (xslDebugStatus == DEBUG_TRACE)) || 
-	(xslDebugStatus == DEBUG_WALK)){
+    if ((showWatchesActive && (xslDebugStatus == DEBUG_TRACE)) ||
+        (xslDebugStatus == DEBUG_WALK)){
       ctxt->pctxt = xmlXPathNewContext(ctxt->doc);
       if (ctxt->pctxt) {
-	xslDbgShellShowWatches(styleCtxt, ctxt, 0);
-	xsldbgGenericErrorFunc("\n");
-	xmlXPathFreeContext(ctxt->pctxt);
-	ctxt->pctxt = NULL;
+          xslDbgShellShowWatches(styleCtxt, ctxt, 0);
+          xsldbgGenericErrorFunc("\n");
+          xmlXPathFreeContext(ctxt->pctxt);
+          ctxt->pctxt = NULL;
       }
     }
 
     if (xslDebugStatus == DEBUG_TRACE) {
-	if (ctxt->filename)
-	  xmlFree(ctxt->filename);
+        if (ctxt->filename)
+            xmlFree(ctxt->filename);
         xmlFree(ctxt);
         return; /* All done. Trace next instruction/node */
-    } 
+    }
     if (xslDebugStatus == DEBUG_WALK) {
         if (xslDbgWalkContinue()) {
-	  if (ctxt->filename)
-	    xmlFree(ctxt->filename);
-	  xmlFree(ctxt);
+            if (ctxt->filename)
+                xmlFree(ctxt->filename);
+            xmlFree(ctxt);
             return; /* All done. Walk to next instruction/node */
         }
     }
@@ -1335,7 +1335,7 @@ shellPrompt(xmlNodePtr source, xmlNodePtr doc, xmlChar * filename,
     ctxt->pctxt = xmlXPathNewContext(ctxt->doc);
     if (ctxt->pctxt == NULL) {
         xmlFree(ctxt);
-	xsldbgGenericErrorFunc(i18n("Error: Out of memory.\n"));
+        xsldbgGenericErrorFunc(i18n("Error: Out of memory.\n"));
         return;
     }
 
@@ -1366,12 +1366,12 @@ shellPrompt(xmlNodePtr source, xmlNodePtr doc, xmlChar * filename,
             /*
              * Get a new command line
              */
-	    if (nextCommandActive && (xslDebugStatus == DEBUG_STEP))
-	      /* we are processing the "next command" do the next 
-	         part of the command which is the up command */
-	      cmdline = xmlStrdup((xmlChar*)"up");
-	    else
-	      cmdline = (xmlChar *) ctxt->input((char *) prompt);
+            if (nextCommandActive && (xslDebugStatus == DEBUG_STEP))
+                /* we are processing the "next command" do the next
+                   part of the command which is the up command */
+                cmdline = xmlStrdup((xmlChar*)"up");
+            else
+                cmdline = (xmlChar *) ctxt->input((char *) prompt);
             if (cmdline && (optionsGetIntOption(OPTIONS_UTF8_INPUT) == 0)) {
                 /* we are getting encoded characters from the command line
                  * so decode them into UTF-8 */
@@ -1385,20 +1385,20 @@ shellPrompt(xmlNodePtr source, xmlNodePtr doc, xmlChar * filename,
         } else {
             /* don't need a prompt for running as when running as a thread */
             xmlStrCpy(messageBuffer, "");
-	    if (nextCommandActive && (xslDebugStatus == DEBUG_STEP))
-	      /* we are processing the "next command" do the next 
-	         part of the command which is the up command */
-	      cmdline = xmlStrdup((xmlChar*)"up");
-	    else
-	      cmdline = (xmlChar *) ctxt->input((char *) messageBuffer);
+            if (nextCommandActive && (xslDebugStatus == DEBUG_STEP))
+                /* we are processing the "next command" do the next
+                   part of the command which is the up command */
+                cmdline = xmlStrdup((xmlChar*)"up");
+            else
+                cmdline = (xmlChar *) ctxt->input((char *) messageBuffer);
         }
 
         if (cmdline == NULL)
             break;
 
-	/* don't allow next command to be active more than at one breakpoint */
-	if (nextCommandActive)
-	  nextCommandActive = 0;
+        /* don't allow next command to be active more than at one breakpoint */
+        if (nextCommandActive)
+            nextCommandActive = 0;
 
         notifyXsldbgApp(XSLDBG_MSG_PROCESSING_INPUT, NULL);
 
@@ -1454,8 +1454,8 @@ shellPrompt(xmlNodePtr source, xmlNodePtr doc, xmlChar * filename,
                 /* --- Help related commands --- */
             case DEBUG_HELP_CMD:
                 cmdResult = helpTop(arg);
-		if (!cmdResult)
-		    xsldbgGenericErrorFunc(i18n("Unable to print local help. Online help can be found at http://xsldbg.sourceforge.net/docs/index.html.\n"));	    
+                if (!cmdResult)
+                    xsldbgGenericErrorFunc(i18n("Unable to print local help. Online help can be found at http://xsldbg.sourceforge.net/docs/index.html.\n"));
                 break;
 
 
@@ -1469,14 +1469,14 @@ shellPrompt(xmlNodePtr source, xmlNodePtr doc, xmlChar * filename,
                 cmdResult = 1;
                 break;
 
-	   case DEBUG_NEXT_CMD:
+            case DEBUG_NEXT_CMD:
                 xslDebugStatus = DEBUG_STEP;
                 exitShell++;
                 cmdResult = 1;
-	        /* Do the the next part of this command
-		   which is the up command */
-		nextCommandActive = 1;
-	     break;
+                /* Do the the next part of this command
+                   which is the up command */
+                nextCommandActive = 1;
+                break;
 
             case DEBUG_STEP_CMD:
                 xslDebugStatus = DEBUG_STEP;
@@ -1550,7 +1550,7 @@ shellPrompt(xmlNodePtr source, xmlNodePtr doc, xmlChar * filename,
                     if (!xmlShellPwd(ctxt, (char *) dir, ctxt->node, NULL)){
                         xsldbgGenericErrorFunc((const char*)dir);
                         xsldbgGenericErrorFunc("\n");
-		    }
+                    }
                 }
                 cmdResult = 1;
 
@@ -1575,14 +1575,14 @@ shellPrompt(xmlNodePtr source, xmlNodePtr doc, xmlChar * filename,
                         cmdResult = xslDbgShellBreak(arg, NULL, styleCtxt);
                 } else {
                     /* select current node to break at */
-		    xmlChar buff[100];
-		    xmlChar *tempBaseName = filesGetBaseUri(ctxt->node);		    
-		    if (tempBaseName){
-		      snprintf((char *) buff, sizeof(buff), "-l %s %ld",
-			       tempBaseName,
-			       xmlGetLineNo(ctxt->node));
-		      xmlFree(tempBaseName);
-		    }
+                    xmlChar buff[100];
+                    xmlChar *tempBaseName = filesGetBaseUri(ctxt->node);
+                    if (tempBaseName){
+                        snprintf((char *) buff, sizeof(buff), "-l %s %ld",
+                                 tempBaseName,
+                                 xmlGetLineNo(ctxt->node));
+                        xmlFree(tempBaseName);
+                    }
                     if (styleCtxt)
                         cmdResult =
                             xslDbgShellBreak(buff, styleCtxt->style,
@@ -1616,18 +1616,18 @@ shellPrompt(xmlNodePtr source, xmlNodePtr doc, xmlChar * filename,
                 break;
 
             case DEBUG_DELETE_CMD:
-	      if (xmlStrLen(arg))
+                if (xmlStrLen(arg))
                     cmdResult = xslDbgShellDelete((xmlChar *) arg);
                 else {
                     breakPointPtr breakPtr = NULL;
-		    xmlChar* tempBaseName = filesGetBaseUri(ctxt->node);
+                    xmlChar* tempBaseName = filesGetBaseUri(ctxt->node);
 
                     if (tempBaseName){
                         breakPtr =
                             breakPointGet(tempBaseName,
-					  xmlGetLineNo(ctxt->node));
-			xmlFree(tempBaseName);
-		    }
+                                          xmlGetLineNo(ctxt->node));
+                            xmlFree(tempBaseName);
+                    }
                     if (!breakPtr || !breakPointDelete(breakPtr)) {
                         xsldbgGenericErrorFunc(i18n("Error: Unable to delete breakpoint.\n"));
                         cmdResult = 0;
@@ -1641,14 +1641,14 @@ shellPrompt(xmlNodePtr source, xmlNodePtr doc, xmlChar * filename,
                         xslDbgShellEnable(arg, XSL_TOGGLE_BREAKPOINT);
                 else {
                     breakPointPtr breakPtr = NULL;
-		    xmlChar * tempBaseName = filesGetBaseUri(ctxt->node);
+                    xmlChar * tempBaseName = filesGetBaseUri(ctxt->node);
 
-		    if (tempBaseName){
+                    if (tempBaseName){
                         breakPtr =
                             breakPointGet(tempBaseName,
-					  xmlGetLineNo(ctxt->node));
-		      xmlFree(tempBaseName);
-		    }
+                                          xmlGetLineNo(ctxt->node));
+                            xmlFree(tempBaseName);
+                    }
                     if (!breakPtr ||
                         (!breakPointEnable(breakPtr, !(breakPtr->flags & BREAKPOINT_ENABLED)))) {
                         xsldbgGenericErrorFunc(i18n("Error: Unable to enable/disable breakpoint.\n"));
@@ -1658,18 +1658,18 @@ shellPrompt(xmlNodePtr source, xmlNodePtr doc, xmlChar * filename,
                 break;
 
             case DEBUG_DISABLE_CMD:
-	      if (xmlStrLen(arg))
+                if (xmlStrLen(arg))
                     cmdResult = xslDbgShellEnable(arg, 0);
                 else {
                     breakPointPtr breakPtr = NULL;
-		    xmlChar *tempBaseName = filesGetBaseUri(ctxt->node);
-		      
-		    if (tempBaseName){
+                    xmlChar *tempBaseName = filesGetBaseUri(ctxt->node);
+
+                    if (tempBaseName){
                         breakPtr =
-			  breakPointGet(tempBaseName,
-                                          xmlGetLineNo(ctxt->node));
-		      xmlFree(tempBaseName);
-		    }
+                        breakPointGet(tempBaseName,
+                                      xmlGetLineNo(ctxt->node));
+                        xmlFree(tempBaseName);
+                    }
                     if (!breakPtr || !breakPointEnable(breakPtr, 0)) {
                         xsldbgGenericErrorFunc(i18n("Error: Unable to enable/disable breakpoint.\n"));
                         cmdResult = 0;
@@ -1700,19 +1700,19 @@ shellPrompt(xmlNodePtr source, xmlNodePtr doc, xmlChar * filename,
 
             case DEBUG_PWD_CMD:
                 if (!xmlShellPwd(ctxt, (char *) dir, ctxt->node, NULL)) {
-		  xmlChar* tempBaseName = filesGetBaseUri(ctxt->node);
-		  if(tempBaseName){
-		    xsldbgGenericErrorFunc("\n");
-		    xsldbgGenericErrorFunc((char*)dir);
-		    xsldbgGenericErrorFunc(i18n(" in file \"%1\" at line %2").arg(xsldbgUrl(tempBaseName)).arg(xmlGetLineNo(ctxt->node)));
-		    xmlFree(tempBaseName);
-		    cmdResult = 1;
-		  }
+                    xmlChar* tempBaseName = filesGetBaseUri(ctxt->node);
+                    if(tempBaseName){
+                        xsldbgGenericErrorFunc("\n");
+                        xsldbgGenericErrorFunc((char*)dir);
+                        xsldbgGenericErrorFunc(i18n(" in file \"%1\" at line %2").arg(xsldbgUrl(tempBaseName)).arg(xmlGetLineNo(ctxt->node)));
+                        xmlFree(tempBaseName);
+                        cmdResult = 1;
+                    }
                 }
-		if (cmdResult)
-		  xsldbgGenericErrorFunc("\n");
-		else
-		  xsldbgGenericErrorFunc(i18n("Error: Unable to print working directory.\n"));		  
+                if (cmdResult)
+                    xsldbgGenericErrorFunc("\n");
+                else
+                    xsldbgGenericErrorFunc(i18n("Error: Unable to print working directory.\n"));
                 break;
 
             case DEBUG_DUMP_CMD:
@@ -1739,7 +1739,7 @@ shellPrompt(xmlNodePtr source, xmlNodePtr doc, xmlChar * filename,
 
             case DEBUG_LOCALS_CMD:
                 if (loadedFiles == 0)
-                    /* if gdb compatability mode is enable print the globals then 
+                    /* if gdb compatability mode is enable print the globals then
                      * the locals */
                     if (optionsGetIntOption(OPTIONS_GDB) == 1) {
                         cmdResult =
@@ -1760,19 +1760,19 @@ shellPrompt(xmlNodePtr source, xmlNodePtr doc, xmlChar * filename,
                 break;
 
 
-                /* It's difficult to put the following commands into 
+                /* It's difficult to put the following commands into
                  * a separe file so they stay here! */
                 /* --- Node selection related commands --- */
             case DEBUG_SOURCE_CMD:
                 cmdResult = 1;  /* only one case where this will command fail */
-		xsldbgValidateBreakpoints = BREAKPOINTS_NEED_VALIDATION;
+                xsldbgValidateBreakpoints = BREAKPOINTS_NEED_VALIDATION;
                 if (xmlStrLen(arg) == 0) {
                     if (ctxt->doc == doc->doc)
                         lastDocNode = ctxt->node;
                     ctxt->doc = source->doc;
                     ctxt->node = lastSourceNode;
-		    if (ctxt->pctxt)
-		      xmlXPathFreeContext(ctxt->pctxt);
+                    if (ctxt->pctxt)
+                        xmlXPathFreeContext(ctxt->pctxt);
                     ctxt->pctxt = xmlXPathNewContext(ctxt->doc);
                     showSource = 1;
                     xsldbgUpdateFileDetails((xmlNodePtr) ctxt->node);
@@ -1793,7 +1793,7 @@ shellPrompt(xmlNodePtr source, xmlNodePtr doc, xmlChar * filename,
 
                         optionsSetStringOption(OPTIONS_SOURCE_FILE_NAME,
                                                expandedName);
-			notifyXsldbgApp(XSLDBG_MSG_FILE_CHANGED, 0L);
+                        notifyXsldbgApp(XSLDBG_MSG_FILE_CHANGED, 0L);
                         loadedFiles = 1;
                         xmlFree(expandedName);
                         cmdResult = 1;
@@ -1805,14 +1805,14 @@ shellPrompt(xmlNodePtr source, xmlNodePtr doc, xmlChar * filename,
 
             case DEBUG_DATA_CMD:
                 cmdResult = 1;  /* only one case where this will command fail */
-		xsldbgValidateBreakpoints = BREAKPOINTS_NEED_VALIDATION;
+                xsldbgValidateBreakpoints = BREAKPOINTS_NEED_VALIDATION;
                 if (xmlStrLen(arg) == 0) {
                     if (ctxt->doc == source->doc)
                         lastSourceNode = ctxt->node;
                     ctxt->doc = doc->doc;
                     ctxt->node = lastDocNode;
-		    if (ctxt->pctxt)
-		      xmlXPathFreeContext(ctxt->pctxt);
+                    if (ctxt->pctxt)
+                        xmlXPathFreeContext(ctxt->pctxt);
                     ctxt->pctxt = xmlXPathNewContext(ctxt->doc);
                     showSource = 0;
                     xsldbgUpdateFileDetails((xmlNodePtr) ctxt->node);
@@ -1833,7 +1833,7 @@ shellPrompt(xmlNodePtr source, xmlNodePtr doc, xmlChar * filename,
 
                         optionsSetStringOption(OPTIONS_DATA_FILE_NAME,
                                                expandedName);
-			notifyXsldbgApp(XSLDBG_MSG_FILE_CHANGED, 0L);
+                        notifyXsldbgApp(XSLDBG_MSG_FILE_CHANGED, 0L);
                         loadedFiles = 1;
                         xmlFree(expandedName);
                         cmdResult = 1;
@@ -1844,8 +1844,8 @@ shellPrompt(xmlNodePtr source, xmlNodePtr doc, xmlChar * filename,
                 break;
 
             case DEBUG_OUTPUT_CMD:
-	      /* set the output file name to use */
-	      cmdResult = xslDbgShellOutput(arg);
+                /* set the output file name to use */
+                cmdResult = xslDbgShellOutput(arg);
                 break;
 
             case DEBUG_CD_CMD:
@@ -1876,29 +1876,29 @@ shellPrompt(xmlNodePtr source, xmlNodePtr doc, xmlChar * filename,
                 break;
 
             case DEBUG_SYSTEM_CMD:
-	      /* strip off a single argument. I need to do it this
-	         way because I've already public this API */
-	      {
-		xmlChar *systemID;
-		if (splitString(arg, 1, &systemID) == 1){
-		  cmdResult = xslDbgSystem(systemID);
-		}else{
-		  xsldbgGenericErrorFunc(i18n("Error: Invalid arguments for the command %1.\n").arg("system"));
-		}
-	       }
+                /* strip off a single argument. I need to do it this
+                   way because I've already public this API */
+                {
+                    xmlChar *systemID;
+                    if (splitString(arg, 1, &systemID) == 1){
+                        cmdResult = xslDbgSystem(systemID);
+                    }else{
+                        xsldbgGenericErrorFunc(i18n("Error: Invalid arguments for the command %1.\n").arg("system"));
+                    }
+                }
                 break;
 
             case DEBUG_PUBLIC_CMD:
-	      /* strip off a single argument. I need to do it this
-	         way because I've already public this API */
-	      {
-		xmlChar *publicID;
-		if (splitString(arg, 1, &publicID) == 1){
-		  cmdResult = xslDbgPublic(publicID);
-		}else{
-		  xsldbgGenericErrorFunc(i18n("Error: Invalid arguments for the command %1.\n").arg("public"));
-		}
-	       }
+                /* strip off a single argument. I need to do it this
+                   way because I've already public this API */
+                {
+                    xmlChar *publicID;
+                    if (splitString(arg, 1, &publicID) == 1){
+                        cmdResult = xslDbgPublic(publicID);
+                    }else{
+                        xsldbgGenericErrorFunc(i18n("Error: Invalid arguments for the command %1.\n").arg("public"));
+                    }
+                }
                 break;
 
             case DEBUG_ENCODING_CMD:
@@ -1988,33 +1988,33 @@ shellPrompt(xmlNodePtr source, xmlNodePtr doc, xmlChar * filename,
                 /* misc commands */
             case DEBUG_TTY_CMD:
                 if (openTerminal(arg)) {
-		  /* gdb does to say anything after redirecting its 
-		     output */
-		  if (optionsGetIntOption(OPTIONS_GDB) < 2)
-                    xsldbgGenericErrorFunc(i18n("Opening terminal %1.\n").arg(xsldbgText(arg)));
+                    /* gdb does to say anything after redirecting its
+                       output */
+                    if (optionsGetIntOption(OPTIONS_GDB) < 2)
+                        xsldbgGenericErrorFunc(i18n("Opening terminal %1.\n").arg(xsldbgText(arg)));
                     cmdResult = 1;
                 } else
                     cmdResult = 0;
                 break;
 
 
-		/* language selection for messages */
-	    case DEBUG_LANG_CMD:
+            /* language selection for messages */
+            case DEBUG_LANG_CMD:
 #ifdef LOCALE_PREFIX
-		if (xmlStrlen(arg) > 0){
-		    setlocale(LC_MESSAGES, (char*)arg);
-		    textdomain("tdewebdev/xsldsbg");
-		    bindtextdomain("tdewebdev/xsldbg", LOCALE_PREFIX);
-		    cmdResult = 1;
-		}else{
-		    xsldbgGenericErrorFunc(i18n("Error: Missing arguments for the command %1.\n").arg("lang"));
-		    cmdResult = 0;
-		}
+                if (xmlStrlen(arg) > 0){
+                    setlocale(LC_MESSAGES, (char*)arg);
+                    textdomain("tdewebdev/xsldsbg");
+                    bindtextdomain("tdewebdev/xsldbg", LOCALE_PREFIX);
+                    cmdResult = 1;
+                }else{
+                    xsldbgGenericErrorFunc(i18n("Error: Missing arguments for the command %1.\n").arg("lang"));
+                    cmdResult = 0;
+                }
 #else
-	        xsldbgGenericErrorFunc(i18n("Warning: The %1 command is disabled\n").arg("lang"));
-		cmdResult = 1;
+                xsldbgGenericErrorFunc(i18n("Warning: The %1 command is disabled\n").arg("lang"));
+                cmdResult = 1;
 #endif
-		break;
+                break;
 
                 /* tracing related commands */
             case DEBUG_TRACE_CMD:
@@ -2034,32 +2034,32 @@ shellPrompt(xmlNodePtr source, xmlNodePtr doc, xmlChar * filename,
                     cmdResult = 0;
                 break;
 
-	   case DEBUG_ADDWATCH_CMD:
-	     cmdResult = xslDbgShellAddWatch(arg);
-	   break;
+            case DEBUG_ADDWATCH_CMD:
+                cmdResult = xslDbgShellAddWatch(arg);
+                break;
 
-	   case DEBUG_DELWATCH_CMD:
-	     cmdResult = xslDbgShellDeleteWatch(arg);	     
-           break;
+            case DEBUG_DELWATCH_CMD:
+                cmdResult = xslDbgShellDeleteWatch(arg);
+                break;
+
+            case DEBUG_SHOWWATCH_CMD:
+                trimString(arg);
+                switch (arg[0]){
+                    case '\0':
+                        cmdResult = xslDbgShellShowWatches(styleCtxt, ctxt, 1);
+                        break;
 
-	   case DEBUG_SHOWWATCH_CMD:
-	     trimString(arg);
-	     switch (arg[0]){
-	     case '\0':
-	       cmdResult = xslDbgShellShowWatches(styleCtxt, ctxt, 1);
-	       break;
-
-	     case '0':
-	     case '1':
-               showWatchesActive = arg[0] - '0';
-	       cmdResult = 1;
-	       break;
-
-	     default:
-	        xsldbgGenericErrorFunc(i18n("Error: Invalid arguments for the command %1.\n").arg("showmatch")); 
-	     }
+                    case '0':
+                    case '1':
+                        showWatchesActive = arg[0] - '0';
+                        cmdResult = 1;
+                        break;
+
+                    default:
+                        xsldbgGenericErrorFunc(i18n("Error: Invalid arguments for the command %1.\n").arg("showmatch"));
+                }
            break;
- 
+
 
                 /* search related commands */
             case DEBUG_SEARCH_CMD:
@@ -2081,9 +2081,9 @@ shellPrompt(xmlNodePtr source, xmlNodePtr doc, xmlChar * filename,
 
         /* KDbg likes to get the marker after every command so here it is */
         if ((optionsGetIntOption(OPTIONS_GDB) >1) && optionsGetIntOption(OPTIONS_VERBOSE) && !nextCommandActive
-	     && (commandId != DEBUG_STEPUP_CMD - DEBUG_HELP_CMD)) {
-            if (ctxt->node && ctxt->node && 
-		ctxt->node->doc && ctxt->node->doc->URL) {
+            && (commandId != DEBUG_STEPUP_CMD - DEBUG_HELP_CMD)) {
+            if (ctxt->node && ctxt->node &&
+                ctxt->node->doc && ctxt->node->doc->URL) {
 
                 if (xmlGetLineNo(ctxt->node) != -1)
                     xsldbgGenericErrorFunc(i18n("Breakpoint for file \"%1\" at line %2.\n").arg(xsldbgUrl(ctxt->node->doc->URL)).arg(xmlGetLineNo(ctxt->node)));
diff --git a/src/kxsldbgpart/libxsldbg/files.cpp b/src/kxsldbgpart/libxsldbg/files.cpp
index 00540e6..840314f 100644
--- a/src/kxsldbgpart/libxsldbg/files.cpp
+++ b/src/kxsldbgpart/libxsldbg/files.cpp
@@ -93,7 +93,7 @@ static void guessStylesheetHelper(void *payload, void *data,
 
 /**
  * guessStylesheetHelper2:
- * @payload: valid xmlNodePtr of the included stylesheet 
+ * @payload: valid xmlNodePtr of the included stylesheet
  * @data: valid searchInfoPtr of type SEARCH_NODE
  * @name: not used
  *
@@ -114,7 +114,7 @@ void filesAddEntityName(const xmlChar * SystemID,
                         const xmlChar * PublicID);
 
 
-/* ------------------------------------- 
+/* -------------------------------------
     End private functions
 ---------------------------------------*/
 
@@ -179,8 +179,8 @@ openTerminal(xmlChar * device)
         case '7':
         case '8':
         case '9':
-            /* look like we are supposed to close the terminal 
-             * but we've already done that     
+            /* look like we are supposed to close the terminal
+             * but we've already done that
              */
             break;
 
@@ -251,7 +251,7 @@ guessStylesheetHelper(void *payload, void *data,
 
     searchData = (nodeSearchDataPtr) searchCriteria->data;
     if (searchData->nameInput && (searchData->absoluteNameMatch == NULL)) {
-        /* at this point we know that we have not made an absolute match 
+        /* at this point we know that we have not made an absolute match
          * but we may have made a relative match */
         if (xmlStrCmp(style->doc->URL, searchData->nameInput) == 0) {
             /* absolute path match great! */
@@ -294,30 +294,30 @@ guessStylesheetHelper(void *payload, void *data,
         }
 
 
-	/* Find the last separator of the stylsheet's URL */
-	lastSlash = xmlStrChr(style->doc->URL, URISEPARATORCHAR);
-	if (!lastSlash)
-	  lastSlash = xmlStrChr(style->doc->URL, PATHCHAR);
+        /* Find the last separator of the stylsheet's URL */
+        lastSlash = xmlStrChr(style->doc->URL, URISEPARATORCHAR);
+        if (!lastSlash)
+            lastSlash = xmlStrChr(style->doc->URL, PATHCHAR);
 
         if (lastSlash) {
             /* Last try, assume nameInput contains only a file name
              * Strip of the file name at end of the stylesheet doc URL */
-	  lastSlash++;    /* skip the slash */
-	  if (xmlStrCmp(lastSlash, searchData->nameInput) == 0) {
-	    /* guessed right! */
-	    searchData->guessedNameMatch =
-                        (xmlChar *) xmlMemStrdup((char *) style->doc->URL);
-                    searchData->node = (xmlNodePtr) style->doc;
-                    searchCriteria->found = 1;
-                }
+            lastSlash++;    /* skip the slash */
+            if (xmlStrCmp(lastSlash, searchData->nameInput) == 0) {
+                /* guessed right! */
+                searchData->guessedNameMatch =
+                    (xmlChar *) xmlMemStrdup((char *) style->doc->URL);
+                searchData->node = (xmlNodePtr) style->doc;
+                searchCriteria->found = 1;
             }
+        }
     }
 }
 
 
 /**
  * guessStylesheetHelper2:
- * @payload: valid xmlNodePtr of the included stylesheet 
+ * @payload: valid xmlNodePtr of the included stylesheet
  * @data: valid searchInfoPtr of type SEARCH_NODE
  * @name: not used
  *
@@ -342,7 +342,7 @@ guessStylesheetHelper2(void *payload, void *data,
 
     searchData = (nodeSearchDataPtr) searchCriteria->data;
     if (searchData->nameInput && (searchData->absoluteNameMatch == NULL)) {
-        /* at this point we know that we have not made an absolute match 
+        /* at this point we know that we have not made an absolute match
          * but we may have made a relative match */
         if (xmlStrCmp(node->doc->URL, searchData->nameInput) == 0) {
             /* absolute path match great! */
@@ -385,23 +385,23 @@ guessStylesheetHelper2(void *payload, void *data,
         }
 
 
-	/* Find the last separator of the stylsheet's URL */
-	lastSlash = xmlStrChr(node->doc->URL, URISEPARATORCHAR);
-	if (!lastSlash)
-	  lastSlash = xmlStrChr(node->doc->URL, PATHCHAR);
+        /* Find the last separator of the stylsheet's URL */
+        lastSlash = xmlStrChr(node->doc->URL, URISEPARATORCHAR);
+        if (!lastSlash)
+            lastSlash = xmlStrChr(node->doc->URL, PATHCHAR);
 
         if (lastSlash) {
-	  /* Last try, assume nameInput contains only a file name
-	   * Strip of the file name at end of the stylesheet doc URL */
-	  lastSlash++;    /* skip the slash */
-	  if (xmlStrCmp(lastSlash, searchData->nameInput) == 0) {
-	    /* guessed right! */
-	    searchData->guessedNameMatch =
-                        (xmlChar *) xmlMemStrdup((char *) node->doc->URL);
-	    searchData->node = node;
-	    searchCriteria->found = 1;
-	  }
-	}
+            /* Last try, assume nameInput contains only a file name
+             * Strip of the file name at end of the stylesheet doc URL */
+            lastSlash++;    /* skip the slash */
+            if (xmlStrCmp(lastSlash, searchData->nameInput) == 0) {
+                /* guessed right! */
+                searchData->guessedNameMatch =
+                (xmlChar *) xmlMemStrdup((char *) node->doc->URL);
+                searchData->node = node;
+                searchCriteria->found = 1;
+            }
+        }
     }
 }
 
@@ -453,7 +453,7 @@ stylePath(void)
 
 /**
  * workingPath:
- * 
+ *
  * Return the working directory as set by changeDir function
  *
  * Returns The working directory as set by changeDir function
@@ -469,7 +469,7 @@ workingPath(void)
  * changeDir:
  * @path: The path to adopt as new working directory
  *
- * Change working directory to path 
+ * Change working directory to path
  *
  * Returns 1 on success,
  *         0 otherwise
@@ -502,7 +502,7 @@ changeDir(const xmlChar * path)
     }
 
     xmlStrCpy(filesBuffer, expandedName);
-    /* strip off any extra PATHCHAR's as win32's chdir function 
+    /* strip off any extra PATHCHAR's as win32's chdir function
      * fails if we don't */
     charIndex = xmlStrLen(filesBuffer) - 1;
     while (charIndex && (filesBuffer[charIndex] == PATHCHAR)) {
@@ -523,8 +523,8 @@ changeDir(const xmlChar * path)
     if (!result) {
         xsldbgGenericErrorFunc(i18n("Error: Unable to change to directory %1.\n").arg(xsldbgText(path)));
     } else {
-	if (xslDebugStatus != DEBUG_NONE)
-	    xsldbgGenericErrorFunc(i18n("Changed to directory %1.\n").arg(xsldbgText(path)));
+        if (xslDebugStatus != DEBUG_NONE)
+            xsldbgGenericErrorFunc(i18n("Changed to directory %1.\n").arg(xsldbgText(path)));
     }
     return result;
 }
@@ -533,12 +533,12 @@ changeDir(const xmlChar * path)
 /**
  * filesLoadXmlFile:
  * @path: xml file to load
- * @fileType: A valid FileTypeEnum 
- * 
- * Load specified file type, freeing any memory previously used 
+ * @fileType: A valid FileTypeEnum
+ *
+ * Load specified file type, freeing any memory previously used
  *
  * Returns 1 on success,
- *         0 otherwise 
+ *         0 otherwise
  */
 int
 filesLoadXmlFile(const xmlChar * path, FileTypeEnum fileType)
@@ -612,9 +612,9 @@ filesLoadXmlFile(const xmlChar * path, FileTypeEnum fileType)
 
 /**
  * filesFreeXmlFile:
- * @fileType: A valid FileTypeEnum 
- * 
- * Free memory associated with the xml file 
+ * @fileType: A valid FileTypeEnum
+ *
+ * Free memory associated with the xml file
  *
  * Returns 1 on success,
  *         0 otherwise
@@ -700,7 +700,7 @@ filesGetMainDoc(void)
 /**
  * filesReloaded:
  * @reloaded: if = -1 then ignore @reloaded
- *             otherwise change the status of files to value of @reloaded   
+ *             otherwise change the status of files to value of @reloaded
  *
  * Returns 1 if stylesheet or its xml data file has been "flaged" as reloaded,
  *         0 otherwise
@@ -825,7 +825,7 @@ filesFree(void)
 /**
  * filesIsSourceFile:
  * @fileName : is valid
- * 
+ *
  * Returns true if @name has the ".xsl" externsion
  */
 int
@@ -876,7 +876,7 @@ filesFreeEntityInfo(entityInfoPtr info)
  * filesAddEntityName:
  * @name : is valid
  *
- * Add name to entity name list of know external entities if 
+ * Add name to entity name list of know external entities if
  *  it does not already exist in list
  */
 void
@@ -928,10 +928,10 @@ filesEntityRef(xmlEntityPtr ent, xmlNodePtr firstNode, xmlNodePtr lastNode)
         filesAddEntityName(ent->URI, BAD_CAST "");
     while (node){
         filesSetBaseUri(node, ent->URI);
-	if (node != lastNode)
-           node = node->next;
-	else
-	   node = NULL;
+        if (node != lastNode)
+            node = node->next;
+        else
+            node = NULL;
     }
 }
 
@@ -941,10 +941,10 @@ filesEntityRef(xmlEntityPtr ent, xmlNodePtr firstNode, xmlNodePtr lastNode)
    * filesSetBaseUri:
    * @node : Is valid and has a doc parent
    * @uri : Is Valid
-   * 
+   *
    * Set the base uri for this node. Function is used when xml file
    *    has external entities in its DTD
-   * 
+   *
    * Returns 1 if successful,
    *        0 otherwise
    */
@@ -973,10 +973,10 @@ filesSetBaseUri(xmlNodePtr node, const xmlChar * uri)
   /**
    * filesGetBaseUri:
    * @node : Is valid and has a doc parent
-   * 
-   * Get a copy of the base uri for this node. Function is most usefull 
+   *
+   * Get a copy of the base uri for this node. Function is most usefull
    *  used when xml file  has external entities in its DTD
-   * 
+   *
    * Returns the a copy of the base uri for this node,
    *         NULL otherwise
    */
@@ -1027,10 +1027,10 @@ extern int intVolitileOptions[OPTIONS_LAST_INT_OPTIONID - OPTIONS_FIRST_INT_OPTI
 /**
  * filesLoadCatalogs:
  *
- * Load the catalogs specifed by OPTIONS_CATALOG_NAMES if 
+ * Load the catalogs specifed by OPTIONS_CATALOG_NAMES if
  *      OPTIONS_CATALOGS is enabled
  * Returns 1 if sucessful
- *         0 otherwise   
+ *         0 otherwise
  */
 int
 filesLoadCatalogs(void)
@@ -1041,26 +1041,25 @@ filesLoadCatalogs(void)
     xmlCatalogCleanup();
     if (optionsGetIntOption(OPTIONS_CATALOGS)) {
       if (optionsGetStringOption(OPTIONS_CATALOG_NAMES) == NULL) {
-	/* use the SGML catalog */
+          /* use the SGML catalog */
 #ifdef __riscos
-	catalogs = getenv("SGML$CatalogFiles");
+        catalogs = getenv("SGML$CatalogFiles");
 #else
-	catalogs = getenv("SGML_CATALOG_FILES");
+        catalogs = getenv("SGML_CATALOG_FILES");
 #endif
-	if (catalogs == NULL) {
+        if (catalogs == NULL) {
 #ifdef __riscos
-	  xsldbgGenericErrorFunc("Warning: Environment variable SGML$CatalogFiles is not set.\n");
+          xsldbgGenericErrorFunc("Warning: Environment variable SGML$CatalogFiles is not set.\n");
 #else
-	  xsldbgGenericErrorFunc("Warning: Environment variabe SGML_CATALOG_FILES FILES not set.\n");
+          xsldbgGenericErrorFunc("Warning: Environment variabe SGML_CATALOG_FILES FILES not set.\n");
 #endif
-	} else
-	  /* copy the current catalog name(s) for user to see */
-	  optionsSetStringOption(OPTIONS_CATALOG_NAMES,
-				 (xmlChar *) catalogs);
+        } else
+          /* copy the current catalog name(s) for user to see */
+          optionsSetStringOption(OPTIONS_CATALOG_NAMES,
+                                 (xmlChar *) catalogs);
       } else
-	/* Use the current catalog settings from users*/
-	catalogs = (char *)
-	  optionsGetStringOption(OPTIONS_CATALOG_NAMES);
+        /* Use the current catalog settings from users*/
+        catalogs = (char *) optionsGetStringOption(OPTIONS_CATALOG_NAMES);
 
       result = 1;
     }
@@ -1080,7 +1079,7 @@ filesLoadCatalogs(void)
 
   /**
    * filesEncode:
-   * @text: Is valid, text to translate from UTF-8, 
+   * @text: Is valid, text to translate from UTF-8,
    *
    * Return  A  new string of converted @text
    *
@@ -1115,7 +1114,7 @@ filesEncode(const xmlChar * text)
 
   /**
    * filesDeccode:
-   * @text: Is valid, text to translate from current encoding to UTF-8, 
+   * @text: Is valid, text to translate from current encoding to UTF-8,
    *
    * Return  A  string of converted @text
    *
@@ -1151,7 +1150,7 @@ filesDecode(const xmlChar * text)
      * filesSetEncoding:
      * @encoding : Is a valid encoding supported by the iconv library or NULL
      *
-     * Opens encoding for all standard output to @encoding. If  @encoding 
+     * Opens encoding for all standard output to @encoding. If  @encoding
      *        is NULL then close current encoding and use UTF-8 as output encoding
      *
      * Returns 1 if successful in setting the encoding of all standard output
@@ -1202,9 +1201,9 @@ filesSetEncoding(const char *encoding)
    * @file : May be NULL
    *
    * Do a "more" like print of file specified by @fileName OR
-   *   @file. If both are provided @file will be used. The content 
-   *   of file chosen must be in UTF-8, and will be  printed in 
-   *   the current encoding selected.The function will pause output 
+   *   @file. If both are provided @file will be used. The content
+   *   of file chosen must be in UTF-8, and will be  printed in
+   *   the current encoding selected.The function will pause output
    *   after FILES_NO_LINES lines have been printed waiting for
    *   user to enter "q" to quit or any other text to continue.
    *
@@ -1304,7 +1303,7 @@ filesSearchResultsPath()
    *        that is suitable to be used with the fopen function.
    *        May be NULL, if out of memory, @uri does not use the
    *        "file://" prefix, or unable to convert to a valid file name
-   *    
+   *
    */
 xmlChar *filesURItoFileName(const xmlChar* uri)
 {
@@ -1318,46 +1317,46 @@ xmlChar *filesURItoFileName(const xmlChar* uri)
     }else{
 #if defined(WIN32) && ! defined(CYGWIN)
       if (!xmlStrnCmp(uri, "file:///", 8))
-	tempName = uri + 8;
+        tempName = uri + 8;
 #else
       if (!xmlStrnCmp(uri, "file:/", 6))
-	tempName = uri + 5; //  we need the leading '/'*/
-        while (tempName[0] == '/' && tempName[1] == '/' ) 
-            tempName++;
+        tempName = uri + 5; //  we need the leading '/'*/
+      while (tempName[0] == '/' && tempName[1] == '/' )
+        tempName++;
 #endif
     }
 
-    /* If we've found something check to see if the file name 
+    /* If we've found something check to see if the file name
        found is to be valid */
     if (tempName)
       result = (xmlChar*) xmlStrdup(tempName);
       unescapedFileName =  (xmlChar*) xmlStrdup(tempName);
       if (result && unescapedFileName){
-	if (PATHCHAR != URISEPARATORCHAR){
-	  /* Must convert path separators first */
-	  xmlChar *probe = result;
-	  while(*probe != '\0'){
-	    if (*probe == (xmlChar)URISEPARATORCHAR)
-	      *probe = (xmlChar)PATHCHAR;
-	    probe++;
-	  }
-	}
-	/* Now unescape the file name in result so far
-	* NB: An unescaped name takes less memory that an escaped name
-	*/
-	xmlURIUnescapeString((char*)result, -1,  (char*)unescapedFileName);
-	xmlFree(result);
-	/* success we've got an local unescaped file name */
-	result = unescapedFileName;
+        if (PATHCHAR != URISEPARATORCHAR){
+          /* Must convert path separators first */
+          xmlChar *probe = result;
+          while(*probe != '\0'){
+            if (*probe == (xmlChar)URISEPARATORCHAR)
+              *probe = (xmlChar)PATHCHAR;
+            probe++;
+          }
+        }
+        /* Now unescape the file name in result so far
+        * NB: An unescaped name takes less memory that an escaped name
+        */
+        xmlURIUnescapeString((char*)result, -1,  (char*)unescapedFileName);
+        xmlFree(result);
+        /* success we've got an local unescaped file name */
+        result = unescapedFileName;
       }else{
-        xsldbgGenericErrorFunc(i18n("Error: Out of memory.\n"));	
-	if (result){
-	  xmlFree(result);
-	}
-	if (unescapedFileName) /* not needed, here for completeness */
-	  xmlFree(unescapedFileName);
-
-	result = NULL;
+        xsldbgGenericErrorFunc(i18n("Error: Out of memory.\n"));
+        if (result){
+          xmlFree(result);
+        }
+        if (unescapedFileName) /* not needed, here for completeness */
+          xmlFree(unescapedFileName);
+
+        result = NULL;
       }
     }else{
         xsldbgGenericErrorFunc(i18n("Error: Unable to convert %1 to local file name.\n").arg(xsldbgText(uri)));
@@ -1373,8 +1372,8 @@ xmlChar *filesURItoFileName(const xmlChar* uri)
 /**
  * xsldbgUpdateFileDetails:
  * @node : A valid node
- * 
- * Update the URL and  line number that we stoped at 
+ *
+ * Update the URL and  line number that we stoped at
  */
 void
 xsldbgUpdateFileDetails(xmlNodePtr node)
@@ -1391,7 +1390,7 @@ xsldbgUpdateFileDetails(xmlNodePtr node)
 /**
  * xsldbgLineNo:
  *
- * What line number are we at 
+ * What line number are we at
  *
  * Returns The current line number of xsldbg, may be -1
  **/
@@ -1404,11 +1403,11 @@ xsldbgLineNo(void)
 
 /**
  * xsldbgUrl:
- * 
+ *
  * What URL did we stop at
  *
  * Returns A NEW copy of URL stopped at. Caller must free memory for URL.
- *  May be NULL  
+ *  May be NULL
  */
 xmlChar *
 xsldbgUrl(void)
diff --git a/src/kxsldbgpart/libxsldbg/help_unix.cpp b/src/kxsldbgpart/libxsldbg/help_unix.cpp
index 53a3272..45e40df 100644
--- a/src/kxsldbgpart/libxsldbg/help_unix.cpp
+++ b/src/kxsldbgpart/libxsldbg/help_unix.cpp
@@ -56,15 +56,15 @@ helpTop(const xmlChar * args)
     //Extra phrases to support translation of help display see tdewebdev/doc/xsldbg/xsldbghelp.xml and tdewebdev/kxsldbg/xsldbghelp.xsl
     static const char* xsldbghelp_translations[] =
     {
-	I18N_NOOP("xsldbg version"),
-	I18N_NOOP("Help document version"),
-	I18N_NOOP("Help not found for command")
+        I18N_NOOP("xsldbg version"),
+        I18N_NOOP("Help document version"),
+        I18N_NOOP("Help not found for command")
     };
 
     TQString xsldbgVerTxt(i18n("xsldbg version"));
     TQString helpDocVerTxt(i18n("Help document version"));
     TQString helpErrorTxt(i18n("Help not found for command"));
-    
+
 
     char buff[500], helpParam[100];
 
@@ -92,7 +92,7 @@ helpTop(const xmlChar * args)
                  QUOTECHAR, helpDocVerTxt.utf8().data(), QUOTECHAR,
                  QUOTECHAR, helpErrorTxt.utf8().data(), QUOTECHAR,
                  filesTempFileName(0),
-		 docsDirPath);
+                 docsDirPath);
         if (xslDbgShellExecute((xmlChar *) buff, optionsGetIntOption(OPTIONS_VERBOSE)) == 0) {
             if (docsDirPath)
                 xsldbgGenericErrorFunc(i18n("Error: Unable to display help. Help files not found in %1 or xsldbg not found in path.\n").arg(docsDirPath)); /* FIXME: Comments not correct - the command is that invoked  */
diff --git a/src/kxsldbgpart/libxsldbg/nodeview_cmds.cpp b/src/kxsldbgpart/libxsldbg/nodeview_cmds.cpp
index 9a51cd6..074cbce 100644
--- a/src/kxsldbgpart/libxsldbg/nodeview_cmds.cpp
+++ b/src/kxsldbgpart/libxsldbg/nodeview_cmds.cpp
@@ -42,7 +42,7 @@ static int printVariableValue = 0;
  * It is used by print_variable function.
  * @payload : not used
  * @data : not used
- * @name : the variable name 
+ * @name : the variable name
  */
 void *xslDbgShellPrintNames(void *payload,
                             void *data, xmlChar * name);
@@ -69,16 +69,16 @@ static void xslDbgCatToFile(xmlNodePtr node, FILE * file);
  */
 static int printXPathObject(xmlXPathObjectPtr item, xmlChar* xPath);
 
-/* ------------------------------------- 
+/* -------------------------------------
     End private functions
 ---------------------------------------*/
 
 
 /**
- * xslDbgShellPrintList: 
+ * xslDbgShellPrintList:
  * @ctxt: The current shell context
  * @arg: What xpath to display and in UTF-8
- * @dir: If 1 print in dir mode?, 
+ * @dir: If 1 print in dir mode?,
  *        otherwise ls mode
  *
  * Print list of nodes in either ls or dir format
@@ -166,7 +166,7 @@ xslDbgCatToFile(xmlNodePtr node, FILE * file)
         else
             htmlNodeDumpFile(file, node->doc, node);
     } else if (node->type == XML_DOCUMENT_NODE) {
-        /* turn off encoding for the moment and just dump UTF-8 
+        /* turn off encoding for the moment and just dump UTF-8
          * which will be converted by xsldbgGeneralErrorFunc */
         xmlDocPtr doc = (xmlDocPtr) node;
         auto encoding = doc->encoding;
@@ -177,7 +177,7 @@ xslDbgCatToFile(xmlNodePtr node, FILE * file)
         xmlDocDump(file, (xmlDocPtr) node);
         doc->encoding = encoding;
     } else {
-	xmlElemDump(file, node->doc, node);
+        xmlElemDump(file, node->doc, node);
     }
 }
 
@@ -196,121 +196,121 @@ xslDbgCatToFile(xmlNodePtr node, FILE * file)
 static int
 printXPathObject(xmlXPathObjectPtr item, xmlChar* xPath){
   int result = 0;
-  if (item){ 
+  if (item){
     switch (item->type) {
     case XPATH_BOOLEAN:
       xsltGenericError(xsltGenericErrorContext,
-		       "= %s\n%s\n", xPath,
-		       xmlBoolToText(item->boolval));
+                       "= %s\n%s\n", xPath,
+                       xmlBoolToText(item->boolval));
       result = 1;
       break;
 
     case XPATH_NUMBER:
       xsltGenericError(xsltGenericErrorContext,
-		       "= %s\n%0g\n", xPath, item->floatval);
+                       "= %s\n%0g\n", xPath, item->floatval);
       result = 1;
       break;
 
       /*  case XPATH_NODESET:*/
     default:{
-	/* We may need to convert this XPath to a string,
-	   plus ensure that we print required the number of
-	   lines of text */
-	int indx;
-
-	const char *fileName = filesTempFileName(0);
-	FILE *file = NULL;
-
-	if (!fileName)
-	  break;
-	file = fopen(fileName, "w+");
-	if (!file) {
-	   xsldbgGenericErrorFunc(i18n("Error: Unable to save temporary results to %1.\n").arg(xsldbgText(fileName)));
-	  break;
-	} else {
-	  fprintf(file, "= %s\n", xPath);
-	  switch(item->type){
-
-	  case XPATH_NODESET:
-	    if (item->nodesetval){
-	      for (indx = 0;
-		   indx < item->nodesetval->nodeNr; indx++){ 
-				xslDbgCatToFile(item->nodesetval->
-						nodeTab[indx], file);
-	      }
-	    } else {
-	      xsldbgGenericErrorFunc(i18n("Error: XPath %1 results in an empty Node Set.\n").arg(xsldbgText(xPath)));
-	    }
-	    break;
-			     
-	  case XPATH_STRING:
-	    if (item->stringval)
-	      fprintf(file, "\'%s\'", item->stringval);
-	    else
-	      fprintf(file, "%s", i18n("NULL string value supplied.").utf8().data());
-	    break;
-			     
-	  default:{
-	      xmlXPathObjectPtr tempObj = 
-		xmlXPathObjectCopy(item);
-	      if (tempObj)
-		tempObj = xmlXPathConvertString(tempObj);
-	      if (tempObj && tempObj->stringval){
-		fprintf(file, "%s", tempObj->stringval);
-	      }else{
-		fprintf(file, "%s", i18n("Unable to convert XPath to string.").utf8().data());	
-	      }
-	      if (tempObj)
-		xmlXPathFreeObject(tempObj);
-	    }
-	    break;
-	    fprintf(file,"\n");	    
-
-	  } /* inner switch statement  */
-	  if (getThreadStatus() == XSLDBG_MSG_THREAD_RUN) {
-	    fclose(file);
-	    file = NULL;
-	    /* send the data to application */
-	    notifyXsldbgApp(XSLDBG_MSG_FILEOUT, fileName);
-	  } else {
-	    int lineCount = 0, gdbModeEnabled = 0;
-
-	    /* save the value of option to speed things up
-	     * a bit */
-	    gdbModeEnabled =
-	      optionsGetIntOption(OPTIONS_GDB);
-	    rewind(file);
-
-	    /* when gdb mode is enable then only print the first
-	     * GDB_LINES_TO_PRINT lines */
-	    while (!feof(file)) {
-	      if (fgets
-		  ((char *) nodeViewBuffer, sizeof(nodeViewBuffer),
-		   file))
-		xsltGenericError
-		  (xsltGenericErrorContext, "%s",
-		   nodeViewBuffer);
-	      if (gdbModeEnabled) {
-		lineCount++;
-		/* there is an overhead of two lines
-		 * when print expression values */
-		if (lineCount ==
-		    GDB_LINES_TO_PRINT + 2) {
-		  xsltGenericError
-		    (xsltGenericErrorContext,
-		     "...");
-		  break;
-		}
-	      }
-	    }
-	    xsltGenericError
-	      (xsltGenericErrorContext, "\n");
-	  }
-	  if (file)
-	    fclose(file);
-	  result = 1;
-	  break;
-	}
+        /* We may need to convert this XPath to a string,
+           plus ensure that we print required the number of
+           lines of text */
+        int indx;
+
+        const char *fileName = filesTempFileName(0);
+        FILE *file = NULL;
+
+        if (!fileName)
+          break;
+        file = fopen(fileName, "w+");
+        if (!file) {
+          xsldbgGenericErrorFunc(i18n("Error: Unable to save temporary results to %1.\n").arg(xsldbgText(fileName)));
+          break;
+        } else {
+          fprintf(file, "= %s\n", xPath);
+          switch(item->type){
+
+          case XPATH_NODESET:
+            if (item->nodesetval){
+              for (indx = 0;
+                   indx < item->nodesetval->nodeNr; indx++){
+                  xslDbgCatToFile(item->nodesetval->
+                  nodeTab[indx], file);
+              }
+            } else {
+              xsldbgGenericErrorFunc(i18n("Error: XPath %1 results in an empty Node Set.\n").arg(xsldbgText(xPath)));
+            }
+            break;
+
+          case XPATH_STRING:
+            if (item->stringval)
+              fprintf(file, "\'%s\'", item->stringval);
+            else
+              fprintf(file, "%s", i18n("NULL string value supplied.").utf8().data());
+            break;
+
+          default:{
+              xmlXPathObjectPtr tempObj =
+              xmlXPathObjectCopy(item);
+              if (tempObj)
+                tempObj = xmlXPathConvertString(tempObj);
+              if (tempObj && tempObj->stringval){
+                fprintf(file, "%s", tempObj->stringval);
+              }else{
+                fprintf(file, "%s", i18n("Unable to convert XPath to string.").utf8().data());
+              }
+              if (tempObj)
+                xmlXPathFreeObject(tempObj);
+           }
+           break;
+           fprintf(file,"\n");
+
+          } /* inner switch statement  */
+          if (getThreadStatus() == XSLDBG_MSG_THREAD_RUN) {
+            fclose(file);
+            file = NULL;
+            /* send the data to application */
+            notifyXsldbgApp(XSLDBG_MSG_FILEOUT, fileName);
+          } else {
+            int lineCount = 0, gdbModeEnabled = 0;
+
+            /* save the value of option to speed things up
+             * a bit */
+            gdbModeEnabled =
+              optionsGetIntOption(OPTIONS_GDB);
+            rewind(file);
+
+            /* when gdb mode is enable then only print the first
+             * GDB_LINES_TO_PRINT lines */
+            while (!feof(file)) {
+              if (fgets
+                ((char *) nodeViewBuffer, sizeof(nodeViewBuffer),
+                   file))
+                xsltGenericError
+                  (xsltGenericErrorContext, "%s",
+                   nodeViewBuffer);
+              if (gdbModeEnabled) {
+                lineCount++;
+                /* there is an overhead of two lines
+                 * when print expression values */
+                if (lineCount ==
+                    GDB_LINES_TO_PRINT + 2) {
+                xsltGenericError
+                    (xsltGenericErrorContext,
+                     "...");
+                  break;
+                }
+              }
+            }
+            xsltGenericError
+              (xsltGenericErrorContext, "\n");
+          }
+          if (file)
+            fclose(file);
+          result = 1;
+          break;
+        }
       }
     }
   }
@@ -318,7 +318,7 @@ printXPathObject(xmlXPathObjectPtr item, xmlChar* xPath){
 }
 
 
-/** 
+/**
  * xslDbgShellCat:
  * @styleCtxt: the current stylesheet context
  * @ctxt: The current shell context
@@ -345,15 +345,15 @@ xslDbgShellCat(xsltTransformContextPtr styleCtxt, xmlShellCtxtPtr ctxt,
 
     /* Do we quietly ingore style context errors */
     if (strncasecmp((char*)arg, QUIET_STR, strlen(QUIET_STR))== 0){
-      silenceCtxtErrors = true;	
+      silenceCtxtErrors = true;
       arg = arg + strlen(QUIET_STR);
       while (isspace(*arg)){
-	arg++;
+        arg++;
       }
     }
 
     if (!styleCtxt || !ctxt || !ctxt->node) {
-	if (!(!xsldbgReachedFirstTemplate && silenceCtxtErrors)) 
+        if (!(!xsldbgReachedFirstTemplate && silenceCtxtErrors))
         xsldbgGenericErrorFunc(i18n("Warning: Unable to print expression. No stylesheet was properly loaded.\n"));
         return 0;
     }
@@ -394,7 +394,7 @@ static int varCount;
  * It is used by print_variable function.
  * @payload : Global variable of type xsltStackElemPtr
  * @data : not used
- * @name : the variable name 
+ * @name : the variable name
  */
 void *
 xslDbgShellPrintNames(void *payload,
@@ -407,28 +407,28 @@ xslDbgShellPrintNames(void *payload,
     } else if (payload && name) {
         xmlChar * fullQualifiedName = nodeViewBuffer;
         xsltStackElemPtr item = (xsltStackElemPtr)payload;
-	if (item->nameURI == NULL){
-	    snprintf((char*)fullQualifiedName, sizeof(nodeViewBuffer), "$%s", item->name);
-	}else{
-	    snprintf((char*)fullQualifiedName, sizeof(nodeViewBuffer), "$%s:%s",
-		     item->nameURI, item->name);
-	}
+        if (item->nameURI == NULL){
+            snprintf((char*)fullQualifiedName, sizeof(nodeViewBuffer), "$%s", item->name);
+        }else{
+            snprintf((char*)fullQualifiedName, sizeof(nodeViewBuffer), "$%s:%s",
+                     item->nameURI, item->name);
+        }
         if (printVariableValue == 0){
-	    xsldbgGenericErrorFunc(i18n(" Global %1\n").arg(xsldbgText(fullQualifiedName)));
+            xsldbgGenericErrorFunc(i18n(" Global %1\n").arg(xsldbgText(fullQualifiedName)));
         }else{
-	      if (item->computed == 1){
-	         xsldbgGenericErrorFunc(i18n(" Global "));
-		 printXPathObject(item->value, fullQualifiedName);
-	      }else if (item->tree){
-	         xsldbgGenericErrorFunc(i18n(" Global = %1\n").arg(xsldbgText(fullQualifiedName)));
-		 xslDbgCatToFile(item->tree, stderr);
-	      }else if (item->select){
-	         xsldbgGenericErrorFunc(i18n(" Global = %1\n%2").arg(xsldbgText(fullQualifiedName)).arg(xsldbgText(item->select)));
-	      }else{
-		/* can't find a value give only a variable name an error message */
-		xsldbgGenericErrorFunc(i18n(" Global = %1\n%2").arg(xsldbgText(fullQualifiedName)).arg(i18n("Warning: No value assigned to variable.\n")));
-	      }
-	    xsltGenericError(xsltGenericErrorContext, "\n\032\032\n");
+            if (item->computed == 1){
+                xsldbgGenericErrorFunc(i18n(" Global "));
+                printXPathObject(item->value, fullQualifiedName);
+            }else if (item->tree){
+                xsldbgGenericErrorFunc(i18n(" Global = %1\n").arg(xsldbgText(fullQualifiedName)));
+                xslDbgCatToFile(item->tree, stderr);
+            }else if (item->select){
+                xsldbgGenericErrorFunc(i18n(" Global = %1\n%2").arg(xsldbgText(fullQualifiedName)).arg(xsldbgText(item->select)));
+            }else{
+                /* can't find a value give only a variable name an error message */
+                xsldbgGenericErrorFunc(i18n(" Global = %1\n%2").arg(xsldbgText(fullQualifiedName)).arg(i18n("Warning: No value assigned to variable.\n")));
+            }
+            xsltGenericError(xsltGenericErrorContext, "\n\032\032\n");
         }
         varCount++;
     }
@@ -439,7 +439,7 @@ xslDbgShellPrintNames(void *payload,
 
 /**
  * xslDbgShellPrintVariable:
- * @styleCtxt: The current stylesheet context 
+ * @styleCtxt: The current stylesheet context
  * @arg: The name of variable to look for '$' prefix is optional and in UTF-8
  * @type: A valid VariableTypeEnum
  *
@@ -470,16 +470,16 @@ xslDbgShellPrintVariable(xsltTransformContextPtr styleCtxt, xmlChar * arg,
     varCount = 0;
     /* Do we quietly ingore style context errors */
     if (strncasecmp((char*)arg, QUIET_STR, strlen(QUIET_STR))== 0){
-      silenceCtxtErrors = true;	
+      silenceCtxtErrors = true;
       arg = arg + strlen(QUIET_STR);
       while (isspace(*arg)){
-	arg++;
+          arg++;
       }
     }
 
     if (!styleCtxt) {
-	if (!(!xsldbgReachedFirstTemplate && silenceCtxtErrors)) 
-	    xsldbgGenericErrorFunc(i18n("Error: Debugger has no files loaded or libxslt has not reached a template.\nTry reloading files or taking more steps.\n"));
+        if (!(!xsldbgReachedFirstTemplate && silenceCtxtErrors))
+            xsldbgGenericErrorFunc(i18n("Error: Debugger has no files loaded or libxslt has not reached a template.\nTry reloading files or taking more steps.\n"));
         return result;
     }
 
@@ -488,7 +488,7 @@ xslDbgShellPrintVariable(xsltTransformContextPtr styleCtxt, xmlChar * arg,
       printVariableValue = 1;
       arg = arg + strlen(FULLNAME_STR);
       while (isspace(*arg)){
-	arg++;
+          arg++;
       }
     }
     if (arg[0] == 0) {
@@ -508,13 +508,13 @@ xslDbgShellPrintVariable(xsltTransformContextPtr styleCtxt, xmlChar * arg,
                                 (xmlHashScanner) xslDbgShellPrintNames,
                                 NULL);
                 result = 1;
-                /* ensure that the locals follow imediately after the 
+                /* ensure that the locals follow imediately after the
                  * globals when in gdb mode */
                 if (optionsGetIntOption(OPTIONS_GDB) == 0)
                     xsltGenericError(xsltGenericErrorContext, "\n");
             } else {
                 if (getThreadStatus() != XSLDBG_MSG_THREAD_RUN) {
-                    /* Don't show this message when running as a thread as it 
+                    /* Don't show this message when running as a thread as it
                      * is annoying */
                     xsldbgGenericErrorFunc(i18n("Error: Libxslt has not initialized variables yet; try stepping to a template.\n"));
                 } else {
@@ -527,57 +527,57 @@ xslDbgShellPrintVariable(xsltTransformContextPtr styleCtxt, xmlChar * arg,
         } else {
             /* list local variables */
             if (styleCtxt->varsNr &&  styleCtxt->varsTab) {
-		if (getThreadStatus() == XSLDBG_MSG_THREAD_RUN) {
-		    notifyListStart(XSLDBG_MSG_LOCALVAR_CHANGED);
-		    for (int i = styleCtxt->varsNr; i > styleCtxt->varsBase; i--) {
-			    xsltStackElemPtr item = styleCtxt->varsTab[i-1];
-			    while (item) {
-				    notifyListQueue(item);
-				    item = item->next;
-			    }
-		    }
-		    notifyListSend();
+                if (getThreadStatus() == XSLDBG_MSG_THREAD_RUN) {
+                    notifyListStart(XSLDBG_MSG_LOCALVAR_CHANGED);
+                    for (int i = styleCtxt->varsNr; i > styleCtxt->varsBase; i--) {
+                        xsltStackElemPtr item = styleCtxt->varsTab[i-1];
+                        while (item) {
+                            notifyListQueue(item);
+                            item = item->next;
+                        }
+                    }
+                    notifyListSend();
                 } else {
-		    xmlChar * fullQualifiedName = nodeViewBuffer;
-		    for (int i = styleCtxt->varsNr; i > styleCtxt->varsBase; i--) {
-			    xsltStackElemPtr item = styleCtxt->varsTab[i-1];
-			    while (item) {		      
-				    if (item->name) {			     
-					    if (item->nameURI == NULL){
-						    snprintf((char*)fullQualifiedName, sizeof(nodeViewBuffer), "$%s",
-								    item->name);
-					    }else{
-
-						    snprintf((char*)fullQualifiedName, sizeof(nodeViewBuffer), "$%s:%s",
-								    item->nameURI, item->name);
-					    }
-					    if (printVariableValue == 0){
-						    xsldbgGenericErrorFunc(i18n(" Local %1").arg(xsldbgText(fullQualifiedName)));
-					    }else{
-						    if (item->computed == 1){
-							    xsldbgGenericErrorFunc(i18n(" Local "));
-							    printXPathObject(item->value, fullQualifiedName);
-						    }else if (item->tree){
-							    xsldbgGenericErrorFunc(i18n(" Local = %1\n").arg(xsldbgText(fullQualifiedName)));
-							    xslDbgCatToFile(item->tree, stderr);
-						    }else if (item->select){
-							    xsldbgGenericErrorFunc(i18n(" Local = %1\n%2").arg(xsldbgText(fullQualifiedName)).arg(xsldbgText(item->select)));
-						    }else{
-							    /* can't find a value give only a variable name and an error */
-							    xsldbgGenericErrorFunc(i18n(" Local = %1\n%2").arg(xsldbgText(fullQualifiedName)).arg(i18n("Warning: No value assigned to variable.\n")));
-						    }
-					    }
-					    xsltGenericError(xsltGenericErrorContext, "\n\032\032\n");
-				    }
-				    item = item->next;
-			    }
-		    }
+                    xmlChar * fullQualifiedName = nodeViewBuffer;
+                    for (int i = styleCtxt->varsNr; i > styleCtxt->varsBase; i--) {
+                        xsltStackElemPtr item = styleCtxt->varsTab[i-1];
+                        while (item) {
+                            if (item->name) {
+                                if (item->nameURI == NULL){
+                                    snprintf((char*)fullQualifiedName, sizeof(nodeViewBuffer), "$%s",
+                                             item->name);
+                                }else{
+
+                                    snprintf((char*)fullQualifiedName, sizeof(nodeViewBuffer), "$%s:%s",
+                                             item->nameURI, item->name);
+                                }
+                                if (printVariableValue == 0){
+                                    xsldbgGenericErrorFunc(i18n(" Local %1").arg(xsldbgText(fullQualifiedName)));
+                                }else{
+                                    if (item->computed == 1){
+                                        xsldbgGenericErrorFunc(i18n(" Local "));
+                                        printXPathObject(item->value, fullQualifiedName);
+                                    }else if (item->tree){
+                                        xsldbgGenericErrorFunc(i18n(" Local = %1\n").arg(xsldbgText(fullQualifiedName)));
+                                        xslDbgCatToFile(item->tree, stderr);
+                                    }else if (item->select){
+                                        xsldbgGenericErrorFunc(i18n(" Local = %1\n%2").arg(xsldbgText(fullQualifiedName)).arg(xsldbgText(item->select)));
+                                    }else{
+                                        /* can't find a value give only a variable name and an error */
+                                        xsldbgGenericErrorFunc(i18n(" Local = %1\n%2").arg(xsldbgText(fullQualifiedName)).arg(i18n("Warning: No value assigned to variable.\n")));
+                                    }
+                                }
+                                xsltGenericError(xsltGenericErrorContext, "\n\032\032\n");
+                            }
+                            item = item->next;
+                        }
+                    }
                 }
                 result = 1;
                 xsltGenericError(xsltGenericErrorContext, "\n");
             } else {
                 if (getThreadStatus() != XSLDBG_MSG_THREAD_RUN) {
-                    /* Don't show this message when running as a thread as it 
+                    /* Don't show this message when running as a thread as it
                      * is annoying */
                     xsldbgGenericErrorFunc(i18n("Error: Libxslt has not initialized variables yet; try stepping past the xsl:param elements in the template.\n"));
                 } else {
@@ -592,13 +592,13 @@ xslDbgShellPrintVariable(xsltTransformContextPtr styleCtxt, xmlChar * arg,
         /* Display the value of variable */
         if (arg[0] == '$') {
             printXPathObject(xmlXPathEval(arg, styleCtxt->xpathCtxt), arg);
-	    xsltGenericError(xsltGenericErrorContext, "\032\032\n");
+            xsltGenericError(xsltGenericErrorContext, "\032\032\n");
         } else {
             xmlStrCpy(nodeViewBuffer, "$");
             xmlStrCat(nodeViewBuffer, arg);
-	    printXPathObject(xmlXPathEval((xmlChar*)nodeViewBuffer,styleCtxt->xpathCtxt),
-			     (xmlChar*)nodeViewBuffer);
-	    xsltGenericError(xsltGenericErrorContext, "\032\032\n");
+            printXPathObject(xmlXPathEval((xmlChar*)nodeViewBuffer,styleCtxt->xpathCtxt),
+                             (xmlChar*)nodeViewBuffer);
+            xsltGenericError(xsltGenericErrorContext, "\032\032\n");
         }
 
     }
diff --git a/src/kxsldbgpart/libxsldbg/option_cmds.cpp b/src/kxsldbgpart/libxsldbg/option_cmds.cpp
index 0bc5436..5f46172 100644
--- a/src/kxsldbgpart/libxsldbg/option_cmds.cpp
+++ b/src/kxsldbgpart/libxsldbg/option_cmds.cpp
@@ -29,8 +29,8 @@
 /**
  * xslDbgShellSetOption:
  * @arg : Is valid, and in the format   <NAME> <VALUE>
- * 
- * Set the value of an option 
+ *
+ * Set the value of an option
  *
  * Returns 1 on success,
  *         0 otherwise
@@ -55,25 +55,25 @@ xslDbgShellSetOption(xmlChar * arg)
 
 
         if (splitString(arg, 2, opts) == 2) {
-	    bool invertOption = false;
+            bool invertOption = false;
             optID = optionsGetOptionID(opts[0]);
-	    if ((optID == -1) && (opts[0][0] == 'n') &&  (opts[0][1] == 'o')){
-		optID = optionsGetOptionID(&opts[0][2]);
-		if (optID != -1){
-		    // invert the value the user provides
-		    invertOption = true;     
-		}
-	    }
+            if ((optID == -1) && (opts[0][0] == 'n') &&  (opts[0][1] == 'o')){
+                optID = optionsGetOptionID(&opts[0][2]);
+                if (optID != -1){
+                    // invert the value the user provides
+                    invertOption = true;
+                }
+            }
 
             if (optID >= OPTIONS_FIRST_INT_OPTIONID) {
                 if (optID <= OPTIONS_LAST_INT_OPTIONID) {
                     /* handle setting integer option */
                     if ((xmlStrlen(opts[1]) == 0) ||
-			!sscanf((char *) opts[1], "%ld", &optValue)) {
-			 xsldbgGenericErrorFunc(i18n("Error: Unable to parse %1 as an option value.\n").arg(xsldbgText(opts[1])));
+                        !sscanf((char *) opts[1], "%ld", &optValue)) {
+                        xsldbgGenericErrorFunc(i18n("Error: Unable to parse %1 as an option value.\n").arg(xsldbgText(opts[1])));
                     } else {
-			if (invertOption)
-			    optValue = !optValue;
+                        if (invertOption)
+                            optValue = !optValue;
                         result = optionsSetIntOption(OptionTypeEnum(optID), optValue);
                     }
                 } else {
@@ -82,38 +82,38 @@ xslDbgShellSetOption(xmlChar * arg)
 
                 }
             } else {
-		static xmlExternalEntityLoader xsldbgDefaultEntLoader = 0;
-		bool invertOption = false;
-		bool enableNet = false;
-
-		if (!xsldbgDefaultEntLoader)
-		    xsldbgDefaultEntLoader = xmlGetExternalEntityLoader(); 
-
-		if (xmlStrEqual(opts[0], (const xmlChar *)"nonet" ))
-		    invertOption = true;
-		    
-		if (xmlStrEqual(&opts[0][2*invertOption], (const xmlChar *)"net" )){
-		    if (sscanf((char *) opts[1], "%ld", &optValue)) {
-			if (invertOption)
-			    optValue = !optValue;
-			if (optValue)
-			    enableNet = true;
-			result = true;
-			if (enableNet)
-			    xmlSetExternalEntityLoader(xsldbgDefaultEntLoader);
-			else
-			    xmlSetExternalEntityLoader(xmlNoNetExternalEntityLoader);
-		    }else{
-			 xsldbgGenericErrorFunc(i18n("Error: Unable to parse %1 as an option value.\n").arg(xsldbgText(opts[1])));
-		    }
-		} else 
+                static xmlExternalEntityLoader xsldbgDefaultEntLoader = 0;
+                bool invertOption = false;
+                bool enableNet = false;
+
+                if (!xsldbgDefaultEntLoader)
+                    xsldbgDefaultEntLoader = xmlGetExternalEntityLoader();
+
+                if (xmlStrEqual(opts[0], (const xmlChar *)"nonet" ))
+                    invertOption = true;
+
+                if (xmlStrEqual(&opts[0][2*invertOption], (const xmlChar *)"net" )){
+                    if (sscanf((char *) opts[1], "%ld", &optValue)) {
+                        if (invertOption)
+                            optValue = !optValue;
+                        if (optValue)
+                            enableNet = true;
+                        result = true;
+                        if (enableNet)
+                            xmlSetExternalEntityLoader(xsldbgDefaultEntLoader);
+                        else
+                            xmlSetExternalEntityLoader(xmlNoNetExternalEntityLoader);
+                    }else{
+                        xsldbgGenericErrorFunc(i18n("Error: Unable to parse %1 as an option value.\n").arg(xsldbgText(opts[1])));
+                    }
+                } else
                 xsldbgGenericErrorFunc(i18n("Error: Unknown option name %1.\n").arg(xsldbgText(opts[0])));
             }
         } else {
             xsldbgGenericErrorFunc(i18n("Error: Missing arguments for the command %1.\n").arg("setoption"));
         }
     } else {
-	xsldbgGenericErrorFunc(i18n("Error: Missing arguments for the command %1.\n").arg("setoption"));
+        xsldbgGenericErrorFunc(i18n("Error: Missing arguments for the command %1.\n").arg("setoption"));
     }
 
     return result;
@@ -162,7 +162,7 @@ xslDbgShellOptions(void)
             }
 
         }
-	xsldbgGenericErrorFunc("\n");
+        xsldbgGenericErrorFunc("\n");
     } else {
         /* we are now notifying the application of the value of options */
         parameterItemPtr paramItem;
@@ -221,17 +221,17 @@ xslDbgShellOptions(void)
    * Returns 1 on success,
    *         0 otherwise
    */
-  int xslDbgShellShowWatches(xsltTransformContextPtr styleCtxt, 
-			       xmlShellCtxtPtr ctx,int showWarnings)
+  int xslDbgShellShowWatches(xsltTransformContextPtr styleCtxt,
+                             xmlShellCtxtPtr ctx,int showWarnings)
 {
-  int result = 0, counter;  
-  xmlChar* watchExpression;  
+  int result = 0, counter;
+  xmlChar* watchExpression;
   if ((showWarnings == 1) && (arrayListCount(optionsGetWatchList()) == 0)){
     xsldbgGenericErrorFunc(i18n("\tNo expression watches set.\n"));
   }
-  for ( counter = 0; 
-	counter < arrayListCount(optionsGetWatchList()); 
-	counter++){
+  for ( counter = 0;
+        counter < arrayListCount(optionsGetWatchList());
+        counter++){
     watchExpression = (xmlChar*)arrayListGet(optionsGetWatchList(), counter);
     if (watchExpression){
       xsldbgGenericErrorFunc(i18n(" WatchExpression %1 ").arg(counter + 1));
@@ -251,7 +251,7 @@ xslDbgShellOptions(void)
    * Add expression to list of expressions to watch value of
    *
    * Returns 1 on success,
-   *         0 otherwise   
+   *         0 otherwise
    */
   int xslDbgShellAddWatch(xmlChar* arg)
 {
@@ -282,14 +282,14 @@ xslDbgShellOptions(void)
     trimString(arg);
     if (arg[0] == '*') {
       arrayListEmpty(optionsGetWatchList());
-    }else if ((xmlStrlen(arg) == 0) || 
-	      !sscanf((char *) arg, "%ld", &watchID)) {
+    }else if ((xmlStrlen(arg) == 0) ||
+              !sscanf((char *) arg, "%ld", &watchID)) {
       xsldbgGenericErrorFunc(i18n("Error: Unable to parse %1 as a watchID.\n").arg(xsldbgText(arg)));
       return result;
     } else {
       result = optionsRemoveWatch(watchID);
       if (!result)
-	xsldbgGenericErrorFunc(i18n("Error: Watch expression %1 does not exist.\n").arg(watchID));
+        xsldbgGenericErrorFunc(i18n("Error: Watch expression %1 does not exist.\n").arg(watchID));
     }
   }
   return result;
diff --git a/src/kxsldbgpart/libxsldbg/xsldbg.cpp b/src/kxsldbgpart/libxsldbg/xsldbg.cpp
index df133fd..0d35f89 100644
--- a/src/kxsldbgpart/libxsldbg/xsldbg.cpp
+++ b/src/kxsldbgpart/libxsldbg/xsldbg.cpp
@@ -19,7 +19,7 @@
 /*
  * Based on file xsltproc.c
  *
- * by  Daniel Veillard 
+ * by  Daniel Veillard
  *     daniel@veillard.com
  *
  *  xsltproc.c is part of libxslt
@@ -97,7 +97,7 @@
 #include <libxslt/extensions.h>
 #include <libexslt/exsltconfig.h>
 
-#include <tdecmdlineargs.h> 
+#include <tdecmdlineargs.h>
 #include <tdeglobal.h>
 #include <tqfile.h>
 
@@ -155,7 +155,7 @@ xmlParserInputPtr xmlNoNetExternalEntityLoader(const char *URL,
 
 /**
  * xsldbgInit:
- * 
+ *
  * Returns 1 if able to allocate memory needed by xsldbg
  *         0 otherwise
  */
@@ -174,7 +174,7 @@ void xsldbgFree(void);
  * printTemplates:
  * @style : valid as parsed my xsldbg
  * @doc :    "    "   "     "    "
- *  
+ *
  * print out list of template names
  */
 void printTemplates(xsltStylesheetPtr style, xmlDocPtr doc);
@@ -203,8 +203,8 @@ void
  * @ctx:  Is Valid
  * @msg:  Is valid
  * @...:  other parameters to use
- * 
- * Handles print output from xsldbg and passes it to the application if 
+ *
+ * Handles print output from xsldbg and passes it to the application if
  *  running as a thread otherwise send to stderr
  */
 void
@@ -216,14 +216,14 @@ static xmlEntityPtr xsldbgGetEntity( void * user_data, const xmlChar * name)
 {
     xmlEntityPtr ent = NULL;
     if (oldGetEntity){
-	ent =  (oldGetEntity)(user_data, name);
-	if (ent)
-	    filesEntityRef(ent, ent->children, ent->last);
+        ent =  (oldGetEntity)(user_data, name);
+        if (ent)
+            filesEntityRef(ent, ent->children, ent->last);
     }
     return ent;
 }
 
-/* ------------------------------------- 
+/* -------------------------------------
    End private functions
    ---------------------------------------*/
 
@@ -354,7 +354,7 @@ xsltProcess(xmlDocPtr doc, xsltStylesheetPtr cur)
             startTimer();
         xmlXIncludeProcess(doc);
         if (optionsGetIntOption(OPTIONS_TIMING)) {
-	    /* Display the time taken to do XInclude processing */
+            /* Display the time taken to do XInclude processing */
             endTimer(i18n("XInclude processing %1.").arg((const char*)optionsGetStringOption(OPTIONS_DATA_FILE_NAME)));
         }
     }
@@ -381,7 +381,7 @@ xsltProcess(xmlDocPtr doc, xsltStylesheetPtr cur)
                      || (filesTempFileName(1) == NULL))
                 res = xsltProfileStylesheet(cur, doc, params, stderr);
             else {
-                /* We now have to output to using notify using 
+                /* We now have to output to using notify using
                  * temp file #1 */
                 FILE *tempFile = fopen(filesTempFileName(1), "w");
 
@@ -393,7 +393,7 @@ xsltProcess(xmlDocPtr doc, xsltStylesheetPtr cur)
                     notifyXsldbgApp(XSLDBG_MSG_FILEOUT,
                                     filesTempFileName(1));
                 } else {
-		     xsldbgGenericErrorFunc(i18n("Error: Unable to write temporary results to %1.\n").arg(filesTempFileName(1)));
+                    xsldbgGenericErrorFunc(i18n("Error: Unable to write temporary results to %1.\n").arg(filesTempFileName(1)));
                     res = xsltProfileStylesheet(cur, doc, params, stderr);
                 }
             }
@@ -402,10 +402,10 @@ xsltProcess(xmlDocPtr doc, xsltStylesheetPtr cur)
         }
         if (optionsGetIntOption(OPTIONS_PROFILING)) {
             if (optionsGetIntOption(OPTIONS_REPEAT))
-		/* Display how long it took to apply stylesheet */
+                /* Display how long it took to apply stylesheet */
                 endTimer(i18n("Applying stylesheet %n time", "Applying stylesheet %n times", optionsGetIntOption(OPTIONS_REPEAT)));
             else
-		/* Display how long it took to apply stylesheet */
+                /* Display how long it took to apply stylesheet */
                 endTimer(i18n("Applying stylesheet"));
         }
         if (res == NULL) {
@@ -422,75 +422,71 @@ xsltProcess(xmlDocPtr doc, xsltStylesheetPtr cur)
         }
 #ifdef LIBXML_DEBUG_ENABLED
         if (optionsGetIntOption(OPTIONS_DEBUG)) {
-	    if (xslDebugStatus != DEBUG_RUN_RESTART){
-		if (terminalIO != NULL)
-		    xmlDebugDumpDocument(terminalIO, res);
-		else if ((optionsGetStringOption(OPTIONS_OUTPUT_FILE_NAME) ==
-			    NULL) || (getThreadStatus() != XSLDBG_MSG_THREAD_RUN)
-			|| (filesTempFileName(1) == NULL))
-		    xmlDebugDumpDocument(stdout, res);
-		else {
-		    FILE *tempFile = fopen(filesTempFileName(1), "w");
-
-		    if (tempFile) {
-			bytesWritten = 0; // flag that we have writen at least zero bytes
-			xmlDebugDumpDocument(tempFile, res);
-			fclose(tempFile);
-			/* send the data to application */
-			notifyXsldbgApp(XSLDBG_MSG_FILEOUT,
-				filesTempFileName(1));
-		    } else {
-			 xsldbgGenericErrorFunc(i18n("Error: Unable to write temporary results to %1.\n").arg(filesTempFileName(1)));
-			xmlDebugDumpDocument(stdout, res);
-		    }
-
-		}
-	    }
+            if (xslDebugStatus != DEBUG_RUN_RESTART){
+                if (terminalIO != NULL)
+                    xmlDebugDumpDocument(terminalIO, res);
+                else if ((optionsGetStringOption(OPTIONS_OUTPUT_FILE_NAME) == NULL)
+                        || (getThreadStatus() != XSLDBG_MSG_THREAD_RUN)
+                        || (filesTempFileName(1) == NULL))
+                    xmlDebugDumpDocument(stdout, res);
+                else {
+                    FILE *tempFile = fopen(filesTempFileName(1), "w");
+
+                    if (tempFile) {
+                        bytesWritten = 0; // flag that we have writen at least zero bytes
+                        xmlDebugDumpDocument(tempFile, res);
+                        fclose(tempFile);
+                        /* send the data to application */
+                        notifyXsldbgApp(XSLDBG_MSG_FILEOUT,
+                                        filesTempFileName(1));
+                    } else {
+                        xsldbgGenericErrorFunc(i18n("Error: Unable to write temporary results to %1.\n").arg(filesTempFileName(1)));
+                        xmlDebugDumpDocument(stdout, res);
+                    }
+
+                }
+            }
         } else {
 #endif
-	    if (xslDebugStatus != DEBUG_RUN_RESTART){
-		if (cur->methodURI == NULL) {
-		    if (optionsGetIntOption(OPTIONS_TIMING))
-			startTimer();
-		    if (xslDebugStatus != DEBUG_QUIT) {
-			if (terminalIO != NULL)
-			    bytesWritten = xsltSaveResultToFile(terminalIO, res, cur);
-			else if (optionsGetStringOption
-				(OPTIONS_OUTPUT_FILE_NAME) == NULL)
-			    bytesWritten = xsltSaveResultToFile(stdout, res, cur);
-			else{
-			    bytesWritten = xsltSaveResultToFilename((const char *)
-				    optionsGetStringOption
-				    (OPTIONS_OUTPUT_FILE_NAME),
-				    res, cur, 0);
-		    }
-		    }
-		    if (optionsGetIntOption(OPTIONS_TIMING))
-			/* Indicate how long it took to save to file */
-			endTimer(i18n("Saving result"));
-		} else {
-		    if (xmlStrEqual(cur->method, (const xmlChar *) "xhtml")) {
-			xsldbgGenericErrorFunc(i18n("Warning: Generating non-standard output XHTML.\n"));
-			if (optionsGetIntOption(OPTIONS_TIMING))
-			    startTimer();
-			if (terminalIO != NULL)
-			    bytesWritten = xsltSaveResultToFile(terminalIO, res, cur);
-			else if (optionsGetStringOption
-				(OPTIONS_OUTPUT_FILE_NAME) == NULL)
-			    bytesWritten = xsltSaveResultToFile(stdout, res, cur);
-			else
-			    bytesWritten = xsltSaveResultToFilename((const char *)
-				    optionsGetStringOption
-				    (OPTIONS_OUTPUT_FILE_NAME),
-				    res, cur, 0);
-			if (optionsGetIntOption(OPTIONS_TIMING))
-			    /* Indicate how long it took to save to file */
-			    endTimer(i18n("Saving result"));
-		    } else {
-			xsldbgGenericErrorFunc(i18n("Warning: Unsupported, non-standard output method %1.\n").arg(xsldbgText(cur->method)));
-		    }
-		}
-	    }
+            if (xslDebugStatus != DEBUG_RUN_RESTART){
+                if (cur->methodURI == NULL) {
+                    if (optionsGetIntOption(OPTIONS_TIMING))
+                        startTimer();
+                    if (xslDebugStatus != DEBUG_QUIT) {
+                        if (terminalIO != NULL)
+                            bytesWritten = xsltSaveResultToFile(terminalIO, res, cur);
+                        else if (optionsGetStringOption(OPTIONS_OUTPUT_FILE_NAME) == NULL)
+                            bytesWritten = xsltSaveResultToFile(stdout, res, cur);
+                        else{
+                            bytesWritten = xsltSaveResultToFilename(
+                                    (const char *)optionsGetStringOption(OPTIONS_OUTPUT_FILE_NAME),
+                                    res, cur, 0);
+                        }
+                    }
+                    if (optionsGetIntOption(OPTIONS_TIMING))
+                        /* Indicate how long it took to save to file */
+                        endTimer(i18n("Saving result"));
+                } else {
+                    if (xmlStrEqual(cur->method, (const xmlChar *) "xhtml")) {
+                        xsldbgGenericErrorFunc(i18n("Warning: Generating non-standard output XHTML.\n"));
+                        if (optionsGetIntOption(OPTIONS_TIMING))
+                            startTimer();
+                        if (terminalIO != NULL)
+                            bytesWritten = xsltSaveResultToFile(terminalIO, res, cur);
+                        else if (optionsGetStringOption(OPTIONS_OUTPUT_FILE_NAME) == NULL)
+                            bytesWritten = xsltSaveResultToFile(stdout, res, cur);
+                        else
+                            bytesWritten = xsltSaveResultToFilename(
+                                (const char *)optionsGetStringOption(OPTIONS_OUTPUT_FILE_NAME),
+                                res, cur, 0);
+                        if (optionsGetIntOption(OPTIONS_TIMING))
+                            /* Indicate how long it took to save to file */
+                            endTimer(i18n("Saving result"));
+                    } else {
+                        xsldbgGenericErrorFunc(i18n("Warning: Unsupported, non-standard output method %1.\n").arg(xsldbgText(cur->method)));
+                    }
+                }
+            }
 #ifdef LIBXML_DEBUG_ENABLED
         }
 #endif
@@ -506,11 +502,11 @@ xsltProcess(xmlDocPtr doc, xsltStylesheetPtr cur)
             endTimer(i18n("Running stylesheet and saving result"));
         xsltFreeTransformContext(userCtxt);
         }else{
-	    xsldbgGenericErrorFunc(i18n("Error: Out of memory.\n"));
+            xsldbgGenericErrorFunc(i18n("Error: Out of memory.\n"));
         }
     }
     if ((xslDebugStatus != DEBUG_RUN_RESTART) && (bytesWritten == -1))
-	xsldbgGenericErrorFunc(i18n("Error: Unable to save results of transformation to file %1.\n").arg(xsldbgText(optionsGetStringOption(OPTIONS_OUTPUT_FILE_NAME)))); 
+        xsldbgGenericErrorFunc(i18n("Error: Unable to save results of transformation to file %1.\n").arg(xsldbgText(optionsGetStringOption(OPTIONS_OUTPUT_FILE_NAME))));
 }
 
 int
@@ -527,18 +523,18 @@ xsldbgMain(int argc, char **argv)
 
     /* the xml document we're processing */
     xmlDocPtr doc;
-    
+
     TDECmdLineArgs *args = 0;
     if (getThreadStatus() == XSLDBG_MSG_THREAD_NOTUSED)
-	args = TDECmdLineArgs::parsedArgs();
+        args = TDECmdLineArgs::parsedArgs();
 
     errorFile = stderr;
-    
+
 
     if (args){
-	TQString langChoice = args->getOption("lang");
-	if (TDEGlobal::locale() && !langChoice.isEmpty() && result)
-	    TDEGlobal::locale()->setLanguage(langChoice);
+        TQString langChoice = args->getOption("lang");
+        if (TDEGlobal::locale() && !langChoice.isEmpty() && result)
+            TDEGlobal::locale()->setLanguage(langChoice);
     }
 
 #ifdef __riscos
@@ -552,7 +548,7 @@ xsldbgMain(int argc, char **argv)
     LIBXML_TEST_VERSION xmlLineNumbersDefault(1);
 
     if (!xsldbgInit()) {
-	   xsldbgGenericErrorFunc(i18n("Fatal error: Aborting debugger due to an unrecoverable error.\n"));
+        xsldbgGenericErrorFunc(i18n("Fatal error: Aborting debugger due to an unrecoverable error.\n"));
         xsldbgFree();
         xsltCleanupGlobals();
         xmlCleanupParser();
@@ -562,66 +558,66 @@ xsldbgMain(int argc, char **argv)
 
 
     if (args){
-	for (i = 0; i < args->count(); i++) {
-	    if (!result)
-		break;
-
-	    if (args->arg(i)[0] != '-') {
-		expandedName = filesExpandName((const xmlChar*)args->arg(i));
-		if (!expandedName) {
-		    result = 0;
-		    break;
-		}
-		switch (noFilesFound) {
-		    case 0:
-			optionsSetStringOption(OPTIONS_SOURCE_FILE_NAME,
-				expandedName);
-			noFilesFound++;
-			break;
-		    case 1:
-			optionsSetStringOption(OPTIONS_DATA_FILE_NAME,
-				expandedName);
-			noFilesFound++;
-			break;
-
-		    default:
-			xsldbgGenericErrorFunc(i18n("Error: Too many file names supplied via command line.\n"));
-			result = 0;
-		}
-		xmlFree(expandedName);
-		continue;
-	    }
-	}  	
-
-
-	 // Handle boolean options
-	for (int optionID = OPTIONS_FIRST_BOOL_OPTIONID; optionID < OPTIONS_LAST_BOOL_OPTIONID; optionID++){
-	    if (optionsGetOptionName(OptionTypeEnum(optionID))){
-		if (args->isSet((char *)optionsGetOptionName(OptionTypeEnum(optionID))))
-		    optionsSetIntOption(OptionTypeEnum
-			    (optionID), 1);
-		else
-		    optionsSetIntOption(OptionTypeEnum(optionID), 0);
-	    }
-	}
-
-	// No extra arguments go straight to the shell? 
-	if (args->count() == 0)
-	    result = optionsSetIntOption(OPTIONS_SHELL, 1);
-
-	// Disable net access? 
-	if (!args->isSet("net")){
-	    char noNetCmd[] = {"nonet 1"}; 
-	    xslDbgShellSetOption((xmlChar*)noNetCmd);
-	}
+        for (i = 0; i < args->count(); i++) {
+            if (!result)
+                break;
+
+            if (args->arg(i)[0] != '-') {
+                expandedName = filesExpandName((const xmlChar*)args->arg(i));
+                if (!expandedName) {
+                    result = 0;
+                    break;
+                }
+                switch (noFilesFound) {
+                    case 0:
+                        optionsSetStringOption(OPTIONS_SOURCE_FILE_NAME,
+                                               expandedName);
+                        noFilesFound++;
+                        break;
+                    case 1:
+                        optionsSetStringOption(OPTIONS_DATA_FILE_NAME,
+                                               expandedName);
+                        noFilesFound++;
+                        break;
+
+                    default:
+                        xsldbgGenericErrorFunc(i18n("Error: Too many file names supplied via command line.\n"));
+                        result = 0;
+                }
+                xmlFree(expandedName);
+                continue;
+            }
+        }
+
+
+        // Handle boolean options
+        for (int optionID = OPTIONS_FIRST_BOOL_OPTIONID; optionID < OPTIONS_LAST_BOOL_OPTIONID; optionID++){
+            if (optionsGetOptionName(OptionTypeEnum(optionID))){
+                if (args->isSet((char *)optionsGetOptionName(OptionTypeEnum(optionID))))
+                    optionsSetIntOption(OptionTypeEnum
+                        (optionID), 1);
+                else
+                    optionsSetIntOption(OptionTypeEnum(optionID), 0);
+            }
+        }
+
+        // No extra arguments go straight to the shell?
+        if (args->count() == 0)
+            result = optionsSetIntOption(OPTIONS_SHELL, 1);
+
+        // Disable net access?
+        if (!args->isSet("net")){
+            char noNetCmd[] = {"nonet 1"};
+            xslDbgShellSetOption((xmlChar*)noNetCmd);
+        }
     }
-   
+
     if (getThreadStatus() != XSLDBG_MSG_THREAD_NOTUSED){
-	result = optionsSetIntOption(OPTIONS_SHELL, 1);
+        result = optionsSetIntOption(OPTIONS_SHELL, 1);
     }
     /* copy the volitile options over to xsldbg */
     optionsCopyVolitleOptions();
-    
+
     /*
      * shell interraction
      */
@@ -633,70 +629,70 @@ xsldbgMain(int argc, char **argv)
     }
 
     if (optionsGetIntOption(OPTIONS_VALID))
-	xmlLoadExtDtdDefaultValue = XML_DETECT_IDS | XML_COMPLETE_ATTRS;
+        xmlLoadExtDtdDefaultValue = XML_DETECT_IDS | XML_COMPLETE_ATTRS;
     else
-	xmlLoadExtDtdDefaultValue = 0;
+        xmlLoadExtDtdDefaultValue = 0;
 
 
     if (args){
-	if (args->isSet("verbose") && result)
-	    xsltSetGenericDebugFunc(stderr, NULL);
-
-	TQCString outFile = args->getOption("output");
-	if (!outFile.isEmpty() && result)
-	    result = xslDbgShellOutput((const xmlChar *)TQFile::encodeName(outFile).data());
-
-	TQCString maxDepth = args->getOption("maxdepth");
-	if (!maxDepth.isEmpty() && result){
-	    bool OK;
-	    int value = maxDepth.toInt(&OK);
-	    if (OK && (value> 0))
-		xsltMaxDepth = value;
-	}
-
-	if (args->isSet("repeat") && result){
-	    if (optionsGetIntOption(OPTIONS_REPEAT) == 0)
-		optionsSetIntOption(OPTIONS_REPEAT, 20);
-	    else
-		optionsSetIntOption(OPTIONS_REPEAT, 100);
-	}
-
-	QCStringList xslParams(args->getOptionList("param"));
-	QCStringList::iterator it;
-	TQCString param, paramName, paramValue;
-	int separatorIdx;
-	bool paramOK;
-	for ( it = xslParams.begin(); it != xslParams.end(); ++it){
-	    param = (*it);
-	    paramOK = true;
-	    separatorIdx = param.find(':');
-	    if (separatorIdx > 0){
-		paramName = param.left((uint)separatorIdx);
-		paramValue = param.mid((uint)separatorIdx + 1);
-		if (!paramName.isEmpty() && !paramValue.isEmpty()){
-		    if (arrayListCount(optionsGetParamItemList()) <= 31) {
-			arrayListAdd(optionsGetParamItemList(), optionsParamItemNew((const xmlChar*)paramName.data(), (const xmlChar*)paramValue.data()));
-		    }else{
-			xsldbgGenericErrorFunc(i18n("Warning: Too many libxslt parameters provided via the command line option --param.\n"));
-		    }
-		}else{
-		    paramOK = false;
-		}
-	    }else{
-		paramOK = false;
-	    }
-	    if (!paramOK)
-		xsldbgGenericErrorFunc(i18n("Error: Argument \"%1\" to --param is not in the format <name>:<value>.\n").arg(param.data()));
-	}
-
-	TQCString cdPath = args->getOption("cd");
-	if (!cdPath.isEmpty() && result)
-	    result = changeDir((const xmlChar *)TQFile::encodeName(cdPath).data());
+        if (args->isSet("verbose") && result)
+            xsltSetGenericDebugFunc(stderr, NULL);
+
+        TQCString outFile = args->getOption("output");
+        if (!outFile.isEmpty() && result)
+            result = xslDbgShellOutput((const xmlChar *)TQFile::encodeName(outFile).data());
+
+        TQCString maxDepth = args->getOption("maxdepth");
+        if (!maxDepth.isEmpty() && result){
+            bool OK;
+            int value = maxDepth.toInt(&OK);
+            if (OK && (value> 0))
+                xsltMaxDepth = value;
+        }
+
+        if (args->isSet("repeat") && result){
+            if (optionsGetIntOption(OPTIONS_REPEAT) == 0)
+                optionsSetIntOption(OPTIONS_REPEAT, 20);
+            else
+                optionsSetIntOption(OPTIONS_REPEAT, 100);
+        }
+
+        QCStringList xslParams(args->getOptionList("param"));
+        QCStringList::iterator it;
+        TQCString param, paramName, paramValue;
+        int separatorIdx;
+        bool paramOK;
+        for ( it = xslParams.begin(); it != xslParams.end(); ++it){
+            param = (*it);
+            paramOK = true;
+            separatorIdx = param.find(':');
+            if (separatorIdx > 0){
+                paramName = param.left((uint)separatorIdx);
+                paramValue = param.mid((uint)separatorIdx + 1);
+                if (!paramName.isEmpty() && !paramValue.isEmpty()){
+                    if (arrayListCount(optionsGetParamItemList()) <= 31) {
+                        arrayListAdd(optionsGetParamItemList(), optionsParamItemNew((const xmlChar*)paramName.data(), (const xmlChar*)paramValue.data()));
+                    }else{
+                        xsldbgGenericErrorFunc(i18n("Warning: Too many libxslt parameters provided via the command line option --param.\n"));
+                    }
+                }else{
+                    paramOK = false;
+                }
+            }else{
+                paramOK = false;
+            }
+            if (!paramOK)
+                xsldbgGenericErrorFunc(i18n("Error: Argument \"%1\" to --param is not in the format <name>:<value>.\n").arg(param.data()));
+        }
+
+        TQCString cdPath = args->getOption("cd");
+        if (!cdPath.isEmpty() && result)
+            result = changeDir((const xmlChar *)TQFile::encodeName(cdPath).data());
 
     }
 
     if (!result) {
-	TDECmdLineArgs::usage(); 
+        TDECmdLineArgs::usage();
         xsldbgFree();
         return (1);
     }
@@ -713,175 +709,175 @@ xsldbgMain(int argc, char **argv)
     exsltRegisterAll();
     xsltRegisterTestModule();
 
-    
+
 
     debugGotControl(0);
     while (xslDebugStatus != DEBUG_QUIT) {
-	xsldbgReachedFirstTemplate = false;
-	/* don't force xsldbg to show command prompt */
-	showPrompt = 0;
-	cur = NULL;
-	doc = NULL;
-	arrayListEmpty(filesEntityList());
-	xsltSetXIncludeDefault(optionsGetIntOption(OPTIONS_XINCLUDE));
-
-	/* copy the volitile options over to xsldbg */
-	optionsCopyVolitleOptions();
-
-	/* choose where error messages/xsldbg output get sent to */
-	if (optionsGetIntOption(OPTIONS_STDOUT))
-	    errorFile = stdout;
-	else
-	    errorFile = stderr;
-
-	filesLoadCatalogs();
-
-	if (optionsGetIntOption(OPTIONS_SHELL)) {
-	    debugGotControl(0);
-	    xsldbgGenericErrorFunc(i18n("\nStarting stylesheet\n\n"));
-	    if (optionsGetIntOption(OPTIONS_TRACE) == TRACE_OFF)
-		xslDebugStatus = DEBUG_STOP;    /* stop as soon as possible */
-	}
-
-	if ((optionsGetStringOption(OPTIONS_SOURCE_FILE_NAME) == NULL) ||
-		(optionsGetStringOption(OPTIONS_DATA_FILE_NAME) == NULL)) {
-	    /* at least on file name has not been set */
-	    /*goto a xsldbg command prompt */
-	    showPrompt = 1;
-	    if (optionsGetStringOption(OPTIONS_SOURCE_FILE_NAME) == NULL)
-		xsldbgGenericErrorFunc(i18n("Error: No XSLT source file supplied.\n"));
-
-	    if (optionsGetStringOption(OPTIONS_DATA_FILE_NAME) == NULL) {
-		xsldbgGenericErrorFunc(i18n("Error: No XML data file supplied.\n"));
-	    }
-
-	} else {
-	    filesLoadXmlFile(NULL, FILES_SOURCEFILE_TYPE);
-	    cur = filesGetStylesheet();
-	    if ((cur == NULL) || (cur->errors != 0)) {
-		/*goto a xsldbg command prompt */
-		showPrompt = 1;
-		if (xslDebugStatus == DEBUG_NONE) {
-		    xslDebugStatus = DEBUG_QUIT;        /* panic !! */
-		    result = 0;
-		}
-	    }
-	}
-
-	if (showPrompt == 0) {
-	    filesLoadXmlFile(NULL, FILES_XMLFILE_TYPE);
-	    doc = filesGetMainDoc();
-	    if (doc == NULL) {
-		if (xslDebugStatus == DEBUG_NONE) {
-		    xslDebugStatus = DEBUG_QUIT;        /* panic !! */
-		    result = 0;
-		} else {
-		    /*goto a xsldbg command prompt */
-		    showPrompt = 1;
-		}
-	    } else {
-		if (xslDebugStatus != DEBUG_QUIT) {
-		    xsltProcess(doc, cur);
-		    result = 1;
-		}
-	    }
-
-	    if (optionsGetIntOption(OPTIONS_SHELL) && (showPrompt == 0)) {
-		if ((xslDebugStatus != DEBUG_QUIT)
-			&& !debugGotControl(-1)) {
-		    xsldbgGenericErrorFunc(i18n("\nDebugger never received control.\n"));
-		    /*goto a xsldbg command prompt */
-		    showPrompt = 1;
-		    xslDebugStatus = DEBUG_STOP;
-		} else {
-		    xsldbgGenericErrorFunc(i18n("\nFinished stylesheet\n\n"));
-		    {
-			/* handle trace execution */
-			int trace = optionsGetIntOption(OPTIONS_TRACE);
-
-			switch (trace) {
-			    case TRACE_OFF:
-				/* no trace of execution */
-				break;
-
-			    case TRACE_ON:
-				/* tell xsldbg to stop tracing next time we get here */
-				optionsSetIntOption(OPTIONS_TRACE,
-					TRACE_RUNNING);
-				xslDebugStatus = DEBUG_TRACE;
-				break;
-
-			    case TRACE_RUNNING:
-				/* turn off tracing */
-				xslDebugStatus = DEBUG_CONT;
-				optionsSetIntOption(OPTIONS_TRACE,
-					TRACE_OFF);
-				break;
-			}
-		    }
-		    if (!optionsGetIntOption(OPTIONS_AUTORESTART) && (xslDebugStatus != DEBUG_RUN_RESTART)){ 
-			/* pass control to user they won't be able to do much
-			   other than add breakpoints, quit, run, continue */
-			debugXSLBreak((xmlNodePtr) cur->doc, (xmlNodePtr) doc,
-				NULL, NULL);
-		    }
-		}
-	    } else {
-		/* request to execute stylesheet only  so we're done */
-		xslDebugStatus = DEBUG_QUIT;
-	    }
-	} else {
-	    /* Some sort of problem loading source file has occured. Quit? */
-	    if (xslDebugStatus == DEBUG_NONE) {
-		xslDebugStatus = DEBUG_QUIT;    /* Panic!! */
-		result = 0;
-	    } else {
-		/*goto a xsldbg command prompt */
-		showPrompt = 1;
-	    }
-	}
-
-	if (showPrompt && optionsGetIntOption(OPTIONS_SHELL)) {
-	    xmlDocPtr tempDoc = xmlNewDoc((xmlChar *) "1.0");
-	    xmlNodePtr tempNode =
-		xmlNewNode(NULL, (xmlChar *) "xsldbg_default_node");
-	    if (!tempDoc || !tempNode) {
-		xsldbgFree();
-		return (1);
-	    }
-	    xmlAddChild((xmlNodePtr) tempDoc, tempNode);
-
-	    xsldbgGenericErrorFunc(i18n("Going to the command shell; not all xsldbg commands will work as not all needed have been loaded.\n"));
-	    xslDebugStatus = DEBUG_STOP;
-	    if ((cur == NULL) && (doc == NULL)) {
-		/*no doc's loaded */
-		debugXSLBreak(tempNode, tempNode, NULL, NULL);
-	    } else if ((cur != NULL) && (doc == NULL)) {
-		/* stylesheet is loaded */
-		debugXSLBreak((xmlNodePtr) cur->doc, tempNode, NULL, NULL);
-	    } else if ((cur == NULL) && (doc != NULL)) {
-		/* xml doc is loaded */
-		debugXSLBreak(tempNode, (xmlNodePtr) doc, NULL, NULL);
-	    } else {
-		/* unexpected problem, both docs are loaded */
-		debugXSLBreak((xmlNodePtr) cur->doc, (xmlNodePtr) doc,
-			NULL, NULL);
-	    }
-	    xmlFreeDoc(tempDoc);
-	} else if (showPrompt && !optionsGetIntOption(OPTIONS_SHELL)) {
-	    xslDebugStatus = DEBUG_QUIT;
-	    result = 0;         /* panic */
-	}
-
-	if (optionsGetIntOption(OPTIONS_SHELL)) {
-	    /* force a refesh of both stlesheet and xml data */
-	    filesFreeXmlFile(FILES_SOURCEFILE_TYPE);
-	    filesFreeXmlFile(FILES_XMLFILE_TYPE);
-	}
+        xsldbgReachedFirstTemplate = false;
+        /* don't force xsldbg to show command prompt */
+        showPrompt = 0;
+        cur = NULL;
+        doc = NULL;
+        arrayListEmpty(filesEntityList());
+        xsltSetXIncludeDefault(optionsGetIntOption(OPTIONS_XINCLUDE));
+
+        /* copy the volitile options over to xsldbg */
+        optionsCopyVolitleOptions();
+
+        /* choose where error messages/xsldbg output get sent to */
+        if (optionsGetIntOption(OPTIONS_STDOUT))
+            errorFile = stdout;
+        else
+            errorFile = stderr;
+
+        filesLoadCatalogs();
+
+        if (optionsGetIntOption(OPTIONS_SHELL)) {
+            debugGotControl(0);
+            xsldbgGenericErrorFunc(i18n("\nStarting stylesheet\n\n"));
+            if (optionsGetIntOption(OPTIONS_TRACE) == TRACE_OFF)
+                xslDebugStatus = DEBUG_STOP;    /* stop as soon as possible */
+        }
+
+        if ((optionsGetStringOption(OPTIONS_SOURCE_FILE_NAME) == NULL) ||
+            (optionsGetStringOption(OPTIONS_DATA_FILE_NAME) == NULL)) {
+            /* at least on file name has not been set */
+            /*goto a xsldbg command prompt */
+            showPrompt = 1;
+            if (optionsGetStringOption(OPTIONS_SOURCE_FILE_NAME) == NULL)
+                xsldbgGenericErrorFunc(i18n("Error: No XSLT source file supplied.\n"));
+
+            if (optionsGetStringOption(OPTIONS_DATA_FILE_NAME) == NULL) {
+                xsldbgGenericErrorFunc(i18n("Error: No XML data file supplied.\n"));
+            }
+
+        } else {
+            filesLoadXmlFile(NULL, FILES_SOURCEFILE_TYPE);
+            cur = filesGetStylesheet();
+            if ((cur == NULL) || (cur->errors != 0)) {
+                /*goto a xsldbg command prompt */
+                showPrompt = 1;
+                if (xslDebugStatus == DEBUG_NONE) {
+                    xslDebugStatus = DEBUG_QUIT;        /* panic !! */
+                    result = 0;
+                }
+            }
+        }
+
+        if (showPrompt == 0) {
+            filesLoadXmlFile(NULL, FILES_XMLFILE_TYPE);
+            doc = filesGetMainDoc();
+            if (doc == NULL) {
+                if (xslDebugStatus == DEBUG_NONE) {
+                    xslDebugStatus = DEBUG_QUIT;        /* panic !! */
+                    result = 0;
+                } else {
+                    /*goto a xsldbg command prompt */
+                    showPrompt = 1;
+                }
+            } else {
+                if (xslDebugStatus != DEBUG_QUIT) {
+                    xsltProcess(doc, cur);
+                    result = 1;
+                }
+            }
+
+            if (optionsGetIntOption(OPTIONS_SHELL) && (showPrompt == 0)) {
+                if ((xslDebugStatus != DEBUG_QUIT)
+                    && !debugGotControl(-1)) {
+                    xsldbgGenericErrorFunc(i18n("\nDebugger never received control.\n"));
+                    /*goto a xsldbg command prompt */
+                    showPrompt = 1;
+                    xslDebugStatus = DEBUG_STOP;
+                    } else {
+                        xsldbgGenericErrorFunc(i18n("\nFinished stylesheet\n\n"));
+                        {
+                        /* handle trace execution */
+                        int trace = optionsGetIntOption(OPTIONS_TRACE);
+
+                        switch (trace) {
+                            case TRACE_OFF:
+                                /* no trace of execution */
+                                break;
+
+                            case TRACE_ON:
+                                /* tell xsldbg to stop tracing next time we get here */
+                                optionsSetIntOption(OPTIONS_TRACE,
+                                                    TRACE_RUNNING);
+                                xslDebugStatus = DEBUG_TRACE;
+                                break;
+
+                            case TRACE_RUNNING:
+                                /* turn off tracing */
+                                xslDebugStatus = DEBUG_CONT;
+                                optionsSetIntOption(OPTIONS_TRACE,
+                                                    TRACE_OFF);
+                                break;
+                        }
+                        }
+                        if (!optionsGetIntOption(OPTIONS_AUTORESTART) && (xslDebugStatus != DEBUG_RUN_RESTART)){
+                            /* pass control to user they won't be able to do much
+                               other than add breakpoints, quit, run, continue */
+                            debugXSLBreak((xmlNodePtr) cur->doc, (xmlNodePtr) doc,
+                                          NULL, NULL);
+                        }
+                    }
+            } else {
+                /* request to execute stylesheet only  so we're done */
+                xslDebugStatus = DEBUG_QUIT;
+            }
+        } else {
+            /* Some sort of problem loading source file has occured. Quit? */
+            if (xslDebugStatus == DEBUG_NONE) {
+                xslDebugStatus = DEBUG_QUIT;    /* Panic!! */
+                result = 0;
+            } else {
+                /*goto a xsldbg command prompt */
+                showPrompt = 1;
+            }
+        }
+
+        if (showPrompt && optionsGetIntOption(OPTIONS_SHELL)) {
+            xmlDocPtr tempDoc = xmlNewDoc((xmlChar *) "1.0");
+            xmlNodePtr tempNode =
+            xmlNewNode(NULL, (xmlChar *) "xsldbg_default_node");
+            if (!tempDoc || !tempNode) {
+                xsldbgFree();
+                return (1);
+            }
+            xmlAddChild((xmlNodePtr) tempDoc, tempNode);
+
+            xsldbgGenericErrorFunc(i18n("Going to the command shell; not all xsldbg commands will work as not all needed have been loaded.\n"));
+            xslDebugStatus = DEBUG_STOP;
+            if ((cur == NULL) && (doc == NULL)) {
+                /*no doc's loaded */
+                debugXSLBreak(tempNode, tempNode, NULL, NULL);
+            } else if ((cur != NULL) && (doc == NULL)) {
+                /* stylesheet is loaded */
+                debugXSLBreak((xmlNodePtr) cur->doc, tempNode, NULL, NULL);
+            } else if ((cur == NULL) && (doc != NULL)) {
+                /* xml doc is loaded */
+                debugXSLBreak(tempNode, (xmlNodePtr) doc, NULL, NULL);
+            } else {
+                /* unexpected problem, both docs are loaded */
+                debugXSLBreak((xmlNodePtr) cur->doc, (xmlNodePtr) doc,
+                              NULL, NULL);
+            }
+            xmlFreeDoc(tempDoc);
+        } else if (showPrompt && !optionsGetIntOption(OPTIONS_SHELL)) {
+            xslDebugStatus = DEBUG_QUIT;
+            result = 0;         /* panic */
+        }
+
+        if (optionsGetIntOption(OPTIONS_SHELL)) {
+            /* force a refesh of both stlesheet and xml data */
+            filesFreeXmlFile(FILES_SOURCEFILE_TYPE);
+            filesFreeXmlFile(FILES_XMLFILE_TYPE);
+        }
     }
 
     if (!result) {
-	xsldbgGenericErrorFunc(i18n("Fatal error: Aborting debugger due to an unrecoverable error.\n"));
+        xsldbgGenericErrorFunc(i18n("Fatal error: Aborting debugger due to an unrecoverable error.\n"));
     }
     xsldbgFree();
     xsltCleanupGlobals();
@@ -893,7 +889,7 @@ xsldbgMain(int argc, char **argv)
 /**
  * xsldbgLoadStylesheet:
  *
- * Load the stylesheet and return it 
+ * Load the stylesheet and return it
  *
  * Returns The stylesheet after reloading it if successful
  *         NULL otherwise
@@ -945,7 +941,7 @@ xsldbgLoadStylesheet()
 /**
  * xsldbgLoadXmlData:
  *
- * Load the xml data file and return it  
+ * Load the xml data file and return it
  *
  * Returns The data file after reloading it if successful
  *         NULL otherwise
@@ -976,7 +972,7 @@ xsldbgLoadXmlData(void)
     else
 #endif
         doc = xmlSAXParseFile(&mySAXHandler,
-			     (char *) optionsGetStringOption(OPTIONS_DATA_FILE_NAME), 0);
+                              (char *) optionsGetStringOption(OPTIONS_DATA_FILE_NAME), 0);
     if (doc == NULL) {
         xsldbgGenericErrorFunc(i18n("Error: Unable to parse file %1.\n").arg(xsldbgUrl(optionsGetStringOption(OPTIONS_DATA_FILE_NAME))));
         if (!optionsGetIntOption(OPTIONS_SHELL)) {
@@ -995,9 +991,9 @@ xsldbgLoadXmlData(void)
 
 /**
  * xsldbgLoadXmlTemporary:
- * @path: The name of temporary file to load 
+ * @path: The name of temporary file to load
  *
- * Load the temporary data file and return it 
+ * Load the temporary data file and return it
  *
  * Returns The temporary file after reloading it if successful,
  *         NULL otherwise
@@ -1036,7 +1032,7 @@ xsldbgLoadXmlTemporary(const xmlChar * path)
  * printTemplates:
  * @style : valid as parsed my xsldbg
  * @doc :    "    "   "     "    "
- *  
+ *
  * print out list of template names
  */
 void
@@ -1087,30 +1083,30 @@ handler_routine(DWORD dwCtrlType)
 void xsldbgStructErrorHandler(void * userData, xmlErrorPtr error)
 {
     if (error && error->message && (error->level >= 0) && (error->level <= 4)){
-	if (getThreadStatus() != XSLDBG_MSG_THREAD_RUN){
-	    static const char *msgPrefix[4 + 1] = {"", "warning :", "error:", "fatal:"};
-	    if (error->file)
-		xsltGenericError(xsltGenericErrorContext, "%s%s in file \"%s\" line %d", msgPrefix[error->level], error->message, error->file, error->line);
-	    else
-		xsltGenericError(xsltGenericErrorContext, "%s%s", msgPrefix[error->level], error->message);
-
-	}else{
-	    xsltGenericError(xsltGenericErrorContext,"Struct error handler");
-	    notifyXsldbgApp(XSLDBG_MSG_ERROR_MESSAGE, error);
-	}
+        if (getThreadStatus() != XSLDBG_MSG_THREAD_RUN){
+            static const char *msgPrefix[4 + 1] = {"", "warning :", "error:", "fatal:"};
+            if (error->file)
+                xsltGenericError(xsltGenericErrorContext, "%s%s in file \"%s\" line %d", msgPrefix[error->level], error->message, error->file, error->line);
+            else
+                xsltGenericError(xsltGenericErrorContext, "%s%s", msgPrefix[error->level], error->message);
+
+        }else{
+            xsltGenericError(xsltGenericErrorContext,"Struct error handler");
+            notifyXsldbgApp(XSLDBG_MSG_ERROR_MESSAGE, error);
+        }
     }
 }
 
 void xsldbgSAXErrorHandler(void * ctx, const char * msg, ...)
 {
     if (ctx)
-	xsldbgStructErrorHandler(0, ((xmlParserCtxtPtr)ctx)->lastError);
+        xsldbgStructErrorHandler(0, ((xmlParserCtxtPtr)ctx)->lastError);
 }
 
 void xsldbgSAXWarningHandler(void * ctx, const char * msg, ...)
 {
     if (ctx)
-	xsldbgStructErrorHandler(0, ((xmlParserCtxtPtr)ctx)->lastError);
+        xsldbgStructErrorHandler(0, ((xmlParserCtxtPtr)ctx)->lastError);
 }
 
 #endif
@@ -1164,7 +1160,7 @@ static int initialized = 0;
 
 /**
  * xsldbgInit:
- * 
+ *
  * Returns 1 if able to allocate memory needed by xsldbg
  *         0 otherwise
  */
@@ -1207,8 +1203,6 @@ xsldbgInit()
             return result;
         }
 
-	
-
         /* set up the parser */
         xmlInitParser();
 #if 0
@@ -1265,7 +1259,7 @@ xsldbgFree()
       rl_cleanup_after_signal(); */
 #   ifdef HAVE_HISTORY
        clear_history();
-#   endif    
+#   endif
 #endif
 
 }
@@ -1278,8 +1272,8 @@ char msgBuffer[4000];
  * @ctx:  Is Valid
  * @msg:  Is valid
  * @...:  other parameters to use
- * 
- * Handles print output from xsldbg and passes it to the application if 
+ *
+ * Handles print output from xsldbg and passes it to the application if
  *  running as a thread otherwise send to stderr
  */
 void
@@ -1321,9 +1315,9 @@ TQString xsldbgUrl(const char *utf8fUrl)
 
     // May be provided with a URL that only has been encoded and has no protocol prefix ie a local file
     if ( !tempUrl.startsWith("file:/")  &&  !tempUrl.startsWith("http:/") && !tempUrl.startsWith("ftp:/"))
-	fixedURI = KURL::decode_string(tempUrl);
+        fixedURI = KURL::decode_string(tempUrl);
     else
-	fixedURI = url.prettyURL();
+        fixedURI = url.prettyURL();
 
     return fixedURI;
 }
@@ -1336,7 +1330,7 @@ TQString xsldbgUrl(const xmlChar *utf8Url)
 TQString xsldbgText(const char *utf8Text)
 {
     return TQString::fromUtf8(utf8Text);
-    
+
 }
 
 TQString xsldbgText(const xmlChar *utf8Text)
-- 
cgit v1.2.3

