2000-04-07 02:39:54 +04:00
|
|
|
/*
|
|
|
|
* 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.
|
|
|
|
*
|
2000-04-07 14:35:05 +04:00
|
|
|
* Portions created by Peter Van der Beken are Copyright (C) 2000
|
|
|
|
* Peter Van der Beken. All Rights Reserved.
|
|
|
|
*
|
2000-04-07 12:09:25 +04:00
|
|
|
* Contributor(s):
|
2000-04-07 02:39:54 +04:00
|
|
|
* Peter Van der Beken, peter.vanderbeken@pandora.be
|
|
|
|
* -- original author.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "nsIGenericFactory.h"
|
2001-04-03 16:33:03 +04:00
|
|
|
#include "nsICategoryManager.h"
|
2001-01-12 23:06:48 +03:00
|
|
|
#include "nsIScriptNameSpaceManager.h"
|
|
|
|
#include "prprf.h"
|
2000-04-07 02:39:54 +04:00
|
|
|
|
|
|
|
#include "XSLTProcessor.h"
|
2001-01-12 23:06:48 +03:00
|
|
|
#include "XPathProcessor.h"
|
|
|
|
#include "nsSyncLoader.h"
|
Landing the XPCDOM_20010329_BRANCH branch, changes mostly done by jband@netscape.com and jst@netscape.com, also some changes done by shaver@mozilla.org, peterv@netscape.com and markh@activestate.com. r= and sr= by vidur@netscape.com, jband@netscape.com, jst@netscpae.com, danm@netscape.com, hyatt@netscape.com, shaver@mozilla.org, dbradley@netscape.com, rpotts@netscape.com.
2001-05-08 21:42:36 +04:00
|
|
|
#include "nsIScriptNameSpaceManager.h"
|
|
|
|
#include "nsXPIDLString.h"
|
2000-04-07 02:39:54 +04:00
|
|
|
|
|
|
|
// Factory Constructor
|
|
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR(XSLTProcessor)
|
2001-01-12 23:06:48 +03:00
|
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR(XPathProcessor)
|
|
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR(nsSyncLoader)
|
|
|
|
|
Landing the XPCDOM_20010329_BRANCH branch, changes mostly done by jband@netscape.com and jst@netscape.com, also some changes done by shaver@mozilla.org, peterv@netscape.com and markh@activestate.com. r= and sr= by vidur@netscape.com, jband@netscape.com, jst@netscpae.com, danm@netscape.com, hyatt@netscape.com, shaver@mozilla.org, dbradley@netscape.com, rpotts@netscape.com.
2001-05-08 21:42:36 +04:00
|
|
|
static NS_METHOD
|
|
|
|
RegisterTransformiix(nsIComponentManager *aCompMgr,
|
|
|
|
nsIFile *aPath,
|
|
|
|
const char *registryLocation,
|
|
|
|
const char *componentType,
|
|
|
|
const nsModuleComponentInfo *info)
|
2001-01-12 23:06:48 +03:00
|
|
|
{
|
Landing the XPCDOM_20010329_BRANCH branch, changes mostly done by jband@netscape.com and jst@netscape.com, also some changes done by shaver@mozilla.org, peterv@netscape.com and markh@activestate.com. r= and sr= by vidur@netscape.com, jband@netscape.com, jst@netscpae.com, danm@netscape.com, hyatt@netscape.com, shaver@mozilla.org, dbradley@netscape.com, rpotts@netscape.com.
2001-05-08 21:42:36 +04:00
|
|
|
nsresult rv = NS_OK;
|
2001-01-12 23:06:48 +03:00
|
|
|
|
Landing the XPCDOM_20010329_BRANCH branch, changes mostly done by jband@netscape.com and jst@netscape.com, also some changes done by shaver@mozilla.org, peterv@netscape.com and markh@activestate.com. r= and sr= by vidur@netscape.com, jband@netscape.com, jst@netscpae.com, danm@netscape.com, hyatt@netscape.com, shaver@mozilla.org, dbradley@netscape.com, rpotts@netscape.com.
2001-05-08 21:42:36 +04:00
|
|
|
nsCOMPtr<nsICategoryManager> catman =
|
|
|
|
do_GetService(NS_CATEGORYMANAGER_CONTRACTID, &rv);
|
2001-01-12 23:06:48 +03:00
|
|
|
|
Landing the XPCDOM_20010329_BRANCH branch, changes mostly done by jband@netscape.com and jst@netscape.com, also some changes done by shaver@mozilla.org, peterv@netscape.com and markh@activestate.com. r= and sr= by vidur@netscape.com, jband@netscape.com, jst@netscpae.com, danm@netscape.com, hyatt@netscape.com, shaver@mozilla.org, dbradley@netscape.com, rpotts@netscape.com.
2001-05-08 21:42:36 +04:00
|
|
|
if (NS_FAILED(rv))
|
|
|
|
return rv;
|
2001-01-12 23:06:48 +03:00
|
|
|
|
Landing the XPCDOM_20010329_BRANCH branch, changes mostly done by jband@netscape.com and jst@netscape.com, also some changes done by shaver@mozilla.org, peterv@netscape.com and markh@activestate.com. r= and sr= by vidur@netscape.com, jband@netscape.com, jst@netscpae.com, danm@netscape.com, hyatt@netscape.com, shaver@mozilla.org, dbradley@netscape.com, rpotts@netscape.com.
2001-05-08 21:42:36 +04:00
|
|
|
nsXPIDLCString previous;
|
|
|
|
rv = catman->AddCategoryEntry(JAVASCRIPT_GLOBAL_CONSTRUCTOR_CATEGORY,
|
|
|
|
"XSLTProcessor",
|
|
|
|
TRANSFORMIIX_XSLT_PROCESSOR_CONTRACTID,
|
|
|
|
PR_TRUE, PR_TRUE, getter_Copies(previous));
|
|
|
|
NS_ENSURE_SUCCESS(rv, rv);
|
2001-01-12 23:06:48 +03:00
|
|
|
|
Landing the XPCDOM_20010329_BRANCH branch, changes mostly done by jband@netscape.com and jst@netscape.com, also some changes done by shaver@mozilla.org, peterv@netscape.com and markh@activestate.com. r= and sr= by vidur@netscape.com, jband@netscape.com, jst@netscpae.com, danm@netscape.com, hyatt@netscape.com, shaver@mozilla.org, dbradley@netscape.com, rpotts@netscape.com.
2001-05-08 21:42:36 +04:00
|
|
|
rv = catman->AddCategoryEntry(JAVASCRIPT_GLOBAL_CONSTRUCTOR_CATEGORY,
|
|
|
|
"XPathProcessor",
|
|
|
|
TRANSFORMIIX_XPATH_PROCESSOR_CONTRACTID,
|
|
|
|
PR_TRUE, PR_TRUE, getter_Copies(previous));
|
2001-01-12 23:06:48 +03:00
|
|
|
|
|
|
|
return rv;
|
|
|
|
}
|
2000-04-07 02:39:54 +04:00
|
|
|
|
|
|
|
// Component Table
|
|
|
|
static nsModuleComponentInfo components[] = {
|
|
|
|
{ "Transformiix XSLT Processor",
|
2000-04-07 14:35:05 +04:00
|
|
|
TRANSFORMIIX_XSLT_PROCESSOR_CID,
|
2000-09-14 03:57:52 +04:00
|
|
|
TRANSFORMIIX_XSLT_PROCESSOR_CONTRACTID,
|
Landing the XPCDOM_20010329_BRANCH branch, changes mostly done by jband@netscape.com and jst@netscape.com, also some changes done by shaver@mozilla.org, peterv@netscape.com and markh@activestate.com. r= and sr= by vidur@netscape.com, jband@netscape.com, jst@netscpae.com, danm@netscape.com, hyatt@netscape.com, shaver@mozilla.org, dbradley@netscape.com, rpotts@netscape.com.
2001-05-08 21:42:36 +04:00
|
|
|
XSLTProcessorConstructor,
|
|
|
|
RegisterTransformiix },
|
2001-01-12 23:06:48 +03:00
|
|
|
{ "Transformiix XPath Processor",
|
|
|
|
TRANSFORMIIX_XPATH_PROCESSOR_CID,
|
|
|
|
TRANSFORMIIX_XPATH_PROCESSOR_CONTRACTID,
|
|
|
|
XPathProcessorConstructor },
|
|
|
|
{ "Transformiix Synchronous Loader",
|
|
|
|
TRANSFORMIIX_SYNCLOADER_CID,
|
|
|
|
TRANSFORMIIX_SYNCLOADER_CONTRACTID,
|
|
|
|
nsSyncLoaderConstructor }
|
2000-04-07 02:39:54 +04:00
|
|
|
};
|
|
|
|
|
2001-05-05 09:33:37 +04:00
|
|
|
NS_IMPL_NSGETMODULE(TransformiixModule, components)
|