Bug 304494 - Move extensions/transformiix -> content/xslt - r=peterv/sicking - CVS copies were performed to preserve CVS history, see https://bugzilla.mozilla.org/attachment.cgi?id=193073 for details

This commit is contained in:
bsmedberg%covad.net 2005-11-02 17:34:14 +00:00
parent 9148b13f59
commit 282d4fb1d1
116 changed files with 354 additions and 404 deletions

View File

@ -44,7 +44,7 @@ include $(DEPTH)/config/autoconf.mk
include $(topsrcdir)/build/unix/modules.mk
ifeq ($(BUILD_MODULES),all)
ifeq (,$(filter-out all,$(BUILD_MODULES))$(MOZ_XSLT_STANDALONE))
#
# And now for something completely different...
# Divide the default build into tiers.
@ -420,10 +420,20 @@ tier_99_dirs += \
$(NULL)
endif
else
else # BUILD_MODULES
# Standalone build
ifdef MOZ_XSLT_STANDALONE
DIRS = \
xpcom/typelib \
xpcom \
parser/expat \
content/xslt/src \
$(NULL)
SUBMAKEFILES = xpcom/typelib/Makefile
else
DIRS = $(BUILD_MODULE_DIRS)
# Hack to generate xpidl Makefile
@ -433,12 +443,13 @@ DIRS := xpcom/typelib $(DIRS)
SUBMAKEFILES := xpcom/typelib/Makefile
endif
endif
endif
default:: $(SUBMAKEFILES)
$(MAKE) export
$(MAKE) libs
endif # BUILD_MODULES == all
endif # BUILD_MODULES == all or MOZ_XSLT_STANDALONE
STATIC_MAKEFILES := nsprpub directory/c-sdk security/nss

View File

@ -196,7 +196,7 @@ MOZ_SVG_RENDERER_CAIRO = @MOZ_SVG_RENDERER_CAIRO@
MOZ_LIBART_CFLAGS = @MOZ_LIBART_CFLAGS@
MOZ_ENABLE_CANVAS = @MOZ_ENABLE_CANVAS@
MOZ_CAIRO_CFLAGS = @MOZ_CAIRO_CFLAGS@
TX_EXE = @TX_EXE@
MOZ_XSLT_STANDALONE = @MOZ_XSLT_STANDALONE@
# Mac's don't like / in a #include, so we include the libart
# headers locally if we're using the external library

View File

@ -4041,12 +4041,13 @@ MOZ_BRANDING_DIRECTORY=
MOZ_CALENDAR=
MOZ_DBGRINFO_MODULES=
MOZ_ENABLE_LIBXUL=
MOZ_EXTENSIONS_ALL=" cookie wallet content-packs xml-rpc xmlextras help p3p pref transformiix venkman inspector irc universalchardet typeaheadfind webservices spellcheck gnomevfs auth sroaming xmlterm datetime finger cview layout-debug tasks sql xforms permissions schema-validation reporter"
MOZ_EXTENSIONS_ALL=" cookie wallet content-packs xml-rpc xmlextras help p3p pref venkman inspector irc universalchardet typeaheadfind webservices spellcheck gnomevfs auth sroaming xmlterm datetime finger cview layout-debug tasks sql xforms permissions schema-validation reporter"
MOZ_IMG_DECODERS_DEFAULT="png gif jpeg bmp xbm"
MOZ_IMG_ENCODERS_DEFAULT="png"
MOZ_IPCD=
MOZ_JSDEBUGGER=1
MOZ_JSLOADER=1
MOZ_LDAP_XPCOM=
MOZ_LIBART_CFLAGS=
MOZ_LIBART_LIBS=
MOZ_MAIL_NEWS=
@ -4078,6 +4079,7 @@ MOZ_V1_STRING_ABI=1
MOZ_VIEW_SOURCE=1
MOZ_XPFE_COMPONENTS=1
MOZ_XPINSTALL=1
MOZ_XSLT_STANDALONE=
MOZ_XTF=1
MOZ_XUL=1
NS_PRINTING=1
@ -4107,6 +4109,7 @@ MOZ_ARG_ENABLE_STRING(application,
calendar
xulrunner
macbrowser (Camino)
content/xslt (Standalone Transformiix XSLT)
standalone (use this for standalone
xpcom/xpconnect or to manually drive a build)],
[ MOZ_BUILD_APP=$enableval ] )
@ -4121,7 +4124,7 @@ suite)
MOZ_SUITE=1
MOZ_PROFILESHARING=
MOZ_APP_VERSION=$SEAMONKEY_VERSION
MOZ_EXTENSIONS_DEFAULT=" cookie wallet content-packs xml-rpc xmlextras help p3p pref transformiix venkman inspector irc universalchardet typeaheadfind webservices spellcheck gnomevfs auth sroaming permissions reporter"
MOZ_EXTENSIONS_DEFAULT=" cookie wallet content-packs xml-rpc xmlextras help p3p pref venkman inspector irc universalchardet typeaheadfind webservices spellcheck gnomevfs auth sroaming permissions reporter"
AC_DEFINE(MOZ_SUITE)
;;
@ -4132,7 +4135,7 @@ browser)
MOZ_UPDATER=1
MOZ_PHOENIX=1
MOZ_APP_VERSION=$FIREFOX_VERSION
MOZ_EXTENSIONS_DEFAULT=" cookie xml-rpc xmlextras pref transformiix universalchardet webservices inspector gnomevfs auth permissions reporter"
MOZ_EXTENSIONS_DEFAULT=" cookie xml-rpc xmlextras pref universalchardet webservices inspector gnomevfs auth permissions reporter"
AC_DEFINE(MOZ_PHOENIX)
;;
@ -4147,7 +4150,7 @@ minimo)
MOZ_APP_VERSION=`cat $topsrcdir/minimo/config/version.txt`
MOZ_COMPOSER=
MOZ_ENABLE_POSTSCRIPT=
MOZ_EXTENSIONS_DEFAULT="xml-rpc xmlextras transformiix webservices spatialnavigation"
MOZ_EXTENSIONS_DEFAULT="xml-rpc xmlextras webservices spatialnavigation"
MOZ_IMG_DECODERS_DEFAULT="png gif jpeg"
MOZ_IMG_ENCODERS_DEFAULT=
MOZ_IMG_ENCODERS=
@ -4220,7 +4223,7 @@ calendar)
MOZ_SUNBIRD=1
MOZ_CALENDAR=1
MOZ_APP_VERSION=`cat $topsrcdir/calendar/sunbird/config/version.txt`
MOZ_EXTENSIONS_DEFAULT=" pref xmlextras transformiix"
MOZ_EXTENSIONS_DEFAULT=" pref xmlextras"
AC_DEFINE(MOZ_SUNBIRD)
;;
@ -4232,7 +4235,7 @@ xulrunner)
MOZ_XULRUNNER=1
MOZ_ENABLE_LIBXUL=1
MOZ_APP_VERSION=$MOZILLA_VERSION
MOZ_EXTENSIONS_DEFAULT=" xml-rpc xmlextras pref transformiix universalchardet webservices gnomevfs auth"
MOZ_EXTENSIONS_DEFAULT=" xml-rpc xmlextras pref universalchardet webservices gnomevfs auth"
AC_DEFINE(MOZ_XULRUNNER)
;;
@ -4240,10 +4243,18 @@ macbrowser)
MOZ_APP_NAME=mozilla
MOZ_APP_DISPLAYNAME=Mozilla
MOZ_APP_VERSION=$MOZILLA_VERSION
MOZ_EXTENSIONS_DEFAULT=" cookie xmlextras universalchardet typeaheadfind transformiix permissions"
MOZ_EXTENSIONS_DEFAULT=" cookie xmlextras universalchardet typeaheadfind permissions"
AC_DEFINE(MOZ_MACBROWSER)
;;
content/xslt)
MOZ_APP_NAME=mozilla
MOZ_EXTENSIONS_DEFAULT=""
AC_DEFINE(TX_EXE)
MOZ_XSLT_STANDALONE=1
MOZ_APP_VERSION=$MOZILLA_VERSION
;;
standalone)
MOZ_APP_NAME=mozilla
MOZ_APP_DISPLAYNAME=Mozilla
@ -5109,15 +5120,6 @@ dnl if test -n "$MOZ_SVG_FOREIGNOBJECT"; then
dnl AC_DEFINE(MOZ_SVG_FOREIGNOBJECT)
dnl fi
dnl ========================================================
dnl Transformiix
dnl ========================================================
dnl To build transformiix standalone, set TX_EXE while configuring
if test "$TX_EXE"; then
AC_DEFINE(TX_EXE)
fi
dnl ========================================================
dnl Installer
dnl ========================================================
@ -6718,7 +6720,7 @@ AC_SUBST(MOZ_SVG_FOREIGNOBJECT)
AC_SUBST(MOZ_SVG_RENDERER_GDIPLUS)
AC_SUBST(MOZ_SVG_RENDERER_LIBART)
AC_SUBST(MOZ_SVG_RENDERER_CAIRO)
AC_SUBST(TX_EXE)
AC_SUBST(MOZ_XSLT_STANDALONE)
AC_SUBST(MOZ_JS_LIBS)
AC_SUBST(MOZ_PSM)
AC_SUBST(BUILD_MODULES)

