diff --git a/extensions/transformiix/build/Makefile.in b/extensions/transformiix/build/Makefile.in index 2f27300cd46a..678bdfeff491 100644 --- a/extensions/transformiix/build/Makefile.in +++ b/extensions/transformiix/build/Makefile.in @@ -57,7 +57,6 @@ CPPSRCS = XSLTProcessorModule.cpp LOBJS =../source/base/ArrayList.$(OBJ_SUFFIX) \ ../source/base/Double.$(OBJ_SUFFIX) \ ../source/base/List.$(OBJ_SUFFIX) \ - ../source/base/TxObjectWrapper.$(OBJ_SUFFIX) \ ../source/base/Map.$(OBJ_SUFFIX) \ ../source/base/NamedMap.$(OBJ_SUFFIX) \ ../source/base/SimpleErrorObserver.$(OBJ_SUFFIX) \ @@ -67,7 +66,7 @@ LOBJS =../source/base/ArrayList.$(OBJ_SUFFIX) \ ../source/base/txAtoms.$(OBJ_SUFFIX) \ ../source/base/txExpandedNameMap.$(OBJ_SUFFIX) \ ../source/base/MozillaString.$(OBJ_SUFFIX) \ - ../source/net/URIUtils.$(OBJ_SUFFIX) \ + ../source/base/txURIUtils.$(OBJ_SUFFIX) \ ../source/xml/dom/mozImpl/MozillaObjectWrapper.$(OBJ_SUFFIX) \ ../source/xml/dom/mozImpl/MozillaAttr.$(OBJ_SUFFIX) \ ../source/xml/dom/mozImpl/MozillaCDATASection.$(OBJ_SUFFIX) \ @@ -161,7 +160,6 @@ EXTRA_DSO_LDOPTS += \ include $(topsrcdir)/config/rules.mk INCLUDES += -I$(srcdir)/../source/xslt -I$(srcdir)/../source/base \ - -I$(srcdir)/../source/net \ -I$(srcdir)/../source/xml -I$(srcdir)/../source/xml/dom \ -I$(srcdir)/../source/xml/parser -I$(srcdir)/../source/xpath \ -I$(srcdir)/../source/xslt/util -I$(srcdir)/../source/xslt/functions diff --git a/extensions/transformiix/build/makefile.win b/extensions/transformiix/build/makefile.win index 54ac744396e9..516a11479394 100644 --- a/extensions/transformiix/build/makefile.win +++ b/extensions/transformiix/build/makefile.win @@ -42,7 +42,6 @@ CPP_OBJS= \ ..\source\base\$(OBJDIR)\ArrayList.obj \ ..\source\base\$(OBJDIR)\Double.obj \ ..\source\base\$(OBJDIR)\List.obj \ - ..\source\base\$(OBJDIR)\TxObjectWrapper.obj \ ..\source\base\$(OBJDIR)\Map.obj \ ..\source\base\$(OBJDIR)\NamedMap.obj \ ..\source\base\$(OBJDIR)\SimpleErrorObserver.obj \ @@ -52,7 +51,7 @@ CPP_OBJS= \ ..\source\base\$(OBJDIR)\txAtoms.obj \ ..\source\base\$(OBJDIR)\txExpandedNameMap.obj \ ..\source\base\$(OBJDIR)\MozillaString.obj \ - ..\source\net\$(OBJDIR)\URIUtils.obj \ + ..\source\base\$(OBJDIR)\txURIUtils.obj \ ..\source\xml\dom\mozImpl\$(OBJDIR)\MozillaObjectWrapper.obj \ ..\source\xml\dom\mozImpl\$(OBJDIR)\MozillaAttr.obj \ ..\source\xml\dom\mozImpl\$(OBJDIR)\MozillaCDATASection.obj \ diff --git a/extensions/transformiix/macbuild/transformiix.xml b/extensions/transformiix/macbuild/transformiix.xml index 0a8cb6855e3c..0da898ee68c2 100644 --- a/extensions/transformiix/macbuild/transformiix.xml +++ b/extensions/transformiix/macbuild/transformiix.xml @@ -1137,7 +1137,7 @@ Name - URIUtils.cpp + txURIUtils.cpp MacOS Text @@ -1797,7 +1797,7 @@ Name - URIUtils.cpp + txURIUtils.cpp MacOS @@ -3235,7 +3235,7 @@ Name - URIUtils.cpp + txURIUtils.cpp MacOS Text @@ -3911,7 +3911,7 @@ Name - URIUtils.cpp + txURIUtils.cpp MacOS @@ -4443,12 +4443,10 @@ txExpandedNameMap.cpp MacOS - - net transformiixDebug.shlb Name - URIUtils.cpp + txURIUtils.cpp MacOS diff --git a/extensions/transformiix/source/Makefile.in b/extensions/transformiix/source/Makefile.in index c25ebeab7373..9172cea1374e 100644 --- a/extensions/transformiix/source/Makefile.in +++ b/extensions/transformiix/source/Makefile.in @@ -26,7 +26,7 @@ VPATH = @srcdir@ include $(DEPTH)/config/autoconf.mk -DIRS = base net xml xpath xslt +DIRS = base xml xpath xslt ifdef TX_EXE DIRS += main diff --git a/extensions/transformiix/source/base/Makefile.in b/extensions/transformiix/source/base/Makefile.in index df0ec9800ec9..2845b52d4c3e 100644 --- a/extensions/transformiix/source/base/Makefile.in +++ b/extensions/transformiix/source/base/Makefile.in @@ -41,14 +41,14 @@ CPPSRCS = ArrayList.cpp \ Double.cpp \ List.cpp \ Map.cpp \ - TxObjectWrapper.cpp \ NamedMap.cpp \ SimpleErrorObserver.cpp \ Stack.cpp \ StringList.cpp \ Tokenizer.cpp \ txAtoms.cpp \ - txExpandedNameMap.cpp + txExpandedNameMap.cpp \ + txURIUtils.cpp ifdef TX_EXE CPPSRCS += CommandLineUtils.cpp \ diff --git a/extensions/transformiix/source/base/TxObject.h b/extensions/transformiix/source/base/TxObject.h index 4ac7e0854e96..3923acfd8b2a 100644 --- a/extensions/transformiix/source/base/TxObject.h +++ b/extensions/transformiix/source/base/TxObject.h @@ -58,14 +58,4 @@ class TxObject { } //-- equals }; -/** - * A Simple TxObject wrapper class -**/ -class TxObjectWrapper : public TxObject { -public: - TxObjectWrapper(); - virtual ~TxObjectWrapper(); - void* object; -}; - #endif diff --git a/extensions/transformiix/source/base/TxObjectWrapper.cpp b/extensions/transformiix/source/base/TxObjectWrapper.cpp deleted file mode 100644 index 347f3f646421..000000000000 --- a/extensions/transformiix/source/base/TxObjectWrapper.cpp +++ /dev/null @@ -1,44 +0,0 @@ -/* - * The contents of this file are subject to the Mozilla Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is TransforMiiX XSLT processor. - * - * The Initial Developer of the Original Code is The MITRE Corporation. - * Portions created by MITRE are Copyright (C) 1999 The MITRE Corporation. - * - * Portions created by Keith Visco as a Non MITRE employee, - * (C) 1999 Keith Visco. All Rights Reserved. - * - * Contributor(s): - * Keith Visco, kvisco@ziplink.net - * -- original author. - */ - -#include "TxObject.h" - - //--------------------------------------/ - //- A Simple TxObject wrapper class -/ - //--------------------------------------/ - -/** - * Default Constructor -**/ -TxObjectWrapper::TxObjectWrapper() { - this->object = 0; -} //-- TxObjectWrapper - -/** - * Default destructor -**/ -TxObjectWrapper::~TxObjectWrapper() { - this->object = 0; -} //-- ~TxObjectWrapper - diff --git a/extensions/transformiix/source/base/makefile.win b/extensions/transformiix/source/base/makefile.win index 098d9b794942..c4a15a713ab3 100644 --- a/extensions/transformiix/source/base/makefile.win +++ b/extensions/transformiix/source/base/makefile.win @@ -39,7 +39,6 @@ CPP_OBJS= \ .\$(OBJDIR)\ArrayList.obj \ .\$(OBJDIR)\Double.obj \ .\$(OBJDIR)\List.obj \ - .\$(OBJDIR)\TxObjectWrapper.obj \ .\$(OBJDIR)\NamedMap.obj \ .\$(OBJDIR)\SimpleErrorObserver.obj \ .\$(OBJDIR)\Stack.obj \ @@ -47,7 +46,8 @@ CPP_OBJS= \ .\$(OBJDIR)\StringList.obj \ .\$(OBJDIR)\Tokenizer.obj \ .\$(OBJDIR)\txAtoms.obj \ - .\$(OBJDIR)\txExpandedNameMap.obj + .\$(OBJDIR)\txExpandedNameMap.obj \ + .\$(OBJDIR)\txURIUtils.obj !ifndef TX_EXE CPP_OBJS = $(CPP_OBJS) \ diff --git a/extensions/transformiix/source/main/Makefile.in b/extensions/transformiix/source/main/Makefile.in index d243753ec615..d9a2c2372e60 100644 --- a/extensions/transformiix/source/main/Makefile.in +++ b/extensions/transformiix/source/main/Makefile.in @@ -32,7 +32,6 @@ OBJS =../base/ArrayList.$(OBJ_SUFFIX) \ ../base/CommandLineUtils.$(OBJ_SUFFIX) \ ../base/Double.$(OBJ_SUFFIX) \ ../base/List.$(OBJ_SUFFIX) \ - ../base/TxObjectWrapper.$(OBJ_SUFFIX) \ ../base/Map.$(OBJ_SUFFIX) \ ../base/NamedMap.$(OBJ_SUFFIX) \ ../base/SimpleErrorObserver.$(OBJ_SUFFIX) \ @@ -42,7 +41,7 @@ OBJS =../base/ArrayList.$(OBJ_SUFFIX) \ ../base/txAtoms.$(OBJ_SUFFIX) \ ../base/txExpandedNameMap.$(OBJ_SUFFIX) \ ../base/TxString.$(OBJ_SUFFIX) \ - ../net/URIUtils.$(OBJ_SUFFIX) \ + ../base/txURIUtils.$(OBJ_SUFFIX) \ ../xml/dom/standalone/Attr.$(OBJ_SUFFIX) \ ../xml/dom/standalone/CDATASection.$(OBJ_SUFFIX) \ ../xml/dom/standalone/DocumentType.$(OBJ_SUFFIX) \ diff --git a/extensions/transformiix/source/main/makefile.win b/extensions/transformiix/source/main/makefile.win index da0f06687540..be450b795fa9 100644 --- a/extensions/transformiix/source/main/makefile.win +++ b/extensions/transformiix/source/main/makefile.win @@ -30,7 +30,6 @@ CPP_OBJS= \ ../base/$(OBJDIR)/CommandLineUtils.obj \ ../base/$(OBJDIR)/Double.obj \ ../base/$(OBJDIR)/List.obj \ - ../base/$(OBJDIR)/TxObjectWrapper.obj \ ../base/$(OBJDIR)/Map.obj \ ../base/$(OBJDIR)/NamedMap.obj \ ../base/$(OBJDIR)/SimpleErrorObserver.obj \ @@ -40,7 +39,7 @@ CPP_OBJS= \ ../base/$(OBJDIR)/txAtoms.obj \ ../base/$(OBJDIR)/txExpandedNameMap.obj \ ../base/$(OBJDIR)/TxString.obj \ - ../net/$(OBJDIR)/URIUtils.obj \ + ../base/$(OBJDIR)/txURIUtils.obj \ ../xml/dom/standalone/$(OBJDIR)/Attr.obj \ ../xml/dom/standalone/$(OBJDIR)/CDATASection.obj \ ../xml/dom/standalone/$(OBJDIR)/DocumentType.obj \ diff --git a/extensions/transformiix/source/makefile.win b/extensions/transformiix/source/makefile.win index 1d60ce1a5a90..4b1eb8904909 100644 --- a/extensions/transformiix/source/makefile.win +++ b/extensions/transformiix/source/makefile.win @@ -22,7 +22,7 @@ DEPTH=..\..\.. include <$(DEPTH)/config/config.mak> -DIRS=base net xml xpath xslt +DIRS=base xml xpath xslt !ifdef TX_EXE DIRS = $(DIRS) main diff --git a/extensions/transformiix/source/net/.cvsignore b/extensions/transformiix/source/net/.cvsignore deleted file mode 100644 index f3c7a7c5da68..000000000000 --- a/extensions/transformiix/source/net/.cvsignore +++ /dev/null @@ -1 +0,0 @@ -Makefile diff --git a/extensions/transformiix/source/net/Makefile.in b/extensions/transformiix/source/net/Makefile.in deleted file mode 100644 index 25b83d00acbe..000000000000 --- a/extensions/transformiix/source/net/Makefile.in +++ /dev/null @@ -1,43 +0,0 @@ -# -# The contents of this file are subject to the Mozilla Public -# License Version 1.1 (the "License"); you may not use this file -# except in compliance with the License. You may obtain a copy of -# the License at http://www.mozilla.org/MPL/ -# -# Software distributed under the License is distributed on an "AS -# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or -# implied. See the License for the specific language governing -# rights and limitations under the License. -# -# The Original Code is Transformiix XSLT Processor. -# -# The Initial Developer of the Original Code is Axel Hecht. -# Portions created by Axel Hecht are Copyright (C) Axel Hecht. -# All Rights Reserved. -# -# Contributor(s): -# Axel Hecht -# - -DEPTH = ../../../.. -topsrcdir = @top_srcdir@ -srcdir = @srcdir@ -VPATH = @srcdir@ - -include $(DEPTH)/config/autoconf.mk - -ifndef TX_EXE -MODULE = transformiix -REQUIRES = string \ - xpcom \ - necko \ - $(NULL) -endif - -CPPSRCS = URIUtils.cpp - -include $(topsrcdir)/config/rules.mk - -INCLUDES += -I$(srcdir)/../base - -libs:: $(OBJS) diff --git a/extensions/transformiix/source/net/URIUtils.cpp b/extensions/transformiix/source/net/URIUtils.cpp deleted file mode 100644 index d3bd56b7eedd..000000000000 --- a/extensions/transformiix/source/net/URIUtils.cpp +++ /dev/null @@ -1,314 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- - * - * The contents of this file are subject to the Mozilla Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is TransforMiiX XSLT processor. - * - * The Initial Developer of the Original Code is The MITRE Corporation. - * Portions created by MITRE are Copyright (C) 1999 The MITRE Corporation. - * - * Portions created by Keith Visco as a Non MITRE employee, - * (C) 1999 Keith Visco. All Rights Reserved. - * - * Contributor(s): - * Keith Visco, kvisco@ziplink.net - * -- original author. - * Larry Fitzpatrick, OpenText, lef@opentext.com - * -- 19990806 - * -- moved initialization of constant shorts and chars from - * URIUtils.cpp to here - * - * Peter Van der Beken - * - */ - -#include "URIUtils.h" - -#ifndef TX_EXE -#include "nsNetUtil.h" -#endif - -/** - * URIUtils - * A set of utilities for handling URIs -**/ - -#ifdef TX_EXE -//- Constants -/ - -const String URIUtils::HTTP_PROTOCOL = "http"; -const String URIUtils::FILE_PROTOCOL = "file"; -const char URIUtils::HREF_PATH_SEP = '/'; -const char URIUtils::DEVICE_SEP = '|'; -const char URIUtils::PORT_SEP = ':'; -const char URIUtils::PROTOCOL_SEP = ':'; -const short URIUtils::PROTOCOL_MODE = 1; -const short URIUtils::HOST_MODE = 2; -const short URIUtils::PORT_MODE = 3; -const short URIUtils::PATH_MODE = 4; - - -/** - * Returns an InputStream for the file represented by the href - * argument - * @param href the href of the file to get the input stream for. - * @return an InputStream to the desired resource - * @exception java.io.FileNotFoundException when the file could not be - * found -**/ -istream* URIUtils::getInputStream - (const String& href, String& errMsg) -{ - - istream* inStream = 0; - - ParsedURI* uri = parseURI(href); - if ( !uri->isMalformed ) { - inStream = openStream(uri); - } - else { - // Try local files - char* fchars = new char[href.length()+1]; - inStream = new ifstream(href.toCharArray(fchars), ios::in); - delete fchars; - } - delete uri; - - return inStream; - -} //-- getInputStream - -/** - * Returns the document base of the href argument - * @return the document base of the given href -**/ -void URIUtils::getDocumentBase(const String& href, String& dest) { - //-- use temp str so the subString method doesn't destroy dest - String docBase(""); - - if (!href.isEmpty()) { - - int idx = -1; - //-- check for URL - ParsedURI* uri = parseURI(href); - if ( !uri->isMalformed ) { - idx = href.lastIndexOf(HREF_PATH_SEP); - } - else { - //-- The following contains a fix from Shane Hathaway - //-- to handle the case when both "\" and "/" appear in filename - int idx2 = href.lastIndexOf(HREF_PATH_SEP); - //idx = href.lastIndexOf(File.separator); - idx = -1; //-- hack change later - if (idx2 > idx) idx = idx2; - } - if (idx >= 0) href.subString(0,idx, docBase); - delete uri; - } - dest.append(docBase); -} //-- getDocumentBase -#endif - -/** - * Resolves the given href argument, using the given documentBase - * if necessary. - * The new resolved href will be appended to the given dest String -**/ -void URIUtils::resolveHref(const String& href, const String& base, - String& dest) { - if (base.isEmpty()) { - dest.append(href); - return; - } - if (href.isEmpty()) { - dest.append(base); - return; - } - -#ifndef TX_EXE - nsCOMPtr pURL; - String resultHref; - nsresult result = NS_NewURI(getter_AddRefs(pURL), base.getConstNSString()); - if (NS_SUCCEEDED(result)) { - NS_MakeAbsoluteURI(resultHref.getNSString(), href.getConstNSString(), pURL); - dest.append(resultHref); - } -#else - String documentBase; - getDocumentBase(base, documentBase); - - //-- check for URL - ParsedURI* uri = parseURI(href); - if ( !uri->isMalformed ) { - dest.append(href); - delete uri; - return; - } - - - //-- join document base + href - String xHref; - if (!documentBase.isEmpty()) { - xHref.append(documentBase); - if (documentBase.charAt(documentBase.length()-1) != HREF_PATH_SEP) - xHref.append(HREF_PATH_SEP); - } - xHref.append(href); - - //-- check new href - ParsedURI* newUri = parseURI(xHref); - if ( !newUri->isMalformed ) { - dest.append(xHref); - } - else { - // Try local files - char* xHrefChars = new char[xHref.length()+1]; - ifstream inFile(xHref.toCharArray(xHrefChars), ios::in); - if ( inFile ) dest.append(xHref); - else dest.append(href); - inFile.close(); - delete xHrefChars; - } - delete uri; - delete newUri; - //cout << "\n---\nhref='" << href << "', base='" << base << "'\ndocumentBase='" << documentBase << "', dest='" << dest << "'\n---\n"; -#endif -} //-- resolveHref - -void URIUtils::getFragmentIdentifier(const String& href, String& frag) { - PRInt32 pos; - pos = href.lastIndexOf('#'); - if(pos != NOT_FOUND) - href.subString(pos+1, frag); - else - frag.clear(); -} //-- getFragmentIdentifier - -void URIUtils::getDocumentURI(const String& href, String& docUri) { - PRInt32 pos; - pos = href.lastIndexOf('#'); - if(pos != NOT_FOUND) - href.subString(0,pos,docUri); - else - docUri = href; -} //-- getDocumentURI - -#ifdef TX_EXE -istream* URIUtils::openStream(ParsedURI* uri) { - if ( !uri ) return 0; - // check protocol - - istream* inStream = 0; - if ( FILE_PROTOCOL.isEqual(uri->protocol) ) { - char* fchars = new char[uri->path.length()+1]; - ifstream* inFile = new ifstream(uri->path.toCharArray(fchars), ios::in); - delete fchars; - inStream = inFile; - } - - return inStream; -} //-- openStream - -URIUtils::ParsedURI* URIUtils::parseURI(const String& uri) { - - ParsedURI* uriTokens = new ParsedURI; - if (!uriTokens) - return NULL; - uriTokens->isMalformed = MB_FALSE; - - short mode = PROTOCOL_MODE; - - // look for protocol - int totalCount = uri.length(); - int charCount = 0; - UNICODE_CHAR prevCh = '\0'; - int fslash = 0; - String buffer(uri.length()); - while ( charCount < totalCount ) { - UNICODE_CHAR ch = uri.charAt(charCount++); - switch(ch) { - case '.' : - if ( mode == PROTOCOL_MODE ) { - uriTokens->isMalformed = MB_TRUE; - mode = HOST_MODE; - } - buffer.append(ch); - break; - case ':' : - { - switch ( mode ) { - case PROTOCOL_MODE : - uriTokens->protocol = buffer; - buffer.clear(); - mode = HOST_MODE; - break; - case HOST_MODE : - uriTokens->host = buffer; - buffer.clear(); - mode = PORT_MODE; - break; - default: - break; - } - break; - } - case '/' : - switch ( mode ) { - case HOST_MODE : - if (!buffer.isEmpty()) { - mode = PATH_MODE; - buffer.append(ch); - } - else if ( fslash == 2 ) mode = PATH_MODE; - else ++fslash; - break; - case PORT_MODE : - mode = PATH_MODE; - uriTokens->port.append(buffer); - buffer.clear(); - break; - default: - buffer.append(ch); - break; - } - break; - default: - buffer.append(ch); - } - prevCh = ch; - } - - if ( mode == PROTOCOL_MODE ) { - uriTokens->isMalformed = MB_TRUE; - } - //-- finish remaining mode - if (!buffer.isEmpty()) { - switch ( mode ) { - case PROTOCOL_MODE : - uriTokens->protocol.append(buffer); - break; - case HOST_MODE : - uriTokens->host.append(buffer); - break; - case PORT_MODE : - uriTokens->port.append(buffer); - break; - case PATH_MODE : - uriTokens->path.append(buffer); - break; - default: - break; - } - } - return uriTokens; -} //-- parseURI - -#endif diff --git a/extensions/transformiix/source/net/URIUtils.h b/extensions/transformiix/source/net/URIUtils.h deleted file mode 100644 index 24dabf40ea9c..000000000000 --- a/extensions/transformiix/source/net/URIUtils.h +++ /dev/null @@ -1,135 +0,0 @@ -/* - * The contents of this file are subject to the Mozilla Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is TransforMiiX XSLT processor. - * - * The Initial Developer of the Original Code is The MITRE Corporation. - * Portions created by MITRE are Copyright (C) 1999 The MITRE Corporation. - * - * Portions created by Keith Visco as a Non MITRE employee, - * (C) 1999 Keith Visco. All Rights Reserved. - * - * Contributor(s): - * - * Keith Visco, kvisco@ziplink.net - * -- original author. - * - * Larry Fitzpatrick, OpenText, lef@opentext.com - * -- 19990806 - * -- moved initialization of constant shorts and chars to - * URIUtils.cpp - * - * Peter Van der Beken - * -- 20000326 - * -- added Mozilla integration code - * - */ - -#ifndef TRANSFRMX_URIUTILS_H -#define TRANSFRMX_URIUTILS_H - -#include "TxString.h" -#include "baseutils.h" -#ifdef TX_EXE -#include -#endif - - -/** - * A utility class for URI handling - * Not yet finished, only handles file URI at this point -**/ - -class URIUtils { - - -public: - -#ifdef TX_EXE - static const String HTTP_PROTOCOL; - static const String FILE_PROTOCOL; - - /** - * the path separator for an URI - **/ - static const char HREF_PATH_SEP; - - /** - * The Device separator for an URI - **/ - static const char DEVICE_SEP; - - /** - * The Port separator for an URI - **/ - static const char PORT_SEP; - - /** - * The Protocal separator for an URI - **/ - static const char PROTOCOL_SEP; - - - static istream* getInputStream - (const String& href, String& errMsg); - - /** - * Returns the document base of the href argument - * The document base will be appended to the given dest String - **/ - static void getDocumentBase(const String& href, String& dest); -#endif - - /** - * Resolves the given href argument, using the given documentBase - * if necessary. - * The new resolved href will be appended to the given dest String - **/ - static void resolveHref(const String& href, const String& base, String& dest); - - /** - * Returns the fragment identifier of the given URI, or "" if none exists - * frag is cleared before the idetifier is appended - **/ - static void getFragmentIdentifier(const String& href, String& frag); - - /** - * Returns the document location of given the URI (ie everything except - * fragment). docUri is cleared before the URI is appended - **/ - static void getDocumentURI(const String& href, String& docUri); - - -private: - -#ifdef TX_EXE - static const short PROTOCOL_MODE; - static const short HOST_MODE; - static const short PORT_MODE; - static const short PATH_MODE; - - struct ParsedURI { - MBool isMalformed; - String fragmentIdentifier; - String host; - String protocol; - String port; - String path; - }; - - static istream* openStream(ParsedURI* uri); - static ParsedURI* parseURI(const String& uri); -#endif - -}; //-- URIUtils - -/* */ -#endif diff --git a/extensions/transformiix/source/net/makefile.win b/extensions/transformiix/source/net/makefile.win deleted file mode 100644 index 865c4e3b3675..000000000000 --- a/extensions/transformiix/source/net/makefile.win +++ /dev/null @@ -1,49 +0,0 @@ -#!nmake -# -# The contents of this file are subject to the Netscape Public -# License Version 1.1 (the "License"); you may not use this file -# except in compliance with the License. You may obtain a copy of -# the License at http://www.mozilla.org/NPL/ -# -# Software distributed under the License is distributed on an "AS -# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or -# implied. See the License for the specific language governing -# rights and limitations under the License. -# -# The Original Code is mozilla.org code. -# -# The Initial Developer of the Original Code is Netscape -# Communications Corporation. Portions created by Netscape are -# Copyright (C) 1998 Netscape Communications Corporation. All -# Rights Reserved. -# -# Contributor(s): - -DEPTH=..\..\..\.. -REQUIRES = string \ - xpcom \ - necko \ - $(NULL) -include <$(DEPTH)/config/config.mak> - -!if defined(TX_EXE) -DEFINES= $(DEFINES) -DTX_EXE -!endif - -CPP_OBJS= \ - .\$(OBJDIR)\URIUtils.obj \ - $(NULL) - -EXPORTS = \ - $(NULL) - -LINCS=-I$(PUBLIC)\xpcom -I..\base - -LCFLAGS = \ - $(LCFLAGS) \ - $(DEFINES) \ - $(NULL) - -include <$(DEPTH)\config\rules.mak> - -libs:: $(OBJDIR) $(CPP_OBJS) diff --git a/extensions/transformiix/source/xml/dom/mozImpl/Makefile.in b/extensions/transformiix/source/xml/dom/mozImpl/Makefile.in index 4ca1341fe64d..f1649ff8c7a1 100644 --- a/extensions/transformiix/source/xml/dom/mozImpl/Makefile.in +++ b/extensions/transformiix/source/xml/dom/mozImpl/Makefile.in @@ -57,7 +57,7 @@ CPPSRCS = MozillaAttr.cpp \ include $(topsrcdir)/config/rules.mk -INCLUDES += -I$(srcdir)/../../../base -I$(srcdir)/../../ -I$(srcdir)/../../../net \ +INCLUDES += -I$(srcdir)/../../../base -I$(srcdir)/../../ \ -I$(srcdir)/../../../xpath -I$(srcdir)/../../../xslt libs:: $(OBJS) diff --git a/extensions/transformiix/source/xml/dom/mozImpl/makefile.win b/extensions/transformiix/source/xml/dom/mozImpl/makefile.win index 03072500a172..5ae99e71b5d9 100644 --- a/extensions/transformiix/source/xml/dom/mozImpl/makefile.win +++ b/extensions/transformiix/source/xml/dom/mozImpl/makefile.win @@ -55,7 +55,7 @@ CPP_OBJS= \ EXPORTS = \ $(NULL) -LINCS= -I..\..\..\base -I..\..\dom -I..\.. -I..\..\..\net \ +LINCS= -I..\..\..\base -I..\..\dom -I..\.. \ -I..\..\..\xpath -I..\..\..\xslt LCFLAGS = \ diff --git a/extensions/transformiix/source/xml/dom/standalone/Makefile.in b/extensions/transformiix/source/xml/dom/standalone/Makefile.in index 2871b0d2a5c0..8e24602aa389 100644 --- a/extensions/transformiix/source/xml/dom/standalone/Makefile.in +++ b/extensions/transformiix/source/xml/dom/standalone/Makefile.in @@ -46,8 +46,7 @@ CPPSRCS = Attr.cpp \ include $(topsrcdir)/config/rules.mk -INCLUDES += -I$(srcdir) -I$(srcdir)/../.. \ - -I$(srcdir)/../../../base -I$(srcdir)/../../../net \ +INCLUDES += -I$(srcdir) -I$(srcdir)/../.. -I$(srcdir)/../../../base \ -I$(srcdir)/../../../xpath -I$(srcdir)/../../../xslt libs:: $(OBJS) diff --git a/extensions/transformiix/source/xml/dom/standalone/NodeDefinition.cpp b/extensions/transformiix/source/xml/dom/standalone/NodeDefinition.cpp index 2b2e9589a482..0e32573ea8b0 100644 --- a/extensions/transformiix/source/xml/dom/standalone/NodeDefinition.cpp +++ b/extensions/transformiix/source/xml/dom/standalone/NodeDefinition.cpp @@ -31,7 +31,7 @@ #include "dom.h" #include "ArrayList.h" -#include "URIUtils.h" +#include "txURIUtils.h" #include "txAtoms.h" #include diff --git a/extensions/transformiix/source/xml/dom/standalone/makefile.win b/extensions/transformiix/source/xml/dom/standalone/makefile.win index 33aa1dc3f268..8c0a953e8dea 100644 --- a/extensions/transformiix/source/xml/dom/standalone/makefile.win +++ b/extensions/transformiix/source/xml/dom/standalone/makefile.win @@ -47,7 +47,7 @@ CPP_OBJS= \ EXPORTS = \ $(NULL) -LINCS=-I..\.. -I..\..\..\base -I..\..\..\net \ +LINCS=-I..\.. -I..\..\..\base \ -I..\..\..\xpath -I..\..\..\xslt LCFLAGS = \ diff --git a/extensions/transformiix/source/xml/parser/Makefile.in b/extensions/transformiix/source/xml/parser/Makefile.in index dac71cd7fc0b..c8a8c029b10b 100644 --- a/extensions/transformiix/source/xml/parser/Makefile.in +++ b/extensions/transformiix/source/xml/parser/Makefile.in @@ -50,7 +50,7 @@ endif include $(topsrcdir)/config/rules.mk -INCLUDES += -I$(srcdir)/../../base -I$(srcdir)/../../net -I$(srcdir)/../dom +INCLUDES += -I$(srcdir)/../../base -I$(srcdir)/../dom ifdef TX_EXE INCLUDES += -I$(srcdir)/xmlparse -I$(srcdir)/xmltok COMPILE_CFLAGS += -DXML_UNICODE diff --git a/extensions/transformiix/source/xml/parser/XMLParser.cpp b/extensions/transformiix/source/xml/parser/XMLParser.cpp index 7f248078dfc8..345f1a1d9d7c 100644 --- a/extensions/transformiix/source/xml/parser/XMLParser.cpp +++ b/extensions/transformiix/source/xml/parser/XMLParser.cpp @@ -37,7 +37,7 @@ */ #include "XMLParser.h" -#include "URIUtils.h" +#include "txURIUtils.h" #ifndef TX_EXE #include "nsSyncLoader.h" #include "nsNetUtil.h" diff --git a/extensions/transformiix/source/xml/parser/makefile.win b/extensions/transformiix/source/xml/parser/makefile.win index 29280ab81c88..f9814f4d6874 100644 --- a/extensions/transformiix/source/xml/parser/makefile.win +++ b/extensions/transformiix/source/xml/parser/makefile.win @@ -51,7 +51,7 @@ CPP_OBJS= \ EXPORTS = \ $(NULL) -LINCS=-I..\..\base -I..\dom -I..\..\net +LINCS=-I..\..\base -I..\dom !ifndef TX_EXE LINCS=$(LINCS) -I$(PUBLIC)\expat !else diff --git a/extensions/transformiix/source/xslt/Makefile.in b/extensions/transformiix/source/xslt/Makefile.in index bf7f224c4e1b..e0889257d1ca 100644 --- a/extensions/transformiix/source/xslt/Makefile.in +++ b/extensions/transformiix/source/xslt/Makefile.in @@ -69,10 +69,9 @@ endif include $(topsrcdir)/config/rules.mk -INCLUDES += -I$(srcdir) -I$(srcdir)/../base -I$(srcdir)/../net \ +INCLUDES += -I$(srcdir) -I$(srcdir)/../base \ -I$(srcdir)/../xml -I$(srcdir)/../xml/dom \ -I$(srcdir)/../xml/parser -I$(srcdir)/../xml/parser/xmlparse \ - -I$(srcdir)/../xml/printer -I$(srcdir)/../xpath -I$(srcdir)/../xslt/util \ - -I$(srcdir)/../xslt/functions + -I$(srcdir)/../xpath -I$(srcdir)/util -I$(srcdir)/functions libs:: $(OBJS) diff --git a/extensions/transformiix/source/xslt/ProcessorState.cpp b/extensions/transformiix/source/xslt/ProcessorState.cpp index 20b5f3614b1d..5b00dbba695e 100644 --- a/extensions/transformiix/source/xslt/ProcessorState.cpp +++ b/extensions/transformiix/source/xslt/ProcessorState.cpp @@ -35,7 +35,7 @@ #include "ProcessorState.h" #include "XSLTFunctions.h" #include "FunctionLib.h" -#include "URIUtils.h" +#include "txURIUtils.h" #include "XMLUtils.h" #include "XMLDOMUtils.h" #include "Tokenizer.h" diff --git a/extensions/transformiix/source/xslt/XSLTProcessor.cpp b/extensions/transformiix/source/xslt/XSLTProcessor.cpp index c345466d95ab..191d126af37b 100644 --- a/extensions/transformiix/source/xslt/XSLTProcessor.cpp +++ b/extensions/transformiix/source/xslt/XSLTProcessor.cpp @@ -50,7 +50,7 @@ #include "txNodeSorter.h" #include "Numbering.h" #include "Tokenizer.h" -#include "URIUtils.h" +#include "txURIUtils.h" #include "txAtoms.h" #include "TxLog.h" #include "txRtfHandler.h" diff --git a/extensions/transformiix/source/xslt/functions/Makefile.in b/extensions/transformiix/source/xslt/functions/Makefile.in index a5699dcb5dee..6864f31dfec3 100644 --- a/extensions/transformiix/source/xslt/functions/Makefile.in +++ b/extensions/transformiix/source/xslt/functions/Makefile.in @@ -48,10 +48,8 @@ CPPSRCS = CurrentFunctionCall.cpp \ include $(topsrcdir)/config/rules.mk -INCLUDES += -I$(srcdir)/../../base -I$(srcdir)/../../net \ - -I$(srcdir)/../../xpath -I$(srcdir)/../../xml \ - -I$(srcdir)/../../xml/parser -I$(srcdir)/../../xml/parser/xmlparse \ - -I$(srcdir)/../../xml/dom \ - -I$(srcdir)/.. -I$(srcdir)/../util +INCLUDES += -I$(srcdir)/../../base -I$(srcdir)/../../xpath \ + -I$(srcdir)/../../xml/dom -I$(srcdir)/../../xml \ + -I$(srcdir)/../../xml/parser -I$(srcdir)/.. -I$(srcdir)/../util libs:: $(OBJS) diff --git a/extensions/transformiix/source/xslt/functions/makefile.win b/extensions/transformiix/source/xslt/functions/makefile.win index df35361cbdf6..d89f97052b70 100644 --- a/extensions/transformiix/source/xslt/functions/makefile.win +++ b/extensions/transformiix/source/xslt/functions/makefile.win @@ -49,7 +49,7 @@ EXPORTS = \ LINCS= $(LINCS) -I$(PUBLIC)\xpcom -I..\..\base \ -I..\..\xml\dom -I..\..\xpath -I..\..\xml -I.. \ - -I..\..\net -I$(DEPTH)\expat -I..\..\xml\parser -I..\util + -I$(DEPTH)\expat -I..\..\xml\parser -I..\util LCFLAGS = \ $(LCFLAGS) \ diff --git a/extensions/transformiix/source/xslt/makefile.win b/extensions/transformiix/source/xslt/makefile.win index 95586bee1bf8..6fe966811c28 100644 --- a/extensions/transformiix/source/xslt/makefile.win +++ b/extensions/transformiix/source/xslt/makefile.win @@ -72,11 +72,11 @@ EXPORTS = \ $(NULL) !ifdef TX_EXE -LINCS=-I. -I..\base -I..\net -I..\xml -I..\xml\dom -I..\xml\parser \ - -I..\xml\parser\xmlparse -I..\xml\printer -I..\xpath -Iutil -Ifunctions +LINCS=-I. -I..\base -I..\xml -I..\xml\dom -I..\xml\parser \ + -I..\xml\parser\xmlparse -I..\xpath -I.\util -I.\functions !else LINCS=-I$(PUBLIC)\xpcom -I..\xpath -I..\xml\dom -I..\xml\dom\mozImpl \ - -I..\base -I ..\xml -I .\util -I ..\net -I..\xml\parser -I.\functions + -I..\base -I ..\xml -I .\util -I..\xml\parser -I.\functions !endif LCFLAGS = \