diff --git a/config/autoconf.mk.in b/config/autoconf.mk.in index 01d0e497c9fc..e3ccb4ab969a 100644 --- a/config/autoconf.mk.in +++ b/config/autoconf.mk.in @@ -111,7 +111,7 @@ MOZ_NATIVE_MNG = @SYSTEM_MNG@ MOZ_UPDATE_XTERM = @MOZ_UPDATE_XTERM@ MOZ_MATHML = @MOZ_MATHML@ MOZ_SVG = @MOZ_SVG@ -TX_EXE = @TX_EXE@ +MOZ_XSL = @MOZ_XSL@ MOZ_INSURE = @MOZ_INSURE@ MOZ_INSURIFYING = @MOZ_INSURIFYING@ diff --git a/config/config.mak b/config/config.mak index ae2a4c7557db..0e87b031c25d 100644 --- a/config/config.mak +++ b/config/config.mak @@ -282,6 +282,8 @@ 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 diff --git a/configure.in b/configure.in index d9388009eac3..a5ee57c149a3 100644 --- a/configure.in +++ b/configure.in @@ -3918,10 +3918,9 @@ MOZ_ARG_ENABLE_BOOL(svg, MOZ_SVG=1 AC_DEFINE(MOZ_SVG)) -dnl To build transformiix standalone, set TX_EXE while configuring -if test "$TX_EXE"; then - AC_DEFINE(TX_EXE) -fi +dnl XSLT is now enabled by default. +MOZ_XSL=1 +AC_DEFINE(MOZ_XSL) dnl Need the contents of config-defs.h in the build logs VERBOSE_CONFIG_DEFS=1 @@ -4064,7 +4063,7 @@ AC_SUBST(MOZ_GFX_TOOLKIT_LDFLAGS) AC_SUBST(MOZ_UPDATE_XTERM) AC_SUBST(MOZ_MATHML) AC_SUBST(MOZ_SVG) -AC_SUBST(TX_EXE) +AC_SUBST(MOZ_XSL) AC_SUBST(MOZ_MONOLITHIC_TOOLKIT) AC_SUBST(MOZ_JS_LIBS) AC_SUBST(MOZ_PSM) diff --git a/extensions/transformiix/Makefile.in b/extensions/transformiix/Makefile.in index 9c04bf4a3ace..792f76ce526f 100644 --- a/extensions/transformiix/Makefile.in +++ b/extensions/transformiix/Makefile.in @@ -30,7 +30,7 @@ include $(DEPTH)/config/autoconf.mk ifneq ($(OS_ARCH),OS2) DIRS = source -ifndef TX_EXE +ifdef MOZ_XSL DIRS += build public endif diff --git a/extensions/transformiix/build/makefile.win b/extensions/transformiix/build/makefile.win index d665ff157d4b..35d3ce7e13ed 100644 --- a/extensions/transformiix/build/makefile.win +++ b/extensions/transformiix/build/makefile.win @@ -22,6 +22,10 @@ DEPTH=..\..\.. include <$(DEPTH)/config/config.mak> +!ifdef MOZ_XSL +DEFINES= $(DEFINES) -DMOZ_XSL +!endif + MODULE=transformiix IS_COMPONENT = 1 diff --git a/extensions/transformiix/macbuild/transformiixPrefix.h b/extensions/transformiix/macbuild/transformiixPrefix.h index 4f049a857a6e..10483c004dd4 100755 --- a/extensions/transformiix/macbuild/transformiixPrefix.h +++ b/extensions/transformiix/macbuild/transformiixPrefix.h @@ -26,4 +26,5 @@ #include "MacSharedPrefix.h" +#define MOZ_XSL 1 #define HAVE_RINT 1 diff --git a/extensions/transformiix/macbuild/transformiixPrefix_debug.h b/extensions/transformiix/macbuild/transformiixPrefix_debug.h index 39c997e4548d..def5643990bf 100755 --- a/extensions/transformiix/macbuild/transformiixPrefix_debug.h +++ b/extensions/transformiix/macbuild/transformiixPrefix_debug.h @@ -26,4 +26,5 @@ #include "MacSharedPrefix_debug.h" +#define MOZ_XSL 1 #define HAVE_RINT 1 diff --git a/extensions/transformiix/makefile.win b/extensions/transformiix/makefile.win index 0759696e5a2d..89630b87b68a 100644 --- a/extensions/transformiix/makefile.win +++ b/extensions/transformiix/makefile.win @@ -22,10 +22,10 @@ DEPTH=..\.. include <$(DEPTH)/config/config.mak> -!ifdef TX_EXE -DIRS=$(DEPTH)\expat source -!else +!ifdef MOZ_XSL DIRS=source build public +!else +DIRS=$(DEPTH)\expat source !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 -DTX_EXE - @set TX_EXE=1 + @set INCS=-UMOZILLA_CLIENT -DXML_DTD=1 -DXML_UNICODE + @set MOZ_XSL= diff --git a/extensions/transformiix/source/xpath/makefile.win b/extensions/transformiix/source/xpath/makefile.win index d7efeb990e9a..11f49ab18300 100644 --- a/extensions/transformiix/source/xpath/makefile.win +++ b/extensions/transformiix/source/xpath/makefile.win @@ -22,8 +22,8 @@ DEPTH=..\..\..\.. include <$(DEPTH)/config/config.mak> -!if defined(TX_EXE) -DEFINES=$(DEFINES) -DTX_EXE +!if defined(MOZ_XSL) +DEFINES=$(DEFINES) -DMOZ_XSL !endif CPPSRCS= \ @@ -61,7 +61,7 @@ CPPSRCS= \ UnionExpr.cpp \ VariableRefExpr.cpp \ XPathNames.cpp \ -!if !defined(TX_EXE) +!if defined(MOZ_XSL) nsNodeSet.cpp \ XPathProcessor.cpp \ !endif @@ -102,7 +102,7 @@ CPP_OBJS= \ .\$(OBJDIR)\UnionExpr.obj \ .\$(OBJDIR)\VariableRefExpr.obj \ .\$(OBJDIR)\XPathNames.obj \ -!if !defined(TX_EXE) +!if defined(MOZ_XSL) .\$(OBJDIR)\nsNodeSet.obj \ .\$(OBJDIR)\XPathProcessor.obj \ !endif diff --git a/extensions/transformiix/source/xslt/Makefile.in b/extensions/transformiix/source/xslt/Makefile.in index 44590a13322d..fa44107dc364 100644 --- a/extensions/transformiix/source/xslt/Makefile.in +++ b/extensions/transformiix/source/xslt/Makefile.in @@ -28,7 +28,7 @@ include $(DEPTH)/config/autoconf.mk DIRS = functions util -ifndef TX_EXE +ifdef MOZ_XSL MODULE = transformiix REQUIRES = string xpcom dom layout widget necko xsl_doc endif diff --git a/extensions/transformiix/source/xslt/ProcessorState.cpp b/extensions/transformiix/source/xslt/ProcessorState.cpp index dc476738399e..a184a0d6b235 100644 --- a/extensions/transformiix/source/xslt/ProcessorState.cpp +++ b/extensions/transformiix/source/xslt/ProcessorState.cpp @@ -25,13 +25,13 @@ * -- added code in ::resolveFunctionCall to support the * document() function. * - * $Id: ProcessorState.cpp,v 1.27 2001/06/10 11:30:44 axel%pike.org Exp $ + * $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.27 $ $Date: 2001/06/10 11:30:44 $ + * @version $Revision: 1.28 $ $Date: 2001/06/10 12:54:58 $ **/ #include "ProcessorState.h" @@ -44,7 +44,7 @@ #include "VariableBinding.h" #include "ExprResult.h" #include "Names.h" -#ifndef TX_EXE +#ifdef MOZ_XSL // #include "nslog.h" // #define PRINTF NS_LOG_PRINTF(XPATH) // #define FLUSH NS_LOG_FLUSH(XPATH) @@ -208,7 +208,7 @@ void ProcessorState::addTemplate(Element* xslTemplate) { MBool ProcessorState::addToResultTree(Node* node) { Node* current = resultNodeStack->peek(); -#ifndef TX_EXE +#ifdef MOZ_XSL String nameSpaceURI, name, localName; #endif @@ -219,7 +219,7 @@ MBool ProcessorState::addToResultTree(Node* node) { if (current->getNodeType() != Node::ELEMENT_NODE) return MB_FALSE; Element* element = (Element*)current; Attr* attr = (Attr*)node; -#ifndef TX_EXE +#ifdef MOZ_XSL name = attr->getName(); getResultNameSpaceURI(name, nameSpaceURI); // XXX HACK (pvdb) Workaround for BUG 51656 Html rendered as xhtml @@ -246,7 +246,7 @@ MBool ProcessorState::addToResultTree(Node* node) { current->appendChild(wrapper); current = wrapper; } -#ifndef TX_EXE +#ifdef MOZ_XSL else { // Checking if we should set the output method to HTML name = node->getNodeName(); diff --git a/extensions/transformiix/source/xslt/XSLTProcessor.cpp b/extensions/transformiix/source/xslt/XSLTProcessor.cpp index e50c94dcf90b..743ea1fa3050 100644 --- a/extensions/transformiix/source/xslt/XSLTProcessor.cpp +++ b/extensions/transformiix/source/xslt/XSLTProcessor.cpp @@ -38,7 +38,7 @@ * Olivier Gerardin * -- Changed behavior of passing parameters to templates * - * $Id: XSLTProcessor.cpp,v 1.49 2001/06/10 11:30:44 axel%pike.org Exp $ + * $Id: XSLTProcessor.cpp,v 1.50 2001/06/10 12:54:58 axel%pike.org Exp $ */ #include "XSLTProcessor.h" @@ -51,7 +51,7 @@ #include "Numbering.h" #include "Tokenizer.h" #include "URIUtils.h" -#ifndef TX_EXE +#ifdef MOZ_XSL #include "nsIObserverService.h" #include "nsIURL.h" #include "nsIServiceManager.h" @@ -73,7 +73,7 @@ /** * XSLTProcessor is a class for Processing XSL stylesheets * @author Keith Visco - * @version $Revision: 1.49 $ $Date: 2001/06/10 11:30:44 $ + * @version $Revision: 1.50 $ $Date: 2001/06/10 12:54:58 $ **/ /** @@ -88,7 +88,7 @@ const String XSLTProcessor::NON_TEXT_TEMPLATE_WARNING = **/ XSLTProcessor::XSLTProcessor() { -#ifndef TX_EXE +#ifdef MOZ_XSL NS_INIT_ISUPPORTS(); #endif @@ -138,7 +138,7 @@ XSLTProcessor::~XSLTProcessor() { //-- currently does nothing, but added for future use } //-- ~XSLTProcessor -#ifndef TX_EXE +#ifdef MOZ_XSL // XPConnect interface list for XSLTProcessor NS_CLASSINFO_MAP_BEGIN(XSLTProcessor) @@ -166,7 +166,7 @@ void XSLTProcessor::addErrorObserver(ErrorObserver& errorObserver) { errorObservers.add(&errorObserver); } //-- addErrorObserver -#ifdef TX_EXE +#ifndef MOZ_XSL void XSLTProcessor::print (Document& document, OutputFormat* format, ostream& out) { @@ -215,7 +215,7 @@ String& XSLTProcessor::getAppVersion() { return appVersion; } //-- getAppVersion -#ifdef TX_EXE +#ifndef MOZ_XSL /** * Parses all XML Stylesheet PIs associated with the * given XML document. If any stylesheet PIs are found with @@ -555,7 +555,7 @@ void XSLTProcessor::processTopLevel } //-- process(Document, ProcessorState) -#ifdef TX_EXE +#ifndef MOZ_XSL /** * Processes the given XML Document using the given XSL document * and returns the result tree @@ -708,7 +708,7 @@ void XSLTProcessor::process delete xslDoc; } //-- process -#endif // ifdef TX_EXE +#endif // ifndef MOZ_XSL //-------------------/ //- Private Methods -/ @@ -1101,7 +1101,7 @@ void XSLTProcessor::processAction Element* element = 0; //-- check name validity if ( XMLUtils::isValidQName(name)) { -#ifndef TX_EXE +#ifdef MOZ_XSL // XXX (pvdb) Check if we need to set a new default namespace? String nameSpaceURI; ps->getResultNameSpaceURI(name, nameSpaceURI); @@ -1332,7 +1332,7 @@ void XSLTProcessor::processAction } //-- literal default: -#ifndef TX_EXE +#ifdef MOZ_XSL // Find out if we have a new default namespace MBool newDefaultNS = MB_FALSE; String nsURI = actionElement->getAttribute(XMLUtils::XMLNS); @@ -1396,7 +1396,7 @@ void XSLTProcessor::processAction tmp = tmp->getNextSibling(); } ps->getNodeStack()->pop(); -#ifndef TX_EXE +#ifdef MOZ_XSL if ( newDefaultNS ) { ps->getDefaultNSURIStack()->pop(); } @@ -1658,7 +1658,7 @@ void XSLTProcessor::xslCopy(Node* node, Element* action, ProcessorState* ps) { { Element* element = (Element*)node; String nodeName = element->getNodeName(); -#ifndef TX_EXE +#ifdef MOZ_XSL // Find out if we have a new default namespace MBool newDefaultNS = MB_FALSE; String nsURI = element->getAttribute(XMLUtils::XMLNS); @@ -1690,7 +1690,7 @@ void XSLTProcessor::xslCopy(Node* node, Element* action, ProcessorState* ps) { //-- process template processTemplate(node, action, ps); ps->getNodeStack()->pop(); -#ifndef TX_EXE +#ifdef MOZ_XSL if ( newDefaultNS ) { ps->getDefaultNSURIStack()->pop(); } @@ -1745,7 +1745,7 @@ void XSLTProcessor::xslCopyOf(ExprResult* exprResult, ProcessorState* ps) { } } //-- xslCopyOf -#ifndef TX_EXE +#ifdef MOZ_XSL //#define PRINTF NS_LOG_PRINTF(XSLT) //#define FLUSH NS_LOG_FLUSH(XSLT) NS_IMETHODIMP diff --git a/extensions/transformiix/source/xslt/XSLTProcessor.h b/extensions/transformiix/source/xslt/XSLTProcessor.h index 88436a3b9626..2354499e3908 100644 --- a/extensions/transformiix/source/xslt/XSLTProcessor.h +++ b/extensions/transformiix/source/xslt/XSLTProcessor.h @@ -21,7 +21,7 @@ * Keith Visco, kvisco@ziplink.net * -- original author. * - * $Id: XSLTProcessor.h,v 1.18 2001/06/10 11:30:44 axel%pike.org Exp $ + * $Id: XSLTProcessor.h,v 1.19 2001/06/10 12:54:58 axel%pike.org Exp $ */ @@ -29,14 +29,14 @@ #define TRANSFRMX_XSLTPROCESSOR_H #ifndef __BORLANDC__ -#ifdef TX_EXE +#ifndef MOZ_XSL #include #include #endif #endif -#ifndef TX_EXE +#ifdef MOZ_XSL #include "nsIDocumentTransformer.h" #endif @@ -49,7 +49,7 @@ #include "ErrorObserver.h" #include "List.h" -#ifndef TX_EXE +#ifdef MOZ_XSL /* bacd8ad0-552f-11d3-a9f7-000064657374 */ #define TRANSFORMIIX_XSLT_PROCESSOR_CID \ { 0xbacd8ad0, 0x552f, 0x11d3, {0xa9, 0xf7, 0x00, 0x00, 0x64, 0x65, 0x73, 0x74} } @@ -63,16 +63,16 @@ /** * A class for Processing XSL Stylesheets * @author Keith Visco - * @version $Revision: 1.18 $ $Date: 2001/06/10 11:30:44 $ + * @version $Revision: 1.19 $ $Date: 2001/06/10 12:54:58 $ **/ class XSLTProcessor -#ifndef TX_EXE +#ifdef MOZ_XSL : public nsIDocumentTransformer #endif { public: -#ifndef TX_EXE +#ifdef MOZ_XSL // nsISupports interface NS_DECL_ISUPPORTS // nsIDocumentTransformer interface @@ -113,7 +113,7 @@ public: //--------------------------------------------/ //-- Methods that return the Result Document -/ //--------------------------------------------/ -#ifdef TX_EXE +#ifndef MOZ_XSL /** * Parses all XML Stylesheet PIs associated with the * given XML document. If any stylesheet PIs are found with @@ -152,7 +152,7 @@ public: Document* process(istream& xmlInput, String& xmlFilename, istream& xslInput, String& xslFilename); -#ifdef TX_EXE +#ifndef MOZ_XSL /** * Reads an XML document from the given XML input stream. The * XML document is processed using the associated XSL document @@ -245,7 +245,7 @@ private: ProcessorState* ps); -#ifdef TX_EXE +#ifndef MOZ_XSL /** * Prints the given XML document to the given ostream and uses @@ -299,7 +299,7 @@ private: **/ void notifyError(String& errorMessage, ErrorObserver::ErrorLevel level); -#ifdef TX_EXE +#ifndef MOZ_XSL /** * Parses the contents of data, and returns the type and href psuedo attributes **/ diff --git a/extensions/transformiix/source/xslt/functions/Makefile.in b/extensions/transformiix/source/xslt/functions/Makefile.in index 18d91dea1a6b..7016e17fbf5d 100644 --- a/extensions/transformiix/source/xslt/functions/Makefile.in +++ b/extensions/transformiix/source/xslt/functions/Makefile.in @@ -26,7 +26,7 @@ VPATH = @srcdir@ include $(DEPTH)/config/autoconf.mk -ifndef TX_EXE +ifdef MOZ_XSL MODULE = transformiix REQUIRES = string xpcom dom layout widget endif diff --git a/extensions/transformiix/source/xslt/functions/makefile.win b/extensions/transformiix/source/xslt/functions/makefile.win index ab54f31f0f57..4d83c0b946bb 100644 --- a/extensions/transformiix/source/xslt/functions/makefile.win +++ b/extensions/transformiix/source/xslt/functions/makefile.win @@ -22,8 +22,8 @@ DEPTH=..\..\..\..\.. include <$(DEPTH)/config/config.mak> -!if defined(TX_EXE) -DEFINES=$(DEFINES) -DTX_EXE +!if defined(MOZ_XSL) +DEFINES=$(DEFINES) -DMOZ_XSL !endif CPPSRCS= \ diff --git a/extensions/transformiix/source/xslt/makefile.win b/extensions/transformiix/source/xslt/makefile.win index 73fc9a5ae1b6..e8e425a91b8f 100644 --- a/extensions/transformiix/source/xslt/makefile.win +++ b/extensions/transformiix/source/xslt/makefile.win @@ -24,8 +24,8 @@ include <$(DEPTH)/config/config.mak> DIRS=util functions -!if defined(TX_EXE) -DEFINES= $(DEFINES) -DTX_EXE +!if defined(MOZ_XSL) +DEFINES= $(DEFINES) -DMOZ_XSL !endif CPPSRCS= \ @@ -49,7 +49,7 @@ CPP_OBJS= \ EXPORTS = \ $(NULL) -!ifndef TX_EXE +!ifdef MOZ_XSL 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 diff --git a/extensions/transformiix/source/xslt/util/Makefile.in b/extensions/transformiix/source/xslt/util/Makefile.in index a28e2d177e8d..cfc40120960b 100644 --- a/extensions/transformiix/source/xslt/util/Makefile.in +++ b/extensions/transformiix/source/xslt/util/Makefile.in @@ -26,7 +26,7 @@ VPATH = @srcdir@ include $(DEPTH)/config/autoconf.mk -ifndef TX_EXE +ifdef MOZ_XSL MODULE = transformiix REQUIRES = string xpcom dom layout widget endif diff --git a/extensions/transformiix/source/xslt/util/NodeStack.cpp b/extensions/transformiix/source/xslt/util/NodeStack.cpp index 6e98e09f2235..d0ccc69d5cea 100644 --- a/extensions/transformiix/source/xslt/util/NodeStack.cpp +++ b/extensions/transformiix/source/xslt/util/NodeStack.cpp @@ -24,17 +24,17 @@ * Larry Fitzpatrick, OpenText, lef@opentext.com * -- moved initialization of DEFAULT_SIZE from NodeStack.h to here * - * $Id: NodeStack.cpp,v 1.3 2001/06/10 11:30:47 axel%pike.org Exp $ + * $Id: NodeStack.cpp,v 1.4 2001/06/10 12:55:01 axel%pike.org Exp $ */ #include "NodeStack.h" -#ifdef TX_EXE +#ifndef MOZ_XSL #include #endif /** * @author Keith Visco - * @version $Revision: 1.3 $ $Date: 2001/06/10 11:30:47 $ + * @version $Revision: 1.4 $ $Date: 2001/06/10 12:55:01 $ **/ diff --git a/extensions/transformiix/source/xslt/util/makefile.win b/extensions/transformiix/source/xslt/util/makefile.win index b30f74802ebe..c70e7323d22c 100644 --- a/extensions/transformiix/source/xslt/util/makefile.win +++ b/extensions/transformiix/source/xslt/util/makefile.win @@ -22,8 +22,8 @@ DEPTH=..\..\..\..\.. include <$(DEPTH)/config/config.mak> -!if defined(TX_EXE) -DEFINES=$(DEFINES) -DTX_EXE +!if defined(MOZ_XSL) +DEFINES=$(DEFINES) -DMOZ_XSL !endif CPPSRCS= \