View File

@ -43,7 +43,7 @@ VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
MODULE = content
DIRS = base canvas html xml xul xbl xsl
DIRS = base canvas html xml xul xbl xslt
ifdef MOZ_SVG
DIRS += svg

View File

@ -42,8 +42,6 @@ VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
DIRS = public
include $(topsrcdir)/config/config.mk
DIRS = public src
include $(topsrcdir)/config/rules.mk

View File

@ -44,8 +44,8 @@ include $(DEPTH)/config/autoconf.mk
DIRS = base xml xpath xslt
ifdef TX_EXE
DIRS += lib main
ifdef MOZ_XSLT_STANDALONE
DIRS += main
endif
include $(topsrcdir)/config/rules.mk

View File

@ -50,11 +50,12 @@ REQUIRES = string \
xpcom \
$(NULL)
ifndef TX_EXE
ifndef MOZ_XSLT_STANDALONE
REQUIRES += unicharutil \
dom \
content \
layout \
pref \
widget \
necko \
caps \
@ -64,15 +65,15 @@ REQUIRES += unicharutil \
$(NULL)
endif
CPPSRCS = Double.cpp \
List.cpp \
CPPSRCS = txDouble.cpp \
txList.cpp \
txAtoms.cpp \
txExpandedNameMap.cpp \
txNamespaceMap.cpp \
txURIUtils.cpp
ifdef TX_EXE
CPPSRCS += SimpleErrorObserver.cpp \
ifdef MOZ_XSLT_STANDALONE
CPPSRCS += txSimpleErrorObserver.cpp \
txStringUtils.cpp
endif
@ -82,5 +83,9 @@ FORCE_STATIC_LIB = 1
include $(topsrcdir)/config/rules.mk
INCLUDES += -I$(srcdir)/../xpath -I$(srcdir)/../xslt -I$(srcdir)/../xml \
-I$(srcdir)/../xml/dom -I$(srcdir)
INCLUDES += \
-I$(srcdir) \
-I$(srcdir)/../xml \
-I$(srcdir)/../xpath \
-I$(srcdir)/../xslt \
$(NULL)

View File

@ -37,7 +37,7 @@
#include "nsString.h"
#include "txCore.h"
#include "XMLUtils.h"
#include "txXMLUtils.h"
#include <math.h>
#include <stdlib.h>
#ifdef WIN32

View File

@ -40,7 +40,7 @@
#define TRANSFRMX_EXPANDEDNAMEMAP_H
#include "txError.h"
#include "XMLUtils.h"
#include "txXMLUtils.h"
class TxObject;

View File

@ -36,7 +36,7 @@
*
* ***** END LICENSE BLOCK ***** */
#include "List.h"
#include "txList.h"
//----------------------------/
//- Implementation of txList -/

View File

@ -36,8 +36,8 @@
*
* ***** END LICENSE BLOCK ***** */
#ifndef TxLog_h__
#define TxLog_h__
#ifndef txLog_h__
#define txLog_h__
#include "prlog.h"
#include "prmem.h"

View File

@ -36,7 +36,7 @@
*
* ***** END LICENSE BLOCK ***** */
#include "ErrorObserver.h"
#include "txErrorObserver.h"
#include "nsString.h"
/**

View File

@ -40,7 +40,7 @@
#define txTokenizer_h___
#include "nsDependentSubstring.h"
#include "XMLUtils.h"
#include "txXMLUtils.h"
class txTokenizer
{

View File

@ -202,113 +202,6 @@ void URIUtils::resolveHref(const nsAString& href, const nsAString& base,
#ifndef TX_EXE
nsIScriptSecurityManager *gTxSecurityManager = 0;
// static
PRBool URIUtils::CanCallerAccess(nsIDOMNode *aNode)
{
if (!gTxSecurityManager) {
// No security manager available, let any calls go through...
return PR_TRUE;
}
nsCOMPtr<nsIPrincipal> subjectPrincipal;
gTxSecurityManager->GetSubjectPrincipal(getter_AddRefs(subjectPrincipal));
if (!subjectPrincipal) {
// we're running as system, grant access to the node.
return PR_TRUE;
}
// Check whether the subject principal is the system principal.
// For performance, we will avoid calling SubjectPrincipalIsChrome()
// since it calls GetSubjectPrincipal() which causes us to walk
// the JS frame stack. We already did that above, so just get the
// system principal from the security manager, and do a raw comparison.
nsCOMPtr<nsIPrincipal> systemPrincipal;
gTxSecurityManager->GetSystemPrincipal(getter_AddRefs(systemPrincipal));
if (subjectPrincipal == systemPrincipal) {
// we're running as system, grant access to the node.
return PR_TRUE;
}
// Ask the securitymanager if we have "UniversalBrowserRead"
PRBool caps = PR_FALSE;
nsresult rv =
gTxSecurityManager->IsCapabilityEnabled("UniversalBrowserRead",
&caps);
NS_ENSURE_SUCCESS(rv, PR_FALSE);
if (caps) {
return PR_TRUE;
}
// Make sure that this is a real node. We do this by first QI'ing to
// nsIContent (which is important performance wise) and if that QI
// fails we QI to nsIDocument. If both those QI's fail we won't let
// the caller access this unknown node.
nsIPrincipal *principal = nsnull;
nsCOMPtr<nsIContent> content = do_QueryInterface(aNode);
nsCOMPtr<nsIAttribute> attr;
nsCOMPtr<nsIDocument> doc;
if (!content) {
doc = do_QueryInterface(aNode);
if (!doc) {
attr = do_QueryInterface(aNode);
if (!attr) {
// aNode is not a nsIContent, a nsIAttribute or a nsIDocument,
// something weird is going on...
NS_ERROR("aNode is not a nsIContent, a nsIAttribute or a nsIDocument!");
return PR_FALSE;
}
}
}
if (!doc) {
nsCOMPtr<nsIDOMDocument> domDoc;
aNode->GetOwnerDocument(getter_AddRefs(domDoc));
if (!domDoc) {
nsINodeInfo *ni = content ? content->NodeInfo() : attr->NodeInfo();
principal = ni->GetDocumentPrincipal();
if (!principal) {
// we can't get to the principal so we'll give up and give the
// caller access
return PR_TRUE;
}
}
else {
doc = do_QueryInterface(domDoc);
NS_ASSERTION(doc, "QI to nsIDocument failed");
}
}
if (!principal) {
principal = doc->GetPrincipal();
}
if (!principal) {
// We can't get hold of the principal for this node. This should happen
// very rarely, like for textnodes out of the tree and <option>s created
// using 'new Option'.
return PR_TRUE;
}
rv = gTxSecurityManager->CheckSameOriginPrincipal(subjectPrincipal,
principal);
return NS_SUCCEEDED(rv);
}
// static
void
URIUtils::ResetWithSource(nsIDocument *aNewDoc, nsIDOMNode *aSourceNode)

View File

@ -46,8 +46,6 @@
#else
class nsIDocument;
class nsIDOMNode;
class nsIScriptSecurityManager;
extern nsIScriptSecurityManager *gTxSecurityManager;
#endif
@ -90,11 +88,6 @@ public:
#else /* TX_EXE */
/*
* Checks if a caller is allowed to access a given node
*/
static PRBool CanCallerAccess(nsIDOMNode *aNode);
/**
* Reset the given document with the document of the source node
*/

