Fix for bug 81414 (transformiix standalone won't build, MOZ_XSL->!TX_EXE). Code by Axel Hecht, r=peterv/cls, sr=scc, a=dbaron.

git-svn-id: svn://10.0.0.236/trunk@96817 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
peterv%netscape.com
2001-06-10 16:45:36 +00:00
parent 3d71f37d29
commit 0484b075cb
50 changed files with 128 additions and 160 deletions

View File

@@ -111,7 +111,7 @@ MOZ_NATIVE_MNG = @SYSTEM_MNG@
MOZ_UPDATE_XTERM = @MOZ_UPDATE_XTERM@
MOZ_MATHML = @MOZ_MATHML@
MOZ_SVG = @MOZ_SVG@
MOZ_XSL = @MOZ_XSL@
TX_EXE = @TX_EXE@
MOZ_INSURE = @MOZ_INSURE@
MOZ_INSURIFYING = @MOZ_INSURIFYING@

View File

@@ -282,8 +282,6 @@ CFLAGS=$(CFLAGS) -DMOZ_MATHML
CFLAGS=$(CFLAGS) -DMOZ_SVG
!endif
MOZ_XSL=1
!ifdef MOZ_DEBUG
CFLAGS=$(CFLAGS) -DMOZ_REFLOW_PERF -DMOZ_REFLOW_PERF_DSP
!endif

View File

@@ -3918,9 +3918,10 @@ MOZ_ARG_ENABLE_BOOL(svg,
MOZ_SVG=1
AC_DEFINE(MOZ_SVG))
dnl XSLT is now enabled by default.
MOZ_XSL=1
AC_DEFINE(MOZ_XSL)
dnl To build transformiix standalone, set TX_EXE while configuring
if test "$TX_EXE"; then
AC_DEFINE(TX_EXE)
fi
dnl Need the contents of config-defs.h in the build logs
VERBOSE_CONFIG_DEFS=1
@@ -4063,7 +4064,7 @@ AC_SUBST(MOZ_GFX_TOOLKIT_LDFLAGS)
AC_SUBST(MOZ_UPDATE_XTERM)
AC_SUBST(MOZ_MATHML)
AC_SUBST(MOZ_SVG)
AC_SUBST(MOZ_XSL)
AC_SUBST(TX_EXE)
AC_SUBST(MOZ_MONOLITHIC_TOOLKIT)
AC_SUBST(MOZ_JS_LIBS)
AC_SUBST(MOZ_PSM)

View File

@@ -30,7 +30,7 @@ include $(DEPTH)/config/autoconf.mk
ifneq ($(OS_ARCH),OS2)
DIRS = source
ifdef MOZ_XSL
ifndef TX_EXE
DIRS += build public
endif

View File

@@ -22,10 +22,6 @@
DEPTH=..\..\..
include <$(DEPTH)/config/config.mak>
!ifdef MOZ_XSL
DEFINES= $(DEFINES) -DMOZ_XSL
!endif
MODULE=transformiix
IS_COMPONENT = 1

View File

@@ -26,5 +26,4 @@
#include "MacSharedPrefix.h"
#define MOZ_XSL 1
#define HAVE_RINT 1

View File

@@ -26,5 +26,4 @@
#include "MacSharedPrefix_debug.h"
#define MOZ_XSL 1
#define HAVE_RINT 1

View File

@@ -22,10 +22,10 @@
DEPTH=..\..
include <$(DEPTH)/config/config.mak>
!ifdef MOZ_XSL
DIRS=source build public
!else
!ifdef TX_EXE
DIRS=$(DEPTH)\expat source
!else
DIRS=source build public
!endif
include <$(DEPTH)\config\rules.mak>
@@ -33,5 +33,5 @@ include <$(DEPTH)\config\rules.mak>
standalone: setenv all
setenv:
@set INCS=-UMOZILLA_CLIENT -DXML_DTD=1 -DXML_UNICODE
@set MOZ_XSL=
@set INCS=-UMOZILLA_CLIENT -DXML_DTD=1 -DXML_UNICODE -DTX_EXE
@set TX_EXE=1

View File

@@ -28,7 +28,7 @@ include $(DEPTH)/config/autoconf.mk
DIRS = base net xml xpath xslt
ifndef MOZ_XSL
ifdef TX_EXE
DIRS += main
endif

View File

@@ -23,11 +23,10 @@
* Bob Miller, kbob@oblix.com
* -- plugged core leak.
*
* $Id: List.cpp,v 1.8 2001-06-10 13:50:46 axel%pike.org Exp $
*/
#include "List.h"
#ifndef MOZ_XSL
#ifdef TX_EXE
#include <iostream.h>
#endif
@@ -38,7 +37,7 @@
/**
* Default constructor for a List;
* @author <a href="mailto:kvisco@ziplink.net">Keith Visco</a>
* @version $Revision: 1.8 $ $Date: 2001-06-10 13:50:46 $
* @version $Revision: 1.9 $ $Date: 2001-06-10 16:43:59 $
**/
List::List() {

View File

@@ -26,7 +26,7 @@ VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
ifdef MOZ_XSL
ifndef TX_EXE
MODULE = transformiix
REQUIRES = string xpcom
endif
@@ -45,11 +45,11 @@ CPPSRCS = ArrayList.cpp \
StringList.cpp \
Tokenizer.cpp
ifdef MOZ_XSL
CPPSRCS += MozillaString.cpp
else
ifdef TX_EXE
CPPSRCS += CommandLineUtils.cpp \
TxString.cpp
else
CPPSRCS += MozillaString.cpp
endif
include $(topsrcdir)/config/rules.mk

View File

@@ -35,7 +35,7 @@
#include <stdlib.h>
#include <string.h>
#include "TxString.h"
#ifndef MOZ_XSL
#ifdef TX_EXE
#include <iostream.h>
#endif

View File

@@ -23,16 +23,14 @@
* Bob Miller, kbob@oblix.com
* -- plugged core leak.
*
* $Id: StringList.cpp,v 1.8 2001-06-10 13:50:46 axel%pike.org Exp $
*/
/**
* StringList
* @author <a href="mailto:kvisco@ziplink.net">Keith Visco</a>
* @version $Revision: 1.8 $ $Date: 2001-06-10 13:50:46 $
**/
#ifndef MOZ_XSL
#ifdef TX_EXE
#include <iostream.h>
#endif
#include "StringList.h"

View File

@@ -32,11 +32,11 @@
#include "baseutils.h"
#include <iostream.h>
#ifdef MOZ_XSL
#ifdef TX_EXE
typedef unsigned short UNICODE_CHAR;
#else
#include "nsString.h"
typedef PRUnichar UNICODE_CHAR;
#else
typedef unsigned short UNICODE_CHAR;
#endif
#ifndef NULL
@@ -57,7 +57,7 @@ class String : public TxObject
String(const char* source); //Create a string from the characters
String(const UNICODE_CHAR* source);
String(const UNICODE_CHAR* source, Int32 length);
#ifdef MOZ_XSL
#ifndef TX_EXE
String(nsString* theNSString);
#endif
@@ -121,7 +121,7 @@ class String : public TxObject
virtual MBool isEqual(const String& data) const; //Check equality between
//strings
#ifdef MOZ_XSL
#ifndef TX_EXE
virtual MBool isEqualIgnoreCase(const String& data) const;
#endif
@@ -173,7 +173,7 @@ class String : public TxObject
virtual void reverse(); //Reverse the string
#ifdef MOZ_XSL
#ifndef TX_EXE
virtual nsString& getNSString();
virtual const nsString& getConstNSString() const;
#endif
@@ -187,7 +187,7 @@ class String : public TxObject
Int32 UnicodeLength(const UNICODE_CHAR* data);
private:
#ifdef MOZ_XSL
#ifndef TX_EXE
nsString* ptrNSString;
#else
Int32 strLength;

View File

@@ -22,8 +22,8 @@
DEPTH=..\..\..\..
include <$(DEPTH)/config/config.mak>
!if defined(MOZ_XSL)
DEFINES= $(DEFINES) -DMOZ_XSL
!if defined(TX_EXE)
DEFINES= $(DEFINES) -DTX_EXE
!endif
CPPSRCS= \
@@ -41,7 +41,7 @@ CPPSRCS= \
StringList.cpp \
Tokenizer.cpp
!ifdef MOZ_XSL
!ifndef TX_EXE
CPPSRCS = $(CPPSRCS) \
MozillaString.cpp \
$(NULL)
@@ -67,7 +67,7 @@ CPP_OBJS= \
.\$(OBJDIR)\StringList.obj \
.\$(OBJDIR)\Tokenizer.obj
!ifdef MOZ_XSL
!ifndef TX_EXE
CPP_OBJS = $(CPP_OBJS) \
.\$(OBJDIR)\MozillaString.obj \
$(NULL)

View File

@@ -24,7 +24,7 @@ include <$(DEPTH)/config/config.mak>
DIRS=base net xml xpath xslt
!ifndef MOZ_XSL
!ifdef TX_EXE
DIRS = $(DIRS) main
!endif

View File

@@ -26,7 +26,7 @@ VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
ifdef MOZ_XSL
ifndef TX_EXE
MODULE = transformiix
REQUIRES = string xpcom necko
endif

View File

@@ -29,12 +29,11 @@
* -- 20000326
* -- added Mozilla integration code
*
* $Id: URIUtils.cpp,v 1.13 2001-06-10 13:50:48 axel%pike.org Exp $
*/
#include "URIUtils.h"
#ifdef MOZ_XSL
#ifndef TX_EXE
#include "nsIServiceManager.h"
#include "nsIIOService.h"
#include "nsIURL.h"
@@ -46,10 +45,10 @@
* URIUtils
* A set of utilities for handling URIs
* @author <a href="mailto:kvisco@ziplink.net">Keith Visco</a>
* @version $Revision: 1.13 $ $Date: 2001-06-10 13:50:48 $
* @version $Revision: 1.14 $ $Date: 2001-06-10 16:42:43 $
**/
#ifndef MOZ_XSL
#ifdef TX_EXE
//- Constants -/
const String URIUtils::HTTP_PROTOCOL = "http";
@@ -100,7 +99,7 @@ istream* URIUtils::getInputStream
* @return the document base of the given href
**/
void URIUtils::getDocumentBase(const String& href, String& dest) {
#ifdef MOZ_XSL
#ifndef TX_EXE
String docBase("");
nsCOMPtr<nsIURI> pURL;
nsresult result = NS_OK;
@@ -155,7 +154,7 @@ void URIUtils::getDocumentBase(const String& href, String& dest) {
* The new resolved href will be appended to the given dest String
**/
void URIUtils::resolveHref(const String& href, const String& base, String& dest) {
#ifdef MOZ_XSL
#ifndef TX_EXE
nsCOMPtr<nsIURI> pURL;
nsresult result = NS_OK;
@@ -238,7 +237,7 @@ void URIUtils::getDocumentURI(const String& href, String& docUri) {
docUri = href;
} //-- getFragmentIdentifier
#ifndef MOZ_XSL
#ifdef TX_EXE
istream* URIUtils::openStream(ParsedURI* uri) {
if ( !uri ) return 0;
// check protocol

View File

@@ -31,7 +31,6 @@
* -- 20000326
* -- added Mozilla integration code
*
* $Id: URIUtils.h,v 1.15 2001-06-10 13:50:49 axel%pike.org Exp $
*/
#ifndef TRANSFRMX_URIUTILS_H
@@ -39,7 +38,7 @@
#include "TxString.h"
#include "baseutils.h"
#ifndef MOZ_XSL
#ifdef TX_EXE
#include <fstream.h>
#endif
@@ -48,7 +47,7 @@
* A utility class for URI handling
* Not yet finished, only handles file URI at this point
* @author <a href="mailto:kvisco@ziplink.net">Keith Visco</a>
* @version $Revision: 1.15 $ $Date: 2001-06-10 13:50:49 $
* @version $Revision: 1.16 $ $Date: 2001-06-10 16:42:12 $
*
**/

View File

@@ -22,8 +22,8 @@
DEPTH=..\..\..\..
include <$(DEPTH)/config/config.mak>
!if defined(MOZ_XSL)
DEFINES= $(DEFINES) -DMOZ_XSL
!if defined(TX_EXE)
DEFINES= $(DEFINES) -DTX_EXE
!endif
CPPSRCS= \

View File

@@ -26,13 +26,13 @@ VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
ifdef MOZ_XSL
ifndef TX_EXE
MODULE = transformiix
REQUIRES = string xpcom dom layout widget
endif
DIRS = dom parser util
ifndef MOZ_XSL
ifdef TX_EXE
DIRS += printer
endif

View File

@@ -21,13 +21,12 @@
* Keith Visco
* -- original author.
*
* $Id: XMLDOMUtils.cpp,v 1.15 2001-06-10 13:50:50 axel%pike.org Exp $
*/
/**
* XMLDOMUtils
* @author <a href="mailto:kvisco@ziplink.net">Keith Visco</a>
* @version $Revision: 1.15 $ $Date: 2001-06-10 13:50:50 $
* @version $Revision: 1.16 $ $Date: 2001-06-10 16:42:18 $
**/
#include "XMLDOMUtils.h"
@@ -63,7 +62,7 @@ Node* XMLDOMUtils::copyNode(Node* node, Document* owner, NamespaceResolver* reso
Document* newDoc = new Document();
if (!newDoc)
break;
#ifdef MOZ_XSL
#ifndef TX_EXE
owner->addWrapper(newDoc);
#endif
NodeList* nl = doc->getChildNodes();
@@ -86,7 +85,7 @@ Node* XMLDOMUtils::copyNode(Node* node, Document* owner, NamespaceResolver* reso
case Node::ELEMENT_NODE :
{
Element* element = (Element*)node;
#ifdef MOZ_XSL
#ifndef TX_EXE
String name, nameSpaceURI;
name = element->getNodeName();
resolver->getResultNameSpaceURI(name, nameSpaceURI);
@@ -100,7 +99,7 @@ Node* XMLDOMUtils::copyNode(Node* node, Document* owner, NamespaceResolver* reso
if ( attList ) {
for ( i = 0; i < attList->getLength(); i++ ) {
Attr* attr = (Attr*) attList->item(i);
#ifdef MOZ_XSL
#ifndef TX_EXE
resolver->getResultNameSpaceURI(attr->getName(), nameSpaceURI);
newElement->setAttributeNS(nameSpaceURI, attr->getName(), attr->getValue());
#else

View File

@@ -26,7 +26,7 @@ VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
ifdef MOZ_XSL
ifndef TX_EXE
DIRS = mozImpl
else
DIRS = standalone

View File

@@ -16,13 +16,12 @@
* Peter Van der Beken
* -- original author
*
* $Id: dom.h,v 1.11 2001-06-10 13:50:52 axel%pike.org Exp $
*/
#ifndef __TX_DOM_WRAPPER__
#define __TX_DOM_WRAPPER__
#ifndef MOZ_XSL
#ifdef TX_EXE
#include "standalone/dom.h"
#else
#include "mozImpl/mozilladom.h"

View File

@@ -22,7 +22,7 @@
DEPTH=..\..\..\..\..
include <$(DEPTH)/config/config.mak>
!ifdef MOZ_XSL
!ifndef TX_EXE
DIRS = mozImpl
!else
DIRS = standalone

View File

@@ -26,10 +26,8 @@ VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
ifdef MOZ_XSL
MODULE = transformiix
REQUIRES = string xpcom dom layout widget necko
endif
CPPSRCS = MozillaAttr.cpp \
MozillaCDATASection.cpp \

View File

@@ -22,10 +22,6 @@
DEPTH=..\..\..\..\..\..
include <$(DEPTH)/config/config.mak>
!ifdef MOZ_XSL
DEFINES=$(DEFINES) -DMOZ_XSL
!endif
CPPSRCS= \
MozillaAttr.cpp \
MozillaCDATASection.cpp \

View File

@@ -22,9 +22,7 @@
DEPTH=..\..\..\..\..\..
include <$(DEPTH)/config/config.mak>
!ifdef MOZ_XSL
DEFINES=$(DEFINES) -DMOZ_XSL
!endif
DEFINES=$(DEFINES) -DTX_EXE
CPPSRCS=Attr.cpp \
CDATASection.cpp \

View File

@@ -24,9 +24,8 @@ include <$(DEPTH)/config/config.mak>
DIRS=dom parser util
!if defined(MOZ_XSL)
DEFINES=$(DEFINES) -DMOZ_XSL
!else
!if defined(TX_EXE)
DEFINES=$(DEFINES) -DTX_EXE
DIRS = $(DIRS) printer
!endif

View File

@@ -26,13 +26,13 @@ VPATH = @srcdir@ @srcdir@/xmltok @srcdir@/xmlparse
include $(DEPTH)/config/autoconf.mk
ifdef MOZ_XSL
ifndef TX_EXE
MODULE = transformiix
REQUIRES = string xpcom necko dom layout widget webbrwsr js docshell webshell gfx2 uriloader locale appshell xpconnect
endif
CPPSRCS = XMLParser.cpp
ifdef MOZ_XSL
ifndef TX_EXE
CPPSRCS += nsSyncLoader.cpp
else
CSRCS = xmltok.c xmlrole.c xmlparse.c hashtable.c
@@ -41,7 +41,7 @@ endif
include $(topsrcdir)/config/rules.mk
INCLUDES += -I$(srcdir)/../../base -I$(srcdir)/../../net -I$(srcdir)/../dom
ifndef MOZ_XSL
ifdef TX_EXE
INCLUDES += -I$(srcdir)/xmlparse
COMPILE_CFLAGS += -DXML_UNICODE -I$(srcdir)/xmltok
endif

View File

@@ -34,11 +34,10 @@
* -- Removed a number of castings of XML_Char to DOM_CHAR since they
* were not working on Windows properly
*
* $Id: XMLParser.cpp,v 1.17 2001-06-10 13:50:55 axel%pike.org Exp $
*/
#include "XMLParser.h"
#ifdef MOZ_XSL
#ifndef TX_EXE
#include "nsSyncLoader.h"
#include "URIUtils.h"
#include "nsIIOService.h"
@@ -69,7 +68,7 @@
**/
XMLParser::XMLParser()
{
#ifndef MOZ_XSL
#ifdef TX_EXE
errorState = MB_FALSE;
#endif
} //-- XMLParser
@@ -87,7 +86,7 @@ Document* XMLParser::getDocumentFromURI
String documentURL;
URIUtils::resolveHref(href, baseUri, documentURL);
#ifdef MOZ_XSL
#ifndef TX_EXE
nsresult rv = NS_OK;
nsCOMPtr<nsIURI> documentURI;
nsCOMPtr<nsIIOService> pService(do_GetService(NS_IOSERVICE_CONTRACTID,
@@ -123,7 +122,7 @@ Document* XMLParser::getDocumentFromURI
}
#ifndef MOZ_XSL
#ifdef TX_EXE
/**
* Parses the given input stream and returns a DOM Document.
* A NULL pointer will be returned if errors occurred

View File

@@ -23,7 +23,6 @@
* Keith Visco
* -- finished implementation
*
* $Id: XMLParser.h,v 1.11 2001-06-10 13:50:56 axel%pike.org Exp $
*/
#ifndef MITRE_XMLPARSER_H
@@ -33,7 +32,7 @@
#ifndef XML_UNICODE
#define XML_UNICODE
#endif
#ifndef MOZ_XSL
#ifdef TX_EXE
#include "xmlparse.h"
#include "URIUtils.h"
#endif
@@ -49,11 +48,11 @@ typedef struct {
* parsing is provided by EXPAT.
* @author <a href="tomk@mitre.org">Tom Kneeland</a>
* @author <a href="kvisco@ziplink.net">Keith Visco</a>
* @version $Revision: 1.11 $ $Date: 2001-06-10 13:50:56 $
* @version $Revision: 1.12 $ $Date: 2001-06-10 16:43:13 $
**/
class XMLParser
{
#ifndef MOZ_XSL
#ifdef TX_EXE
/*-----------------6/18/99 12:43PM------------------
* Sax related methods for XML parsers
* --------------------------------------------------*/
@@ -71,7 +70,7 @@ class XMLParser
~XMLParser();
Document* getDocumentFromURI(const String& href, const String& baseUri, String& errMsg);
#ifndef MOZ_XSL
#ifdef TX_EXE
Document* parse(istream& inputStream, const String& uri);
const String& getErrorString();
@@ -84,7 +83,7 @@ class XMLParser
#endif
};
#ifndef MOZ_XSL
#ifdef TX_EXE
/*-----------------6/18/99 12:43PM------------------
* Sax related methods for XML parsers
* --------------------------------------------------*/

View File

@@ -22,9 +22,7 @@
DEPTH=..\..\..\..\..
include <$(DEPTH)/config/config.mak>
!ifdef MOZ_XSL
DEFINES=$(DEFINES) -DMOZ_XSL
!ifndef TX_EXE
CPPSRCS= \
nsSyncLoader.cpp \
XMLParser.cpp \
@@ -35,6 +33,8 @@ CPP_OBJS= \
.\$(OBJDIR)\XMLParser.obj \
$(NULL)
!else
DEFINES=$(DEFINES) -DTX_EXE
CPPSRCS= \
XMLParser.cpp \
$(NULL)
@@ -48,7 +48,7 @@ EXPORTS = \
$(NULL)
LINCS=-I..\..\base -I..\dom -I..\..\net
!ifdef MOZ_XSL
!ifndef TX_EXE
LINCS=$(LINCS) -I$(PUBLIC)\expat
!else
LINCS=$(LINCS) -Ixmlparse

View File

@@ -22,8 +22,8 @@
DEPTH=..\..\..\..\..
include <$(DEPTH)/config/config.mak>
!if defined(MOZ_XSL)
DEFINES=$(DEFINES) -DMOZ_XSL
!if defined(TX_EXE)
DEFINES=$(DEFINES) -DTX_EXE
!endif
CPPSRCS= \

View File

@@ -19,13 +19,11 @@
* Keith Visco, kvisco@ziplink.net
* -- original author.
*
* $Id: DOMHelper.cpp,v 1.11 2001-06-10 13:50:58 axel%pike.org Exp $
*/
/**
* A class used to overcome DOM 1.0 deficiencies
* @author <a href="mailto:kvisco@ziplink.net">Keith Visco</a>
* @version $Revision: 1.11 $ $Date: 2001-06-10 13:50:58 $
**/
#include "DOMHelper.h"
@@ -116,7 +114,7 @@ Node* DOMHelper::getParentNode(Node* node) {
if (node->getNodeType() != Node::ATTRIBUTE_NODE)
return node->getParentNode();
#ifdef MOZ_XSL
#ifndef TX_EXE
// XXX temporary fix for 70979
nsCOMPtr<nsIDOMAttr> attr(do_QueryInterface(node->getNSObj()));
nsCOMPtr<nsIDOMElement> tmpParent;

View File

@@ -26,7 +26,7 @@ VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
ifdef MOZ_XSL
ifndef TX_EXE
MODULE = transformiix
REQUIRES = string xpcom dom layout widget
endif

View File

@@ -22,8 +22,8 @@
DEPTH=..\..\..\..\..
include <$(DEPTH)/config/config.mak>
!if defined(MOZ_XSL)
DEFINES=$(DEFINES) -DMOZ_XSL
!if defined(TX_EXE)
DEFINES=$(DEFINES) -DTX_EXE
!endif
CPPSRCS= \

View File

@@ -26,7 +26,7 @@ VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
ifdef MOZ_XSL
ifndef TX_EXE
MODULE = transformiix
REQUIRES = string xpcom dom layout widget caps js
endif
@@ -65,7 +65,7 @@ CPPSRCS = AdditiveExpr.cpp \
UnionExpr.cpp \
VariableRefExpr.cpp \
XPathNames.cpp
ifdef MOZ_XSL
ifndef TX_EXE
CPPSRCS += XPathProcessor.cpp \
nsNodeSet.cpp
endif
@@ -76,7 +76,7 @@ INCLUDES += -I$(srcdir)/../base -I$(srcdir)/../xml \
-I$(srcdir)/../xml/dom -I$(srcdir)/../xml/util \
-I$(srcdir)/../xslt -I$(srcdir)/../xslt/util \
-I$(srcdir)/../xslt/functions
ifdef MOZ_XSL
ifndef TX_EXE
INCLUDES += -I$(srcdir)
endif

View File

@@ -27,12 +27,11 @@
* Olivier Gerardin, ogerardin@vo.lu
* -- fixed numberValue()
*
* $Id: NodeSet.cpp,v 1.8 2001-06-10 13:50:59 axel%pike.org Exp $
*/
#include "NodeSet.h"
#include "XMLDOMUtils.h"
#ifndef MOZ_XSL
#ifdef TX_EXE
#include <iostream.h>
#endif
@@ -40,7 +39,7 @@
* NodeSet <BR />
* This class was ported from XSL:P. <BR />
* @author <A HREF="mailto:kvisco@ziplink.net">Keith Visco</A>
* @version $Revision: 1.8 $ $Date: 2001-06-10 13:50:59 $
* @version $Revision: 1.9 $ $Date: 2001-06-10 16:44:10 $
**/

View File

@@ -22,8 +22,8 @@
DEPTH=..\..\..\..
include <$(DEPTH)/config/config.mak>
!if defined(MOZ_XSL)
DEFINES=$(DEFINES) -DMOZ_XSL
!if defined(TX_EXE)
DEFINES=$(DEFINES) -DTX_EXE
!endif
CPPSRCS= \
@@ -61,7 +61,7 @@ CPPSRCS= \
UnionExpr.cpp \
VariableRefExpr.cpp \
XPathNames.cpp \
!if defined(MOZ_XSL)
!if !defined(TX_EXE)
nsNodeSet.cpp \
XPathProcessor.cpp \
!endif
@@ -102,7 +102,7 @@ CPP_OBJS= \
.\$(OBJDIR)\UnionExpr.obj \
.\$(OBJDIR)\VariableRefExpr.obj \
.\$(OBJDIR)\XPathNames.obj \
!if defined(MOZ_XSL)
!if !defined(TX_EXE)
.\$(OBJDIR)\nsNodeSet.obj \
.\$(OBJDIR)\XPathProcessor.obj \
!endif

View File

@@ -28,7 +28,7 @@ include $(DEPTH)/config/autoconf.mk
DIRS = functions util
ifdef MOZ_XSL
ifndef TX_EXE
MODULE = transformiix
REQUIRES = string xpcom dom layout widget necko xsl_doc
endif

View File

@@ -25,13 +25,12 @@
* -- added code in ::resolveFunctionCall to support the
* document() function.
*
* $Id: ProcessorState.cpp,v 1.28 2001-06-10 12:54:58 axel%pike.org Exp $
*/
/**
* Implementation of ProcessorState
* Much of this code was ported from XSL:P
* @version $Revision: 1.28 $ $Date: 2001-06-10 12:54:58 $
* @version $Revision: 1.29 $ $Date: 2001-06-10 16:41:35 $
**/
#include "ProcessorState.h"
@@ -44,7 +43,7 @@
#include "VariableBinding.h"
#include "ExprResult.h"
#include "Names.h"
#ifdef MOZ_XSL
#ifndef TX_EXE
// #include "nslog.h"
// #define PRINTF NS_LOG_PRINTF(XPATH)
// #define FLUSH NS_LOG_FLUSH(XPATH)
@@ -208,7 +207,7 @@ void ProcessorState::addTemplate(Element* xslTemplate) {
MBool ProcessorState::addToResultTree(Node* node) {
Node* current = resultNodeStack->peek();
#ifdef MOZ_XSL
#ifndef TX_EXE
String nameSpaceURI, name, localName;
#endif
@@ -219,7 +218,7 @@ MBool ProcessorState::addToResultTree(Node* node) {
if (current->getNodeType() != Node::ELEMENT_NODE) return MB_FALSE;
Element* element = (Element*)current;
Attr* attr = (Attr*)node;
#ifdef MOZ_XSL
#ifndef TX_EXE
name = attr->getName();
getResultNameSpaceURI(name, nameSpaceURI);
// XXX HACK (pvdb) Workaround for BUG 51656 Html rendered as xhtml
@@ -246,7 +245,7 @@ MBool ProcessorState::addToResultTree(Node* node) {
current->appendChild(wrapper);
current = wrapper;
}
#ifdef MOZ_XSL
#ifndef TX_EXE
else {
// Checking if we should set the output method to HTML
name = node->getNodeName();

View File

@@ -38,7 +38,6 @@
* Olivier Gerardin
* -- Changed behavior of passing parameters to templates
*
* $Id: XSLTProcessor.cpp,v 1.50 2001-06-10 12:54:58 axel%pike.org Exp $
*/
#include "XSLTProcessor.h"
@@ -51,7 +50,7 @@
#include "Numbering.h"
#include "Tokenizer.h"
#include "URIUtils.h"
#ifdef MOZ_XSL
#ifndef TX_EXE
#include "nsIObserverService.h"
#include "nsIURL.h"
#include "nsIServiceManager.h"
@@ -73,7 +72,7 @@
/**
* XSLTProcessor is a class for Processing XSL stylesheets
* @author <a href="mailto:kvisco@ziplink.net">Keith Visco</a>
* @version $Revision: 1.50 $ $Date: 2001-06-10 12:54:58 $
* @version $Revision: 1.51 $ $Date: 2001-06-10 16:41:19 $
**/
/**
@@ -88,7 +87,7 @@ const String XSLTProcessor::NON_TEXT_TEMPLATE_WARNING =
**/
XSLTProcessor::XSLTProcessor() {
#ifdef MOZ_XSL
#ifndef TX_EXE
NS_INIT_ISUPPORTS();
#endif
@@ -138,7 +137,7 @@ XSLTProcessor::~XSLTProcessor() {
//-- currently does nothing, but added for future use
} //-- ~XSLTProcessor
#ifdef MOZ_XSL
#ifndef TX_EXE
// XPConnect interface list for XSLTProcessor
NS_CLASSINFO_MAP_BEGIN(XSLTProcessor)
@@ -166,7 +165,7 @@ void XSLTProcessor::addErrorObserver(ErrorObserver& errorObserver) {
errorObservers.add(&errorObserver);
} //-- addErrorObserver
#ifndef MOZ_XSL
#ifdef TX_EXE
void XSLTProcessor::print
(Document& document, OutputFormat* format, ostream& out)
{
@@ -215,7 +214,7 @@ String& XSLTProcessor::getAppVersion() {
return appVersion;
} //-- getAppVersion
#ifndef MOZ_XSL
#ifdef TX_EXE
/**
* Parses all XML Stylesheet PIs associated with the
* given XML document. If any stylesheet PIs are found with
@@ -555,7 +554,7 @@ void XSLTProcessor::processTopLevel
} //-- process(Document, ProcessorState)
#ifndef MOZ_XSL
#ifdef TX_EXE
/**
* Processes the given XML Document using the given XSL document
* and returns the result tree
@@ -708,7 +707,7 @@ void XSLTProcessor::process
delete xslDoc;
} //-- process
#endif // ifndef MOZ_XSL
#endif // ifdef TX_EXE
//-------------------/
//- Private Methods -/
@@ -1101,7 +1100,7 @@ void XSLTProcessor::processAction
Element* element = 0;
//-- check name validity
if ( XMLUtils::isValidQName(name)) {
#ifdef MOZ_XSL
#ifndef TX_EXE
// XXX (pvdb) Check if we need to set a new default namespace?
String nameSpaceURI;
ps->getResultNameSpaceURI(name, nameSpaceURI);
@@ -1332,7 +1331,7 @@ void XSLTProcessor::processAction
}
//-- literal
default:
#ifdef MOZ_XSL
#ifndef TX_EXE
// Find out if we have a new default namespace
MBool newDefaultNS = MB_FALSE;
String nsURI = actionElement->getAttribute(XMLUtils::XMLNS);
@@ -1396,7 +1395,7 @@ void XSLTProcessor::processAction
tmp = tmp->getNextSibling();
}
ps->getNodeStack()->pop();
#ifdef MOZ_XSL
#ifndef TX_EXE
if ( newDefaultNS ) {
ps->getDefaultNSURIStack()->pop();
}
@@ -1658,7 +1657,7 @@ void XSLTProcessor::xslCopy(Node* node, Element* action, ProcessorState* ps) {
{
Element* element = (Element*)node;
String nodeName = element->getNodeName();
#ifdef MOZ_XSL
#ifndef TX_EXE
// Find out if we have a new default namespace
MBool newDefaultNS = MB_FALSE;
String nsURI = element->getAttribute(XMLUtils::XMLNS);
@@ -1690,7 +1689,7 @@ void XSLTProcessor::xslCopy(Node* node, Element* action, ProcessorState* ps) {
//-- process template
processTemplate(node, action, ps);
ps->getNodeStack()->pop();
#ifdef MOZ_XSL
#ifndef TX_EXE
if ( newDefaultNS ) {
ps->getDefaultNSURIStack()->pop();
}
@@ -1745,7 +1744,7 @@ void XSLTProcessor::xslCopyOf(ExprResult* exprResult, ProcessorState* ps) {
}
} //-- xslCopyOf
#ifdef MOZ_XSL
#ifndef TX_EXE
//#define PRINTF NS_LOG_PRINTF(XSLT)
//#define FLUSH NS_LOG_FLUSH(XSLT)
NS_IMETHODIMP

View File

@@ -21,7 +21,6 @@
* Keith Visco, kvisco@ziplink.net
* -- original author.
*
* $Id: XSLTProcessor.h,v 1.19 2001-06-10 12:54:58 axel%pike.org Exp $
*/
@@ -29,14 +28,14 @@
#define TRANSFRMX_XSLTPROCESSOR_H
#ifndef __BORLANDC__
#ifndef MOZ_XSL
#ifdef TX_EXE
#include <iostream.h>
#include <fstream.h>
#endif
#endif
#ifdef MOZ_XSL
#ifndef TX_EXE
#include "nsIDocumentTransformer.h"
#endif
@@ -49,7 +48,7 @@
#include "ErrorObserver.h"
#include "List.h"
#ifdef MOZ_XSL
#ifndef TX_EXE
/* bacd8ad0-552f-11d3-a9f7-000064657374 */
#define TRANSFORMIIX_XSLT_PROCESSOR_CID \
{ 0xbacd8ad0, 0x552f, 0x11d3, {0xa9, 0xf7, 0x00, 0x00, 0x64, 0x65, 0x73, 0x74} }
@@ -63,16 +62,16 @@
/**
* A class for Processing XSL Stylesheets
* @author <a href="mailto:kvisco@ziplink.net">Keith Visco</a>
* @version $Revision: 1.19 $ $Date: 2001-06-10 12:54:58 $
* @version $Revision: 1.20 $ $Date: 2001-06-10 16:41:51 $
**/
class XSLTProcessor
#ifdef MOZ_XSL
#ifndef TX_EXE
: public nsIDocumentTransformer
#endif
{
public:
#ifdef MOZ_XSL
#ifndef TX_EXE
// nsISupports interface
NS_DECL_ISUPPORTS
// nsIDocumentTransformer interface
@@ -113,7 +112,7 @@ public:
//--------------------------------------------/
//-- Methods that return the Result Document -/
//--------------------------------------------/
#ifndef MOZ_XSL
#ifdef TX_EXE
/**
* Parses all XML Stylesheet PIs associated with the
* given XML document. If any stylesheet PIs are found with
@@ -152,7 +151,7 @@ public:
Document* process(istream& xmlInput, String& xmlFilename,
istream& xslInput, String& xslFilename);
#ifndef MOZ_XSL
#ifdef TX_EXE
/**
* Reads an XML document from the given XML input stream. The
* XML document is processed using the associated XSL document
@@ -245,7 +244,7 @@ private:
ProcessorState* ps);
#ifndef MOZ_XSL
#ifdef TX_EXE
/**
* Prints the given XML document to the given ostream and uses
@@ -299,7 +298,7 @@ private:
**/
void notifyError(String& errorMessage, ErrorObserver::ErrorLevel level);
#ifndef MOZ_XSL
#ifdef TX_EXE
/**
* Parses the contents of data, and returns the type and href psuedo attributes
**/

View File

@@ -26,7 +26,7 @@ VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
ifdef MOZ_XSL
ifndef TX_EXE
MODULE = transformiix
REQUIRES = string xpcom dom layout widget
endif

View File

@@ -22,8 +22,8 @@
DEPTH=..\..\..\..\..
include <$(DEPTH)/config/config.mak>
!if defined(MOZ_XSL)
DEFINES=$(DEFINES) -DMOZ_XSL
!if defined(TX_EXE)
DEFINES=$(DEFINES) -DTX_EXE
!endif
CPPSRCS= \

View File

@@ -24,8 +24,8 @@ include <$(DEPTH)/config/config.mak>
DIRS=util functions
!if defined(MOZ_XSL)
DEFINES= $(DEFINES) -DMOZ_XSL
!if defined(TX_EXE)
DEFINES= $(DEFINES) -DTX_EXE
!endif
CPPSRCS= \
@@ -49,7 +49,7 @@ CPP_OBJS= \
EXPORTS = \
$(NULL)
!ifdef MOZ_XSL
!ifndef TX_EXE
LINCS=-I$(PUBLIC)\xpcom -I$(PUBLIC)\raptor -I..\xpath -I..\xml\dom -I..\xml\dom\mozImpl \
-I..\base -I ..\xml -I ..\xml\util -I .\util -I ..\net -I..\xml\parser -I.\functions
!else

View File

@@ -26,7 +26,7 @@ VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
ifdef MOZ_XSL
ifndef TX_EXE
MODULE = transformiix
REQUIRES = string xpcom dom layout widget
endif

View File

@@ -24,17 +24,16 @@
* Larry Fitzpatrick, OpenText, lef@opentext.com
* -- moved initialization of DEFAULT_SIZE from NodeStack.h to here
*
* $Id: NodeStack.cpp,v 1.4 2001-06-10 12:55:01 axel%pike.org Exp $
*/
#include "NodeStack.h"
#ifndef MOZ_XSL
#ifdef TX_EXE
#include <iostream.h>
#endif
/**
* @author <a href="kvisco@ziplink.net">Keith Visco</a>
* @version $Revision: 1.4 $ $Date: 2001-06-10 12:55:01 $
* @version $Revision: 1.5 $ $Date: 2001-06-10 16:45:36 $
**/

View File

@@ -22,8 +22,8 @@
DEPTH=..\..\..\..\..
include <$(DEPTH)/config/config.mak>
!if defined(MOZ_XSL)
DEFINES=$(DEFINES) -DMOZ_XSL
!if defined(TX_EXE)
DEFINES=$(DEFINES) -DTX_EXE
!endif
CPPSRCS= \