View File

@ -57,14 +57,18 @@ REQUIRES = string \
CPP_PROG_LINK = 1
EXTRA_DEPS = \
$(DIST)/lib/$(LIB_PREFIX)tx.$(LIB_SUFFIX) \
$(NULL)
TX_LIBS = \
txxslt_s \
txxpath_s \
txxml_s \
txbase_s \
expat_s \
$(NULL)
EXTRA_LIBS = \
$(DIST)/lib/$(LIB_PREFIX)tx.$(LIB_SUFFIX) \
$(MOZ_COMPONENT_LIBS) \
$(NULL)
LIBS = \
$(addprefix $(DIST)/lib/$(LIB_PREFIX),$(addsuffix .$(LIB_SUFFIX),$(TX_LIBS))) \
$(MOZ_COMPONENT_LIBS) \
$(NULL)
ifdef MOZ_JPROF
LIBS += -ljprof
@ -72,8 +76,10 @@ endif
include $(topsrcdir)/config/rules.mk
INCLUDES += -I$(srcdir)/../xslt -I$(srcdir)/../base -I$(srcdir)/../net \
-I$(srcdir)/../xml -I$(srcdir)/../xml/dom \
-I$(srcdir)/../xml/parser \
-I$(srcdir)/../xpath -I$(srcdir)/../xslt/util \
-I$(srcdir)/../xslt/functions $(MARK_INC)
INCLUDES += \
-I$(srcdir)/../base \
-I$(srcdir)/../xml \
-I$(srcdir)/../xpath \
-I$(srcdir)/../xslt \
$(MARK_INC) \
$(NULL)

View File

@ -39,7 +39,7 @@
#include "nsXPCOM.h"
#include "txStandaloneXSLTProcessor.h"
#include "nsString.h"
#include "ExprParser.h"
#include "txExprParser.h"
#include "txIXPathContext.h"
/**

View File

@ -46,24 +46,42 @@ MODULE = transformiix
LIBRARY_NAME = txxml_s
MOZILLA_INTERNAL_API = 1
REQUIRES = string \
REQUIRES = \
string \
xpcom \
$(NULL)
ifndef TX_EXE
REQUIRES += dom \
ifndef MOZ_XSLT_STANDALONE
REQUIRES += \
js \
xpconnect \
dom \
content \
layout \
pref \
widget \
unicharutil \
necko \
htmlparser \
$(NULL)
else
REQUIRES += expat
endif
DIRS = dom parser
CPPSRCS = \
txXMLUtils.cpp \
txXMLParser.cpp \
$(NULL)
CPPSRCS = XMLUtils.cpp
ifdef MOZ_XSLT_STANDALONE
CPPSRCS += \
txAttr.cpp \
txDocument.cpp \
txElement.cpp \
txNodeDefinition.cpp \
txProcessingInstruction.cpp \
$(NULL)
endif
# we don't want the shared lib, but we want to force the creation of a
# static lib.
@ -71,5 +89,9 @@ FORCE_STATIC_LIB = 1
include $(topsrcdir)/config/rules.mk
INCLUDES += -I$(srcdir)/../base -I$(srcdir)/dom -I$(srcdir)/../xpath \
-I$(srcdir)/../xslt
INCLUDES += \
-I$(srcdir)/../base \
-I$(srcdir) \
-I$(srcdir)/../xpath \
-I$(srcdir)/../xslt \
$(NULL)

View File

@ -41,9 +41,9 @@
// Implementation of the Attr class
//
#include "dom.h"
#include "txDOM.h"
#include "txAtoms.h"
#include "XMLUtils.h"
#include "txXMLUtils.h"
Attr::Attr(nsIAtom *aPrefix, nsIAtom *aLocalName, PRInt32 aNamespaceID,
Element *aOwnerElement, const nsAString &aValue) :

View File

@ -53,7 +53,7 @@
#include <stdlib.h>
#endif
#include "List.h"
#include "txList.h"
#include "nsIAtom.h"
#include "nsDoubleHashtable.h"
#include "nsString.h"

View File

@ -48,7 +48,7 @@
// LF 08/06/1999 fixed typo: defalut to default
//
#include "dom.h"
#include "txDOM.h"
#include "txAtoms.h"
//

View File

@ -41,9 +41,9 @@
// Implementation of the Element class
//
#include "dom.h"
#include "txDOM.h"
#include "txAtoms.h"
#include "XMLUtils.h"
#include "txXMLUtils.h"
Element::Element(nsIAtom *aPrefix, nsIAtom *aLocalName, PRInt32 aNamespaceID,
Document* aOwner) :

View File

@ -45,7 +45,7 @@
// TK 03/29/99 Created
//
#include "dom.h"
#include "txDOM.h"
#include "nsVoidArray.h"
#include "txURIUtils.h"
#include "txAtoms.h"

View File

@ -45,7 +45,7 @@
// TK 03/29/99 Created
//
#include "dom.h"
#include "txDOM.h"
#include "nsIAtom.h"
//

View File

@ -48,7 +48,7 @@
#else
#include "expat_config.h"
#include "expat.h"
#include "XMLUtils.h"
#include "txXMLUtils.h"
#endif
#ifdef TX_EXE

View File

@ -41,7 +41,7 @@
* XML utility classes
*/
#include "XMLUtils.h"
#include "txXMLUtils.h"
#include "nsString.h"
#include "nsReadableUtils.h"
#include "txAtoms.h"

View File

@ -51,6 +51,7 @@
#ifndef TX_EXE
#include "nsIParserService.h"
#include "nsContentUtils.h"
#endif
#define kExpatSeparatorChar 0xFFFF
@ -122,8 +123,6 @@ extern "C" int MOZ_XMLCheckQName(const char* ptr, const char* end,
int ns_aware, const char** colon);
extern "C" int MOZ_XMLIsLetter(const char* ptr);
extern "C" int MOZ_XMLIsNCNameChar(const char* ptr);
#else
extern nsIParserService *gTxParserService;
#endif
class XMLUtils {
@ -175,7 +174,8 @@ public:
*aColon = NS_REINTERPRET_CAST(const PRUnichar*, colonPtr);
return result == 0;
#else
return NS_SUCCEEDED(gTxParserService->CheckQName(aQName, PR_TRUE, aColon));
nsIParserService* ps = nsContentUtils::GetParserService();
return ps && NS_SUCCEEDED(ps->CheckQName(aQName, PR_TRUE, aColon));
#endif
}
@ -187,7 +187,8 @@ public:
#ifdef TX_EXE
return MOZ_XMLIsLetter(NS_REINTERPRET_CAST(const char*, &aChar));
#else
return gTxParserService->IsXMLLetter(aChar);
nsIParserService* ps = nsContentUtils::GetParserService();
return ps && ps->IsXMLLetter(aChar);
#endif
}
@ -199,7 +200,8 @@ public:
#ifdef TX_EXE
return MOZ_XMLIsNCNameChar(NS_REINTERPRET_CAST(const char*, &aChar));
#else
return gTxParserService->IsXMLNCNameChar(aChar);
nsIParserService* ps = nsContentUtils::GetParserService();
return ps && ps->IsXMLNCNameChar(aChar);
#endif
}

View File

@ -50,7 +50,7 @@ REQUIRES = string \
xpcom \
$(NULL)
ifndef TX_EXE
ifndef MOZ_XSLT_STANDALONE
REQUIRES += dom \
content \
widget \
@ -60,29 +60,30 @@ REQUIRES += dom \
layout \
necko \
htmlparser \
pref \
$(NULL)
endif
CPPSRCS = AdditiveExpr.cpp \
AttributeValueTemplate.cpp \
BooleanExpr.cpp \
BooleanFunctionCall.cpp \
BooleanResult.cpp \
ExprLexer.cpp \
ExprParser.cpp \
FilterExpr.cpp \
FunctionCall.cpp \
LocationStep.cpp \
MultiplicativeExpr.cpp \
NodeSetFunctionCall.cpp \
NumberFunctionCall.cpp \
NumberResult.cpp \
PathExpr.cpp \
PredicateList.cpp \
RelationalExpr.cpp \
RootExpr.cpp \
StringFunctionCall.cpp \
StringResult.cpp \
CPPSRCS = txAdditiveExpr.cpp \
txAttributeValueTemplate.cpp \
txBooleanExpr.cpp \
txBooleanFunctionCall.cpp \
txBooleanResult.cpp \
txExprLexer.cpp \
txExprParser.cpp \
txFilterExpr.cpp \
txFunctionCall.cpp \
txLocationStep.cpp \
txMultiplicativeExpr.cpp \
txNodeSetFunctionCall.cpp \
txNumberFunctionCall.cpp \
txNumberResult.cpp \
txPathExpr.cpp \
txPredicateList.cpp \
txRelationalExpr.cpp \
txRootExpr.cpp \
txStringFunctionCall.cpp \
txStringResult.cpp \
txErrorExpr.cpp \
txLiteralExpr.cpp \
txNameTest.cpp \
@ -91,10 +92,10 @@ CPPSRCS = AdditiveExpr.cpp \
txForwardContext.cpp \
txNodeSetContext.cpp \
txResultRecycler.cpp \
UnionExpr.cpp \
UnaryExpr.cpp \
VariableRefExpr.cpp
ifndef TX_EXE
txUnionExpr.cpp \
txUnaryExpr.cpp \
txVariableRefExpr.cpp
ifndef MOZ_XSLT_STANDALONE
CPPSRCS += nsXPathEvaluator.cpp \
nsXPathException.cpp \
nsXPathExpression.cpp \
@ -106,13 +107,13 @@ else
CPPSRCS += txStandaloneXPathTreeWalker.cpp
endif
ifndef TX_EXE
ifndef DISABLE_XFORMS_HOOKS
ifndef DISABLE_XFORMS_HOOKS # Dummy var, nobody sets it!
ifndef MOZ_XSLT_STANDALONE
EXPORTS = nsIXFormsUtilityService.h \
nsIXFormsXPathEvaluator.h
CPPSRCS += nsXFormsXPathEvaluator.cpp \
XFormsFunctionCall.cpp
txXFormsFunctionCall.cpp
endif
endif
@ -122,6 +123,9 @@ FORCE_STATIC_LIB = 1
include $(topsrcdir)/config/rules.mk
INCLUDES += -I$(srcdir) -I$(srcdir)/../base \
-I$(srcdir)/../xml -I$(srcdir)/../xml/dom \
-I$(srcdir)/../xslt
INCLUDES += \
-I$(srcdir)/../base \
-I$(srcdir)/../xml \
-I$(srcdir) \
-I$(srcdir)/../xslt \
$(NULL)

View File

@ -45,8 +45,8 @@
#include "nsXPathNSResolver.h"
#include "nsXPathResult.h"
#include "nsContentCID.h"
#include "Expr.h"
#include "ExprParser.h"
#include "txExpr.h"
#include "txExprParser.h"
#include "nsDOMError.h"
#include "txURIUtils.h"
#include "nsIDocument.h"
@ -55,10 +55,9 @@
#include "nsINameSpaceManager.h"
#include "txError.h"
#include "txAtoms.h"
#include "XFormsFunctions.h"
#include "txXFormsFunctions.h"
#include "nsIDOM3Node.h"
extern nsINameSpaceManager* gTxNameSpaceManager;
#include "nsContentUtils.h"
NS_IMPL_ADDREF(nsXFormsXPathEvaluator)
NS_IMPL_RELEASE(nsXFormsXPathEvaluator)
@ -186,7 +185,7 @@ nsresult nsXFormsXPathEvaluator::XFormsParseContextImpl::resolveNamespacePrefix
}
// get the namespaceID for the URI
return gTxNameSpaceManager->RegisterNameSpace(ns, aID);
return nsContentUtils::NameSpaceManager()->RegisterNameSpace(ns, aID);
}
nsresult

View File

@ -45,8 +45,8 @@
#include "nsXPathNSResolver.h"
#include "nsXPathResult.h"
#include "nsContentCID.h"
#include "Expr.h"
#include "ExprParser.h"
#include "txExpr.h"
#include "txExprParser.h"
#include "nsDOMError.h"
#include "txURIUtils.h"
#include "nsIDocument.h"
@ -54,8 +54,7 @@
#include "nsDOMString.h"
#include "nsINameSpaceManager.h"
#include "txError.h"
extern nsINameSpaceManager* gTxNameSpaceManager;
#include "nsContentUtils.h"
NS_IMPL_AGGREGATED(nsXPathEvaluator)
NS_INTERFACE_MAP_BEGIN_AGGREGATED(nsXPathEvaluator)
@ -120,7 +119,7 @@ nsXPathEvaluator::CreateNSResolver(nsIDOMNode *aNodeResolver,
nsIDOMXPathNSResolver **aResult)
{
NS_ENSURE_ARG(aNodeResolver);
if (!URIUtils::CanCallerAccess(aNodeResolver))
if (!nsContentUtils::CanCallerAccess(aNodeResolver))
return NS_ERROR_DOM_SECURITY_ERR;
*aResult = new nsXPathNSResolver(aNodeResolver);
@ -191,7 +190,7 @@ nsresult nsXPathEvaluator::ParseContextImpl::resolveNamespacePrefix
}
// get the namespaceID for the URI
return gTxNameSpaceManager->RegisterNameSpace(ns, aID);
return nsContentUtils::NameSpaceManager()->RegisterNameSpace(ns, aID);
}
nsresult

View File

@ -37,8 +37,8 @@
* ***** END LICENSE BLOCK ***** */
#include "nsXPathExpression.h"
#include "Expr.h"
#include "ExprResult.h"
#include "txExpr.h"
#include "txExprResult.h"
#include "nsDOMError.h"
#include "nsIDOMCharacterData.h"
#include "nsIDOMClassInfo.h"
@ -91,7 +91,7 @@ nsXPathExpression::EvaluateWithContext(nsIDOMNode *aContextNode,
if (aContextPosition > aContextSize)
return NS_ERROR_FAILURE;
if (!URIUtils::CanCallerAccess(aContextNode))
if (!nsContentUtils::CanCallerAccess(aContextNode))
return NS_ERROR_DOM_SECURITY_ERR;
nsresult rv;

View File

@ -37,7 +37,7 @@
* ***** END LICENSE BLOCK ***** */
#include "nsXPathResult.h"
#include "ExprResult.h"
#include "txExprResult.h"
#include "txNodeSet.h"
#include "nsDOMError.h"
#include "nsIContent.h"

View File

@ -39,7 +39,7 @@
#ifndef nsXPathResult_h__
#define nsXPathResult_h__
#include "ExprResult.h"
#include "txExprResult.h"
#include "nsIDOMXPathResult.h"
#include "nsIDocument.h"
#include "nsIDocumentObserver.h"

View File

@ -43,8 +43,8 @@
* - : subtraction
**/
#include "Expr.h"
#include "ExprResult.h"
#include "txExpr.h"
#include "txExprResult.h"
#include "txIXPathContext.h"
/**

View File

@ -40,8 +40,8 @@
* AttributeValueTemplate
**/
#include "Expr.h"
#include "ExprResult.h"
#include "txExpr.h"
#include "txExprResult.h"
#include "txIXPathContext.h"
/**

View File

@ -42,8 +42,8 @@
* performs a boolean operation between it's lvalue and rvalue.
**/
#include "Expr.h"
#include "ExprResult.h"
#include "txExpr.h"
#include "txExprResult.h"
#include "txIXPathContext.h"
/**

View File

@ -36,8 +36,8 @@
*
* ***** END LICENSE BLOCK ***** */
#include "ExprResult.h"
#include "FunctionLib.h"
#include "txExprResult.h"
#include "txFunctionLib.h"
#include "nsReadableUtils.h"
#include "txAtoms.h"
#include "txError.h"

View File

@ -40,7 +40,7 @@
* Boolean Expression result
*/
#include "ExprResult.h"
#include "txExprResult.h"
/**
* Creates a new BooleanResult with the value of the given MBool parameter

View File

@ -37,7 +37,7 @@
* ***** END LICENSE BLOCK ***** */
#include "txError.h"
#include "Expr.h"
#include "txExpr.h"
#include "nsString.h"
#include "txIXPathContext.h"

View File

@ -41,7 +41,7 @@
#ifndef TRANSFRMX_EXPR_H
#define TRANSFRMX_EXPR_H
#include "List.h"
#include "txList.h"
#include "nsAutoPtr.h"
#include "txCore.h"
#include "nsString.h"

View File

@ -40,11 +40,11 @@
* Lexical analyzer for XPath expressions
*/
#include "ExprLexer.h"
#include "txExprLexer.h"
#include "txAtoms.h"
#include "nsString.h"
#include "txError.h"
#include "XMLUtils.h"
#include "txXMLUtils.h"
/**
* Creates a new ExprLexer
@ -113,7 +113,7 @@ txExprLexer::nextIsOperatorToken(Token* aToken)
if (!aToken || aToken->mType == Token::NULL_TOKEN) {
return PR_FALSE;
}
/* This relies on the tokens having the right order in ExprLexer.h */
/* This relies on the tokens having the right order in txExprLexer.h */
return aToken->mType < Token::COMMA ||
aToken->mType > Token::UNION_OP;

View File

@ -42,9 +42,9 @@
* @see ExprLexer
**/
#include "ExprParser.h"
#include "ExprLexer.h"
#include "FunctionLib.h"
#include "txExprParser.h"
#include "txExprLexer.h"
#include "txFunctionLib.h"
#include "txStack.h"
#include "txAtoms.h"
#include "txError.h"

View File

@ -37,7 +37,7 @@
*
* ***** END LICENSE BLOCK ***** */
#include "Expr.h"
#include "txExpr.h"
#include "txNodeSet.h"
#include "txIXPathContext.h"

View File

@ -36,8 +36,8 @@
*
* ***** END LICENSE BLOCK ***** */
#include "FunctionLib.h"
#include "ExprResult.h"
#include "txFunctionLib.h"
#include "txExprResult.h"
#include "nsIAtom.h"
#include "txIXPathContext.h"
#include "txNodeSet.h"

View File

@ -39,7 +39,7 @@
#ifndef TRANSFRMX_FUNCTIONLIB_H
#define TRANSFRMX_FUNCTIONLIB_H
#include "Expr.h"
#include "txExpr.h"
#include "nsIAtom.h"
/**

View File

@ -36,8 +36,8 @@
*
* ***** END LICENSE BLOCK ***** */
#include "Expr.h"
#include "ExprResult.h"
#include "txExpr.h"
#include "txExprResult.h"
txLiteralExpr::txLiteralExpr(double aDbl)
: mValue(new NumberResult(aDbl, nsnull))

View File

@ -40,7 +40,7 @@
Implementation of an XPath LocationStep
*/
#include "Expr.h"
#include "txExpr.h"
#include "txIXPathContext.h"
#include "txNodeSet.h"

View File

@ -51,8 +51,8 @@
#include "nsReadableUtils.h"
#include "nsString.h"
#include "nsTextFragment.h"
#include "XMLUtils.h"
#include "TxLog.h"
#include "txXMLUtils.h"
#include "txLog.h"
#include "nsUnicharUtils.h"
const PRUint32 kUnknownIndex = PRUint32(-1);
@ -529,7 +529,7 @@ txXPathNodeUtils::getNamespaceID(const txXPathNode& aNode)
void
txXPathNodeUtils::getNamespaceURI(const txXPathNode& aNode, nsAString& aURI)
{
gTxNameSpaceManager->GetNameSpaceURI(getNamespaceID(aNode), aURI);
nsContentUtils::NameSpaceManager()->GetNameSpaceURI(getNamespaceID(aNode), aURI);
}
/* static */
@ -938,7 +938,7 @@ txXPathNativeNode::getNode(const txXPathNode& aNode, nsIDOMNode** aResult)
getter_AddRefs(prefix));
nsAutoString namespaceURI, localname;
gTxNameSpaceManager->GetNameSpaceURI(namespaceID, namespaceURI);
nsContentUtils::NameSpaceManager()->GetNameSpaceURI(namespaceID, namespaceURI);
name->ToString(localname);
nsCOMPtr<nsIDOMElement> element = do_QueryInterface(aNode.mContent);

View File

@ -44,8 +44,8 @@
* div : divide
**/
#include "Expr.h"
#include "ExprResult.h"
#include "txExpr.h"
#include "txExprResult.h"
#include <math.h>
#include "txIXPathContext.h"

View File

@ -36,7 +36,7 @@
*
* ***** END LICENSE BLOCK ***** */
#include "Expr.h"
#include "txExpr.h"
#include "nsIAtom.h"
#include "txAtoms.h"
#include "txXPathTreeWalker.h"

View File

@ -37,7 +37,7 @@
* ***** END LICENSE BLOCK ***** */
#include "txNodeSet.h"
#include "TxLog.h"
#include "txLog.h"
#include "nsMemory.h"
/**

View File

@ -43,7 +43,7 @@
#ifndef txNodeSet_h__
#define txNodeSet_h__
#include "ExprResult.h"
#include "txExprResult.h"
#include "nsVoidArray.h"
#include "txError.h"
#include "txXPathTreeWalker.h"

View File

@ -41,7 +41,7 @@
* A representation of the XPath NodeSet funtions
*/
#include "FunctionLib.h"
#include "txFunctionLib.h"
#include "nsAutoPtr.h"
#include "txNodeSet.h"
#include "txAtoms.h"

View File

@ -36,7 +36,7 @@
*
* ***** END LICENSE BLOCK ***** */
#include "Expr.h"
#include "txExpr.h"
#include "nsIAtom.h"
#include "txIXPathContext.h"
#include "txXPathTreeWalker.h"

View File

@ -40,7 +40,7 @@
* A representation of the XPath Number funtions
*/
#include "FunctionLib.h"
#include "txFunctionLib.h"
#include <math.h>
#include "txNodeSet.h"
#include "txAtoms.h"

View File

@ -41,7 +41,7 @@
* Represents the a number as the result of evaluating an Expr
**/
#include "ExprResult.h"
#include "txExprResult.h"
/**
* Default Constructor

View File

@ -36,11 +36,11 @@
*
* ***** END LICENSE BLOCK ***** */
#include "Expr.h"
#include "txExpr.h"
#include "txNodeSet.h"
#include "txNodeSetContext.h"
#include "txSingleNodeContext.h"
#include "XMLUtils.h"
#include "txXMLUtils.h"
//------------/
//- PathExpr -/

View File

@ -36,7 +36,7 @@
*
* ***** END LICENSE BLOCK ***** */
#include "Expr.h"
#include "txExpr.h"
#include "txNodeSet.h"
#include "txNodeSetContext.h"

View File

@ -36,7 +36,7 @@
*
* ***** END LICENSE BLOCK ***** */
#include "Expr.h"
#include "txExpr.h"
#include "txNodeSet.h"
#include "txIXPathContext.h"

View File

@ -37,7 +37,7 @@
* ***** END LICENSE BLOCK ***** */
#include "txResultRecycler.h"
#include "ExprResult.h"
#include "txExprResult.h"
#include "txNodeSet.h"
txResultRecycler::txResultRecycler()

View File

@ -36,7 +36,7 @@
*
* ***** END LICENSE BLOCK ***** */
#include "Expr.h"
#include "txExpr.h"
#include "txNodeSet.h"
#include "txIXPathContext.h"

View File

@ -41,7 +41,7 @@
#include "nsPrintfCString.h"
#include "nsReadableUtils.h"
#include "nsString.h"
#include "XMLUtils.h"
#include "txXMLUtils.h"
txXPathTreeWalker::txXPathTreeWalker(const txXPathTreeWalker& aOther)
: mPosition(aOther.mPosition)

View File

@ -41,12 +41,12 @@
* A representation of the XPath String funtions
**/
#include "ExprResult.h"
#include "FunctionLib.h"
#include "txExprResult.h"
#include "txFunctionLib.h"
#include "txAtoms.h"
#include "txError.h"
#include "txIXPathContext.h"
#include "XMLUtils.h"
#include "txXMLUtils.h"
#include "txXPathTreeWalker.h"
#include <math.h>
#include "nsReadableUtils.h"

View File

@ -40,7 +40,7 @@
* StringResult
* Represents a String as a Result of evaluating an Expr
**/
#include "ExprResult.h"
#include "txExprResult.h"
/**
* Default Constructor

View File

@ -36,8 +36,8 @@
*
* ***** END LICENSE BLOCK ***** */
#include "Expr.h"
#include "ExprResult.h"
#include "txExpr.h"
#include "txExprResult.h"
#include "txIXPathContext.h"
/*

View File

@ -36,7 +36,7 @@
*
* ***** END LICENSE BLOCK ***** */
#include "Expr.h"
#include "txExpr.h"
#include "txIXPathContext.h"
#include "txNodeSet.h"

View File

@ -36,7 +36,7 @@
*
* ***** END LICENSE BLOCK ***** */
#include "Expr.h"
#include "txExpr.h"
#include "nsIAtom.h"
#include "txNodeSet.h"
#include "txAtoms.h"

View File

@ -41,13 +41,13 @@
* A representation of the XPath NodeSet funtions
*/
#include "FunctionLib.h"
#include "txFunctionLib.h"
#include "nsAutoPtr.h"
#include "txNodeSet.h"
#include "txAtoms.h"
#include "txIXPathContext.h"
#include "txTokenizer.h"
#include "XFormsFunctions.h"
#include "txXFormsFunctions.h"
#include <math.h>
#include "nsIDOMDocument.h"
#include "nsIDOMDocumentEvent.h"

View File

@ -39,7 +39,7 @@
#ifndef TRANSFRMX_XFORMS_FUNCTIONS_H
#define TRANSFRMX_XFORMS_FUNCTIONS_H
#include "Expr.h"
#include "txExpr.h"
#include "nsIDOMNode.h"
#define NS_NAMESPACE_XFORMS "http://www.w3.org/2002/xforms"

View File

@ -91,7 +91,8 @@ TX_ATOM(preceding, "preceding")
TX_ATOM(precedingSibling, "preceding-sibling")
TX_ATOM(self, "self")
#ifndef DISABLE_XFORMS_HOOKS
#ifndef DISABLE_XFORMS_HOOKS // Dummy variable, nobody sets me!
// XForms XPath Extensions
TX_ATOM(avg, "avg")
TX_ATOM(booleanFromString, "boolean-from-string")

View File

@ -40,15 +40,14 @@
#define txXPathNode_h__
#ifdef TX_EXE
#include "dom.h"
#include "txDOM.h"
#else
#include "nsAutoPtr.h"
#include "nsIContent.h"
#include "nsIDocument.h"
#include "nsIDOMNode.h"
#include "nsINameSpaceManager.h"
extern nsINameSpaceManager* gTxNameSpaceManager;
#include "nsContentUtils.h"
#endif
#ifdef TX_EXE
@ -131,10 +130,9 @@ txNamespaceManager::getNamespaceID(const nsAString& aNamespaceURI)
#ifdef TX_EXE
return txStandaloneNamespaceManager::getNamespaceID(aNamespaceURI);
#else
NS_ASSERTION(gTxNameSpaceManager, "No namespace manager");
PRInt32 namespaceID = kNameSpaceID_Unknown;
gTxNameSpaceManager->RegisterNameSpace(aNamespaceURI, namespaceID);
nsContentUtils::NameSpaceManager()->
RegisterNameSpace(aNamespaceURI, namespaceID);
return namespaceID;
#endif
}
@ -146,9 +144,8 @@ txNamespaceManager::getNamespaceURI(const PRInt32 aID, nsAString& aResult)
#ifdef TX_EXE
return txStandaloneNamespaceManager::getNamespaceURI(aID, aResult);
#else
NS_ASSERTION(gTxNameSpaceManager, "No namespace manager");
return gTxNameSpaceManager->GetNameSpaceURI(aID, aResult);
return nsContentUtils::NameSpaceManager()->
GetNameSpaceURI(aID, aResult);
#endif
}

View File

@ -42,18 +42,18 @@ VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
DIRS = functions util
MODULE = transformiix
LIBRARY_NAME = txxslt_s
MOZILLA_INTERNAL_API = 1
REQUIRES = string \
REQUIRES = \
string \
xpcom \
$(NULL)
ifndef TX_EXE
REQUIRES += dom \
ifndef MOZ_XSLT_STANDALONE
REQUIRES += \
dom \
content \
widget \
necko \
@ -69,14 +69,19 @@ REQUIRES += dom \
windowwatcher \
mimetype \
intl \
locale \
htmlparser \
pref \
$(NULL)
else
REQUIRES += expat \
REQUIRES += \
expat \
$(NULL)
endif
CPPSRCS = \
txNodeSorter.cpp \
txXPathResultComparator.cpp \
txBufferingHandler.cpp \
txExecutionState.cpp \
txInstructions.cpp \
@ -92,9 +97,17 @@ CPPSRCS = \
txXSLTPatterns.cpp \
txXSLTProcessor.cpp \
txPatternParser.cpp \
txUnknownHandler.cpp
txUnknownHandler.cpp \
txCurrentFunctionCall.cpp \
txDocumentFunctionCall.cpp \
txElementAvailableFnCall.cpp \
txFormatNumberFunctionCall.cpp \
txFunctionAvailableFnCall.cpp \
txGenerateIdFunctionCall.cpp \
txKeyFunctionCall.cpp \
txSystemPropertyFunctionCall.cpp
ifdef TX_EXE
ifdef MOZ_XSLT_STANDALONE
CPPSRCS += txHTMLOutput.cpp \
txStandaloneXSLTProcessor.cpp \
txStandaloneStylesheetCompiler.cpp \
@ -113,10 +126,13 @@ FORCE_STATIC_LIB = 1
include $(topsrcdir)/config/rules.mk
INCLUDES += -I$(srcdir) -I$(srcdir)/../base \
-I$(srcdir)/../xml -I$(srcdir)/../xml/dom \
-I$(srcdir)/../xml/parser \
-I$(srcdir)/../xpath -I$(srcdir)/util -I$(srcdir)/functions
ifdef TX_EXE
INCLUDES += \
-I$(srcdir) \
-I$(srcdir)/../base \
-I$(srcdir)/../xml \
-I$(srcdir)/../xpath \
$(NULL)
ifdef MOZ_XSLT_STANDALONE
DEFINES += -DXML_DTD -DXML_UNICODE
endif

View File

@ -1,5 +1,5 @@
#include "txAtoms.h"
#include "XSLTFunctions.h"
#include "txXSLTFunctions.h"
#include "txExecutionState.h"
/*

View File

@ -43,7 +43,7 @@
#include "txAtoms.h"
#include "txIXPathContext.h"
#include "XSLTFunctions.h"
#include "txXSLTFunctions.h"
#include "txExecutionState.h"
#include "txURIUtils.h"

View File

@ -39,9 +39,9 @@
#include "txIXPathContext.h"
#include "txAtoms.h"
#include "txError.h"
#include "XMLUtils.h"
#include "XSLTFunctions.h"
#include "ExprResult.h"
#include "txXMLUtils.h"
#include "txXSLTFunctions.h"
#include "txExprResult.h"
#include "txNamespaceMap.h"
/*

View File

@ -43,7 +43,7 @@
#include "txVariableMap.h"
#include "txRtfHandler.h"
#include "txXSLTProcessor.h"
#include "TxLog.h"
#include "txLog.h"
#include "txURIUtils.h"
#include "txXMLParser.h"

View File

@ -41,7 +41,7 @@
#include "txCore.h"
#include "txStack.h"
#include "XMLUtils.h"
#include "txXMLUtils.h"
#include "nsVoidArray.h"
#include "txIXPathContext.h"
#include "txVariableMap.h"

View File

@ -36,12 +36,12 @@
*
* ***** END LICENSE BLOCK ***** */
#include "XSLTFunctions.h"
#include "txXSLTFunctions.h"
#include "txAtoms.h"
#include "txIXPathContext.h"
#include "txStylesheet.h"
#include <math.h>
#include "ExprResult.h"
#include "txExprResult.h"
#include "txNamespaceMap.h"
#include "prdtoa.h"

View File

@ -37,11 +37,11 @@
* ***** END LICENSE BLOCK ***** */
#include "txIXPathContext.h"
#include "ExprResult.h"
#include "txExprResult.h"
#include "txAtoms.h"
#include "txError.h"
#include "XMLUtils.h"
#include "XSLTFunctions.h"
#include "txXMLUtils.h"
#include "txXSLTFunctions.h"
#include "txNamespaceMap.h"
/*

View File

@ -35,11 +35,11 @@
*
* ***** END LICENSE BLOCK ***** */
#include "ExprResult.h"
#include "txExprResult.h"
#include "txAtoms.h"
#include "txIXPathContext.h"
#include "txNodeSet.h"
#include "XSLTFunctions.h"
#include "txXSLTFunctions.h"
/*
Implementation of XSLT 1.0 extension function: generate-id

View File

@ -42,7 +42,7 @@
#include "txAtoms.h"
#include "txOutputFormat.h"
#include "txStringUtils.h"
#include "XMLUtils.h"
#include "txXMLUtils.h"
#define EMPTY_ELEMENTS_COUNT 13
const char* const kHTMLEmptyTags[] =

View File

@ -38,8 +38,8 @@
#include "txInstructions.h"
#include "txError.h"
#include "Expr.h"
#include "ExprResult.h"
#include "txExpr.h"
#include "txExprResult.h"
#include "txStylesheet.h"
#include "txNodeSetContext.h"
#include "txTextHandler.h"

View File

@ -42,7 +42,7 @@
#include "nsCOMPtr.h"
#include "txCore.h"
#include "nsString.h"
#include "XMLUtils.h"
#include "txXMLUtils.h"
#include "txNamespaceMap.h"
#include "nsAutoPtr.h"
#include "txXSLTNumber.h"

View File

@ -41,9 +41,9 @@
#include "nsDoubleHashtable.h"
#include "txNodeSet.h"
#include "List.h"
#include "txList.h"
#include "txXSLTPatterns.h"
#include "XMLUtils.h"
#include "txXMLUtils.h"
class txPattern;
class Expr;

View File

@ -39,7 +39,7 @@
#include "txExecutionState.h"
#include "txAtoms.h"
#include "txSingleNodeContext.h"
#include "XSLTFunctions.h"
#include "txXSLTFunctions.h"
#include "nsReadableUtils.h"
#include "txKey.h"
#include "txXSLTPatterns.h"

View File

@ -62,10 +62,10 @@
#include "nsNetUtil.h"
#include "nsParserCIID.h"
#include "txAtoms.h"
#include "TxLog.h"
#include "txLog.h"
#include "txMozillaXSLTProcessor.h"
#include "txStylesheetCompiler.h"
#include "XMLUtils.h"
#include "txXMLUtils.h"
static const char kLoadAsData[] = "loadAsData";
static NS_DEFINE_CID(kCParserCID, NS_PARSER_CID);

View File

@ -60,7 +60,7 @@
#include "nsNetUtil.h"
#include "nsUnicharUtils.h"
#include "txAtoms.h"
#include "TxLog.h"
#include "txLog.h"
#include "nsIConsoleService.h"
#include "nsIDOMDocumentFragment.h"
#include "nsINameSpaceManager.h"
@ -73,8 +73,7 @@
#include "nsICSSLoader.h"
#include "nsICharsetAlias.h"
#include "nsIHTMLContentSink.h"
extern nsINameSpaceManager* gTxNameSpaceManager;
#include "nsContentUtils.h"
static NS_DEFINE_CID(kXMLDocumentCID, NS_XMLDOCUMENT_CID);
static NS_DEFINE_CID(kHTMLDocumentCID, NS_HTMLDOCUMENT_CID);
@ -164,7 +163,7 @@ void txMozillaXMLOutput::attribute(const nsAString& aName,
}
else {
nsAutoString nsURI;
gTxNameSpaceManager->GetNameSpaceURI(aNsID, nsURI);
nsContentUtils::NameSpaceManager()->GetNameSpaceURI(aNsID, nsURI);
element->SetAttributeNS(nsURI, aName, aValue);
}
}
@ -438,7 +437,7 @@ void txMozillaXMLOutput::startElement(const nsAString& aName,
}
else {
nsAutoString nsURI;
gTxNameSpaceManager->GetNameSpaceURI(aNsID, nsURI);
nsContentUtils::NameSpaceManager()->GetNameSpaceURI(aNsID, nsURI);
rv = mDocument->CreateElementNS(nsURI, aName,
getter_AddRefs(element));
NS_ASSERTION(NS_SUCCEEDED(rv), "Can't create element");

View File

@ -59,7 +59,7 @@
#include "txMozillaTextOutput.h"
#include "txMozillaXMLOutput.h"
#include "txURIUtils.h"
#include "XMLUtils.h"
#include "txXMLUtils.h"
#include "txUnknownHandler.h"
#include "txXSLTProcessor.h"
#include "nsIPrincipal.h"
@ -279,9 +279,9 @@ txMozillaXSLTProcessor::TransformDocument(nsIDOMNode* aSourceDOM,
NS_ENSURE_ARG(aOutputDoc);
NS_ENSURE_FALSE(aObserver, NS_ERROR_NOT_IMPLEMENTED);
if (!URIUtils::CanCallerAccess(aSourceDOM) ||
!URIUtils::CanCallerAccess(aStyleDOM) ||
!URIUtils::CanCallerAccess(aOutputDoc)) {
if (!nsContentUtils::CanCallerAccess(aSourceDOM) ||
!nsContentUtils::CanCallerAccess(aStyleDOM) ||
!nsContentUtils::CanCallerAccess(aOutputDoc)) {
return NS_ERROR_DOM_SECURITY_ERR;
}
@ -401,7 +401,7 @@ txMozillaXSLTProcessor::ImportStylesheet(nsIDOMNode *aStyle)
NS_ENSURE_TRUE(!mStylesheetDocument && !mStylesheet,
NS_ERROR_NOT_IMPLEMENTED);
if (!URIUtils::CanCallerAccess(aStyle)) {
if (!nsContentUtils::CanCallerAccess(aStyle)) {
return NS_ERROR_DOM_SECURITY_ERR;
}
@ -442,7 +442,7 @@ txMozillaXSLTProcessor::TransformToDocument(nsIDOMNode *aSource,
NS_ENSURE_ARG_POINTER(aResult);
NS_ENSURE_SUCCESS(mCompileResult, mCompileResult);
if (!URIUtils::CanCallerAccess(aSource)) {
if (!nsContentUtils::CanCallerAccess(aSource)) {
return NS_ERROR_DOM_SECURITY_ERR;
}
@ -507,8 +507,8 @@ txMozillaXSLTProcessor::TransformToFragment(nsIDOMNode *aSource,
NS_ENSURE_ARG_POINTER(aResult);
NS_ENSURE_SUCCESS(mCompileResult, mCompileResult);
if (!URIUtils::CanCallerAccess(aSource) ||
!URIUtils::CanCallerAccess(aOutput)) {
if (!nsContentUtils::CanCallerAccess(aSource) ||
!nsContentUtils::CanCallerAccess(aOutput)) {
return NS_ERROR_DOM_SECURITY_ERR;
}
@ -591,7 +591,7 @@ txMozillaXSLTProcessor::SetParameter(const nsAString & aNamespaceURI,
nsCOMPtr<nsIDOMNode> node = do_QueryInterface(supports);
if (node) {
if (!URIUtils::CanCallerAccess(node)) {
if (!nsContentUtils::CanCallerAccess(node)) {
return NS_ERROR_DOM_SECURITY_ERR;
}
@ -616,7 +616,7 @@ txMozillaXSLTProcessor::SetParameter(const nsAString & aNamespaceURI,
getter_AddRefs(node));
NS_ENSURE_SUCCESS(rv, rv);
if (!URIUtils::CanCallerAccess(node)) {
if (!nsContentUtils::CanCallerAccess(node)) {
return NS_ERROR_DOM_SECURITY_ERR;
}
}
@ -650,7 +650,7 @@ txMozillaXSLTProcessor::SetParameter(const nsAString & aNamespaceURI,
for (i = 0; i < length; ++i) {
nodeList->Item(i, getter_AddRefs(node));
if (!URIUtils::CanCallerAccess(node)) {
if (!nsContentUtils::CanCallerAccess(node)) {
return NS_ERROR_DOM_SECURITY_ERR;
}
}
@ -694,7 +694,7 @@ txMozillaXSLTProcessor::SetParameter(const nsAString & aNamespaceURI,
nsCOMPtr<nsIDOMNode> node = do_QueryInterface(supports);
if (node) {
rv = URIUtils::CanCallerAccess(node) ? NS_OK :
rv = nsContentUtils::CanCallerAccess(node) ? NS_OK :
NS_ERROR_DOM_SECURITY_ERR;
}
else {
@ -726,7 +726,8 @@ txMozillaXSLTProcessor::SetParameter(const nsAString & aNamespaceURI,
}
PRInt32 nsId = kNameSpaceID_Unknown;
nsresult rv = gTxNameSpaceManager->RegisterNameSpace(aNamespaceURI, nsId);
nsresult rv = nsContentUtils::NameSpaceManager()->
RegisterNameSpace(aNamespaceURI, nsId);
NS_ENSURE_SUCCESS(rv, rv);
nsCOMPtr<nsIAtom> localName = do_GetAtom(aLocalName);
txExpandedName varName(nsId, localName);
@ -749,7 +750,8 @@ txMozillaXSLTProcessor::GetParameter(const nsAString& aNamespaceURI,
nsIVariant **aResult)
{
PRInt32 nsId = kNameSpaceID_Unknown;
nsresult rv = gTxNameSpaceManager->RegisterNameSpace(aNamespaceURI, nsId);
nsresult rv = nsContentUtils::NameSpaceManager()->
RegisterNameSpace(aNamespaceURI, nsId);
NS_ENSURE_SUCCESS(rv, rv);
nsCOMPtr<nsIAtom> localName = do_GetAtom(aLocalName);
txExpandedName varName(nsId, localName);
@ -766,7 +768,8 @@ txMozillaXSLTProcessor::RemoveParameter(const nsAString& aNamespaceURI,
const nsAString& aLocalName)
{
PRInt32 nsId = kNameSpaceID_Unknown;
nsresult rv = gTxNameSpaceManager->RegisterNameSpace(aNamespaceURI, nsId);
nsresult rv = nsContentUtils::NameSpaceManager()->
RegisterNameSpace(aNamespaceURI, nsId);
NS_ENSURE_SUCCESS(rv, rv);
nsCOMPtr<nsIAtom> localName = do_GetAtom(aLocalName);
txExpandedName varName(nsId, localName);

View File

@ -39,7 +39,7 @@
#ifndef TRANSFRMX_TXMOZILLAXSLTPROCESSOR_H
#define TRANSFRMX_TXMOZILLAXSLTPROCESSOR_H
#include "ExprResult.h"
#include "txExprResult.h"
#include "nsIDocumentTransformer.h"
#include "nsIVariant.h"
#include "nsIXSLTProcessor.h"

View File

@ -42,8 +42,8 @@
#include "txXPathResultComparator.h"
#include "txAtoms.h"
#include "txNodeSetContext.h"
#include "ExprResult.h"
#include "Expr.h"
#include "txExprResult.h"
#include "txExpr.h"
#include "txStringUtils.h"
#include "prmem.h"
#include "nsQuickSort.h"

View File

@ -41,7 +41,7 @@
#define TRANSFRMX_NODESORTER_H
#include "txCore.h"
#include "List.h"
#include "txList.h"
class Expr;
class txExecutionState;

View File

@ -37,7 +37,7 @@
* ***** END LICENSE BLOCK ***** */
#include "txOutputFormat.h"
#include "XMLUtils.h"
#include "txXMLUtils.h"
txOutputFormat::txOutputFormat() : mMethod(eMethodNotSet),
mOmitXMLDeclaration(eNotSet),

View File

@ -39,7 +39,7 @@
#ifndef TRANSFRMX_OUTPUTFORMAT_H
#define TRANSFRMX_OUTPUTFORMAT_H
#include "List.h"
#include "txList.h"
#include "nsString.h"
enum txOutputMethod {

View File

@ -37,7 +37,7 @@
* ***** END LICENSE BLOCK ***** */
#include "txPatternParser.h"
#include "ExprLexer.h"
#include "txExprLexer.h"
#include "txAtoms.h"
#include "txError.h"
#include "txStringUtils.h"

View File

@ -40,7 +40,7 @@
#define TX_PATTERNPARSER_H
#include "txXSLTPatterns.h"
#include "ExprParser.h"
#include "txExprParser.h"
class txPatternParser : public txExprParser
{

View File

@ -41,7 +41,7 @@
#define txRtfHandler_h___
#include "txBufferingHandler.h"
#include "ExprResult.h"
#include "txExprResult.h"
class txResultTreeFragment : public txAExprResult
{

View File

@ -37,7 +37,7 @@
* ***** END LICENSE BLOCK ***** */
#include "txStandaloneStylesheetCompiler.h"
#include "TxLog.h"
#include "txLog.h"
#include "txStylesheetCompiler.h"
#include "txURIUtils.h"
#include "expat_config.h"

View File

@ -63,9 +63,9 @@ public:
virtual ~txStandaloneHandlerFactory()
{
};
}
TX_DECL_TXAOUTPUTHANDLERFACTORY;
TX_DECL_TXAOUTPUTHANDLERFACTORY
private:
txExecutionState* mEs;

View File

@ -42,7 +42,7 @@
#include "txStylesheet.h"
#include "txXSLTProcessor.h"
#include "ErrorObserver.h"
#include "txErrorObserver.h"
#ifndef __BORLANDC__
#include <iostream.h>

View File

@ -37,12 +37,12 @@
* ***** END LICENSE BLOCK ***** */
#include "txStylesheet.h"
#include "Expr.h"
#include "txExpr.h"
#include "txXSLTPatterns.h"
#include "txToplevelItems.h"
#include "txInstructions.h"
#include "XSLTFunctions.h"
#include "TxLog.h"
#include "txXSLTFunctions.h"
#include "txLog.h"
#include "txKey.h"
txStylesheet::txStylesheet()

Some files were not shown because too many files have changed in this diff Show More