2002-06-20 17:25:48 +04:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
|
|
|
/* ***** BEGIN LICENSE BLOCK *****
|
|
|
|
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
|
|
|
*
|
|
|
|
* 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 the TransforMiiX XSLT processor.
|
|
|
|
*
|
|
|
|
* The Initial Developer of the Original Code is
|
|
|
|
* Netscape Communications Corporation.
|
|
|
|
* Portions created by the Initial Developer are Copyright (C) 2001
|
|
|
|
* the Initial Developer. All Rights Reserved.
|
|
|
|
*
|
|
|
|
* Contributor(s):
|
|
|
|
* Peter Van der Beken <peterv@netscape.com>
|
|
|
|
*
|
|
|
|
* Alternatively, the contents of this file may be used under the terms of
|
|
|
|
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
|
|
|
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
|
|
|
* in which case the provisions of the GPL or the LGPL are applicable instead
|
|
|
|
* of those above. If you wish to allow use of your version of this file only
|
|
|
|
* under the terms of either the GPL or the LGPL, and not to allow others to
|
|
|
|
* use your version of this file under the terms of the MPL, indicate your
|
|
|
|
* decision by deleting the provisions above and replace them with the notice
|
|
|
|
* and other provisions required by the GPL or the LGPL. If you do not delete
|
|
|
|
* the provisions above, a recipient may use your version of this file under
|
|
|
|
* the terms of any one of the MPL, the GPL or the LGPL.
|
|
|
|
*
|
|
|
|
* ***** END LICENSE BLOCK ***** */
|
|
|
|
|
|
|
|
#include "txUnknownHandler.h"
|
2002-06-20 18:10:48 +04:00
|
|
|
#include <string.h>
|
Landing XSLT branch. Tracking bug is 155578, fixes bugs 46633, 54659, 73492, 70369, 85408, 90157, 130161, 109918, 150916 and 170097
* New scriptable interfaces to XSLT
* Make HTML-output create real html
* cleanup the XSLTProcessor class
Patch by sicking, pike and peterv
r=sicking/pike, sr=peterv, a=asa
2002-10-22 01:35:23 +04:00
|
|
|
#include "ProcessorState.h"
|
|
|
|
|
|
|
|
#ifndef TX_EXE
|
|
|
|
NS_IMPL_ISUPPORTS1(txUnknownHandler, txIOutputXMLEventHandler);
|
|
|
|
#endif
|
2002-06-20 17:25:48 +04:00
|
|
|
|
|
|
|
PRUint32 txUnknownHandler::kReasonableTransactions = 8;
|
|
|
|
|
Landing XSLT branch. Tracking bug is 155578, fixes bugs 46633, 54659, 73492, 70369, 85408, 90157, 130161, 109918, 150916 and 170097
* New scriptable interfaces to XSLT
* Make HTML-output create real html
* cleanup the XSLTProcessor class
Patch by sicking, pike and peterv
r=sicking/pike, sr=peterv, a=asa
2002-10-22 01:35:23 +04:00
|
|
|
txUnknownHandler::txUnknownHandler(ProcessorState* aPs)
|
|
|
|
: mTotal(0), mMax(kReasonableTransactions),
|
|
|
|
mPs(aPs)
|
2002-06-20 17:25:48 +04:00
|
|
|
{
|
|
|
|
mArray = new txOutputTransaction*[kReasonableTransactions];
|
|
|
|
}
|
|
|
|
|
|
|
|
txUnknownHandler::~txUnknownHandler()
|
|
|
|
{
|
|
|
|
PRUint32 counter;
|
|
|
|
for (counter = 0; counter < mTotal; ++counter) {
|
|
|
|
delete mArray[counter];
|
|
|
|
}
|
|
|
|
delete [] mArray;
|
|
|
|
}
|
|
|
|
|
|
|
|
void txUnknownHandler::attribute(const String& aName,
|
|
|
|
const PRInt32 aNsID,
|
|
|
|
const String& aValue)
|
|
|
|
{
|
Landing XSLT branch. Tracking bug is 155578, fixes bugs 46633, 54659, 73492, 70369, 85408, 90157, 130161, 109918, 150916 and 170097
* New scriptable interfaces to XSLT
* Make HTML-output create real html
* cleanup the XSLTProcessor class
Patch by sicking, pike and peterv
r=sicking/pike, sr=peterv, a=asa
2002-10-22 01:35:23 +04:00
|
|
|
// If this is called then the stylesheet is trying to add an attribute
|
|
|
|
// without adding an element first. So we'll just ignore it.
|
|
|
|
// XXX ErrorReport: Signal this?
|
2002-06-20 17:25:48 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
void txUnknownHandler::characters(const String& aData)
|
|
|
|
{
|
|
|
|
txOneStringTransaction* transaction =
|
|
|
|
new txOneStringTransaction(txOutputTransaction::eCharacterTransaction,
|
|
|
|
aData);
|
|
|
|
if (!transaction) {
|
Landing XSLT branch. Tracking bug is 155578, fixes bugs 46633, 54659, 73492, 70369, 85408, 90157, 130161, 109918, 150916 and 170097
* New scriptable interfaces to XSLT
* Make HTML-output create real html
* cleanup the XSLTProcessor class
Patch by sicking, pike and peterv
r=sicking/pike, sr=peterv, a=asa
2002-10-22 01:35:23 +04:00
|
|
|
NS_ASSERTION(0, "Out of memory!");
|
2002-06-20 17:25:48 +04:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
addTransaction(transaction);
|
|
|
|
}
|
|
|
|
|
|
|
|
void txUnknownHandler::charactersNoOutputEscaping(const String& aData)
|
|
|
|
{
|
|
|
|
txOneStringTransaction* transaction =
|
|
|
|
new txOneStringTransaction(txOutputTransaction::eCharacterNoOETransaction,
|
|
|
|
aData);
|
|
|
|
if (!transaction) {
|
Landing XSLT branch. Tracking bug is 155578, fixes bugs 46633, 54659, 73492, 70369, 85408, 90157, 130161, 109918, 150916 and 170097
* New scriptable interfaces to XSLT
* Make HTML-output create real html
* cleanup the XSLTProcessor class
Patch by sicking, pike and peterv
r=sicking/pike, sr=peterv, a=asa
2002-10-22 01:35:23 +04:00
|
|
|
NS_ASSERTION(0, "Out of memory!");
|
2002-06-20 17:25:48 +04:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
addTransaction(transaction);
|
|
|
|
}
|
|
|
|
|
|
|
|
void txUnknownHandler::comment(const String& aData)
|
|
|
|
{
|
|
|
|
txOneStringTransaction* transaction =
|
|
|
|
new txOneStringTransaction(txOutputTransaction::eCommentTransaction,
|
|
|
|
aData);
|
|
|
|
if (!transaction) {
|
Landing XSLT branch. Tracking bug is 155578, fixes bugs 46633, 54659, 73492, 70369, 85408, 90157, 130161, 109918, 150916 and 170097
* New scriptable interfaces to XSLT
* Make HTML-output create real html
* cleanup the XSLTProcessor class
Patch by sicking, pike and peterv
r=sicking/pike, sr=peterv, a=asa
2002-10-22 01:35:23 +04:00
|
|
|
NS_ASSERTION(0, "Out of memory!");
|
2002-06-20 17:25:48 +04:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
addTransaction(transaction);
|
|
|
|
}
|
|
|
|
|
|
|
|
void txUnknownHandler::endDocument()
|
|
|
|
{
|
Landing XSLT branch. Tracking bug is 155578, fixes bugs 46633, 54659, 73492, 70369, 85408, 90157, 130161, 109918, 150916 and 170097
* New scriptable interfaces to XSLT
* Make HTML-output create real html
* cleanup the XSLTProcessor class
Patch by sicking, pike and peterv
r=sicking/pike, sr=peterv, a=asa
2002-10-22 01:35:23 +04:00
|
|
|
// This is an unusual case, no output method has been set and we
|
|
|
|
// didn't create a document element. Switching to XML output mode
|
|
|
|
// anyway.
|
|
|
|
|
|
|
|
#ifndef TX_EXE
|
|
|
|
// Make sure that we don't get deleted while this function is executed and
|
|
|
|
// we set a new outputhandler
|
|
|
|
nsCOMPtr<txIOutputXMLEventHandler> kungFuDeathGrip(this);
|
|
|
|
#endif
|
|
|
|
nsresult rv = createHandlerAndFlush(eXMLOutput, String(),
|
|
|
|
kNameSpaceID_None);
|
|
|
|
if (NS_FAILED(rv))
|
2002-06-20 17:25:48 +04:00
|
|
|
return;
|
Landing XSLT branch. Tracking bug is 155578, fixes bugs 46633, 54659, 73492, 70369, 85408, 90157, 130161, 109918, 150916 and 170097
* New scriptable interfaces to XSLT
* Make HTML-output create real html
* cleanup the XSLTProcessor class
Patch by sicking, pike and peterv
r=sicking/pike, sr=peterv, a=asa
2002-10-22 01:35:23 +04:00
|
|
|
|
|
|
|
mPs->mResultHandler->endDocument();
|
|
|
|
|
|
|
|
// in module the outputhandler is refcounted
|
|
|
|
#ifdef TX_EXE
|
|
|
|
delete this;
|
|
|
|
#endif
|
2002-06-20 17:25:48 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
void txUnknownHandler::endElement(const String& aName,
|
|
|
|
const PRInt32 aNsID)
|
|
|
|
{
|
Landing XSLT branch. Tracking bug is 155578, fixes bugs 46633, 54659, 73492, 70369, 85408, 90157, 130161, 109918, 150916 and 170097
* New scriptable interfaces to XSLT
* Make HTML-output create real html
* cleanup the XSLTProcessor class
Patch by sicking, pike and peterv
r=sicking/pike, sr=peterv, a=asa
2002-10-22 01:35:23 +04:00
|
|
|
NS_ASSERTION(0, "This shouldn't be called");
|
2002-06-20 17:25:48 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
void txUnknownHandler::processingInstruction(const String& aTarget,
|
|
|
|
const String& aData)
|
|
|
|
{
|
|
|
|
txTwoStringTransaction* transaction =
|
|
|
|
new txTwoStringTransaction(txOutputTransaction::ePITransaction,
|
|
|
|
aTarget, aData);
|
|
|
|
if (!transaction) {
|
Landing XSLT branch. Tracking bug is 155578, fixes bugs 46633, 54659, 73492, 70369, 85408, 90157, 130161, 109918, 150916 and 170097
* New scriptable interfaces to XSLT
* Make HTML-output create real html
* cleanup the XSLTProcessor class
Patch by sicking, pike and peterv
r=sicking/pike, sr=peterv, a=asa
2002-10-22 01:35:23 +04:00
|
|
|
NS_ASSERTION(0, "Out of memory!");
|
2002-06-20 17:25:48 +04:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
addTransaction(transaction);
|
|
|
|
}
|
|
|
|
|
|
|
|
void txUnknownHandler::startDocument()
|
|
|
|
{
|
|
|
|
txOutputTransaction* transaction =
|
|
|
|
new txOutputTransaction(txOutputTransaction::eStartDocumentTransaction);
|
|
|
|
if (!transaction) {
|
Landing XSLT branch. Tracking bug is 155578, fixes bugs 46633, 54659, 73492, 70369, 85408, 90157, 130161, 109918, 150916 and 170097
* New scriptable interfaces to XSLT
* Make HTML-output create real html
* cleanup the XSLTProcessor class
Patch by sicking, pike and peterv
r=sicking/pike, sr=peterv, a=asa
2002-10-22 01:35:23 +04:00
|
|
|
NS_ASSERTION(0, "Out of memory!");
|
2002-06-20 17:25:48 +04:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
addTransaction(transaction);
|
|
|
|
}
|
|
|
|
|
|
|
|
void txUnknownHandler::startElement(const String& aName,
|
|
|
|
const PRInt32 aNsID)
|
|
|
|
{
|
Landing XSLT branch. Tracking bug is 155578, fixes bugs 46633, 54659, 73492, 70369, 85408, 90157, 130161, 109918, 150916 and 170097
* New scriptable interfaces to XSLT
* Make HTML-output create real html
* cleanup the XSLTProcessor class
Patch by sicking, pike and peterv
r=sicking/pike, sr=peterv, a=asa
2002-10-22 01:35:23 +04:00
|
|
|
#ifndef TX_EXE
|
|
|
|
// Make sure that we don't get deleted while this function is executed and
|
|
|
|
// we set a new outputhandler
|
|
|
|
nsCOMPtr<txIOutputXMLEventHandler> kungFuDeathGrip(this);
|
|
|
|
#endif
|
2002-06-20 17:25:48 +04:00
|
|
|
|
Landing XSLT branch. Tracking bug is 155578, fixes bugs 46633, 54659, 73492, 70369, 85408, 90157, 130161, 109918, 150916 and 170097
* New scriptable interfaces to XSLT
* Make HTML-output create real html
* cleanup the XSLTProcessor class
Patch by sicking, pike and peterv
r=sicking/pike, sr=peterv, a=asa
2002-10-22 01:35:23 +04:00
|
|
|
nsresult rv = NS_OK;
|
|
|
|
txOutputFormat* format = mPs->getOutputFormat();
|
|
|
|
if (format->mMethod != eMethodNotSet) {
|
|
|
|
rv = createHandlerAndFlush(format->mMethod, aName, aNsID);
|
2002-06-20 17:25:48 +04:00
|
|
|
}
|
Landing XSLT branch. Tracking bug is 155578, fixes bugs 46633, 54659, 73492, 70369, 85408, 90157, 130161, 109918, 150916 and 170097
* New scriptable interfaces to XSLT
* Make HTML-output create real html
* cleanup the XSLTProcessor class
Patch by sicking, pike and peterv
r=sicking/pike, sr=peterv, a=asa
2002-10-22 01:35:23 +04:00
|
|
|
else if (aNsID == kNameSpaceID_None &&
|
2002-12-20 18:18:35 +03:00
|
|
|
aName.isEqualIgnoreCase(String(NS_LITERAL_STRING("html")))) {
|
Landing XSLT branch. Tracking bug is 155578, fixes bugs 46633, 54659, 73492, 70369, 85408, 90157, 130161, 109918, 150916 and 170097
* New scriptable interfaces to XSLT
* Make HTML-output create real html
* cleanup the XSLTProcessor class
Patch by sicking, pike and peterv
r=sicking/pike, sr=peterv, a=asa
2002-10-22 01:35:23 +04:00
|
|
|
rv = createHandlerAndFlush(eHTMLOutput, aName, aNsID);
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
rv = createHandlerAndFlush(eXMLOutput, aName, aNsID);
|
|
|
|
}
|
|
|
|
if (NS_FAILED(rv))
|
|
|
|
return;
|
|
|
|
|
|
|
|
mPs->mResultHandler->startElement(aName, aNsID);
|
|
|
|
|
|
|
|
// in module the outputhandler is refcounted
|
|
|
|
#ifdef TX_EXE
|
|
|
|
delete this;
|
|
|
|
#endif
|
2002-06-20 17:25:48 +04:00
|
|
|
}
|
|
|
|
|
Landing XSLT branch. Tracking bug is 155578, fixes bugs 46633, 54659, 73492, 70369, 85408, 90157, 130161, 109918, 150916 and 170097
* New scriptable interfaces to XSLT
* Make HTML-output create real html
* cleanup the XSLTProcessor class
Patch by sicking, pike and peterv
r=sicking/pike, sr=peterv, a=asa
2002-10-22 01:35:23 +04:00
|
|
|
#ifndef TX_EXE
|
|
|
|
void txUnknownHandler::getOutputDocument(nsIDOMDocument** aDocument)
|
2002-06-20 17:25:48 +04:00
|
|
|
{
|
Landing XSLT branch. Tracking bug is 155578, fixes bugs 46633, 54659, 73492, 70369, 85408, 90157, 130161, 109918, 150916 and 170097
* New scriptable interfaces to XSLT
* Make HTML-output create real html
* cleanup the XSLTProcessor class
Patch by sicking, pike and peterv
r=sicking/pike, sr=peterv, a=asa
2002-10-22 01:35:23 +04:00
|
|
|
*aDocument = nsnull;
|
2002-06-20 17:25:48 +04:00
|
|
|
}
|
Landing XSLT branch. Tracking bug is 155578, fixes bugs 46633, 54659, 73492, 70369, 85408, 90157, 130161, 109918, 150916 and 170097
* New scriptable interfaces to XSLT
* Make HTML-output create real html
* cleanup the XSLTProcessor class
Patch by sicking, pike and peterv
r=sicking/pike, sr=peterv, a=asa
2002-10-22 01:35:23 +04:00
|
|
|
#endif
|
2002-06-20 17:25:48 +04:00
|
|
|
|
Landing XSLT branch. Tracking bug is 155578, fixes bugs 46633, 54659, 73492, 70369, 85408, 90157, 130161, 109918, 150916 and 170097
* New scriptable interfaces to XSLT
* Make HTML-output create real html
* cleanup the XSLTProcessor class
Patch by sicking, pike and peterv
r=sicking/pike, sr=peterv, a=asa
2002-10-22 01:35:23 +04:00
|
|
|
nsresult txUnknownHandler::createHandlerAndFlush(txOutputMethod aMethod,
|
|
|
|
const String& aName,
|
|
|
|
const PRInt32 aNsID)
|
2002-06-20 17:25:48 +04:00
|
|
|
{
|
Landing XSLT branch. Tracking bug is 155578, fixes bugs 46633, 54659, 73492, 70369, 85408, 90157, 130161, 109918, 150916 and 170097
* New scriptable interfaces to XSLT
* Make HTML-output create real html
* cleanup the XSLTProcessor class
Patch by sicking, pike and peterv
r=sicking/pike, sr=peterv, a=asa
2002-10-22 01:35:23 +04:00
|
|
|
nsresult rv = NS_OK;
|
|
|
|
txOutputFormat* format = mPs->getOutputFormat();
|
|
|
|
format->mMethod = aMethod;
|
|
|
|
|
|
|
|
txIOutputXMLEventHandler* handler = 0;
|
|
|
|
rv = mPs->mOutputHandlerFactory->createHandlerWith(format, aName, aNsID,
|
|
|
|
&handler);
|
|
|
|
NS_ENSURE_SUCCESS(rv, rv);
|
|
|
|
|
|
|
|
mPs->mOutputHandler = handler;
|
|
|
|
mPs->mResultHandler = handler;
|
|
|
|
|
|
|
|
MBool hasDOE = handler->hasDisableOutputEscaping();
|
|
|
|
|
2002-06-20 17:25:48 +04:00
|
|
|
PRUint32 counter;
|
|
|
|
for (counter = 0; counter < mTotal; ++counter) {
|
|
|
|
switch (mArray[counter]->mType) {
|
|
|
|
case txOutputTransaction::eCharacterTransaction:
|
|
|
|
{
|
|
|
|
txOneStringTransaction* transaction = (txOneStringTransaction*)mArray[counter];
|
Landing XSLT branch. Tracking bug is 155578, fixes bugs 46633, 54659, 73492, 70369, 85408, 90157, 130161, 109918, 150916 and 170097
* New scriptable interfaces to XSLT
* Make HTML-output create real html
* cleanup the XSLTProcessor class
Patch by sicking, pike and peterv
r=sicking/pike, sr=peterv, a=asa
2002-10-22 01:35:23 +04:00
|
|
|
handler->characters(transaction->mString);
|
2002-06-20 17:25:48 +04:00
|
|
|
delete transaction;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
case txOutputTransaction::eCharacterNoOETransaction:
|
|
|
|
{
|
|
|
|
txOneStringTransaction* transaction = (txOneStringTransaction*)mArray[counter];
|
Landing XSLT branch. Tracking bug is 155578, fixes bugs 46633, 54659, 73492, 70369, 85408, 90157, 130161, 109918, 150916 and 170097
* New scriptable interfaces to XSLT
* Make HTML-output create real html
* cleanup the XSLTProcessor class
Patch by sicking, pike and peterv
r=sicking/pike, sr=peterv, a=asa
2002-10-22 01:35:23 +04:00
|
|
|
if (hasDOE) {
|
|
|
|
handler->charactersNoOutputEscaping(transaction->mString);
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
handler->characters(transaction->mString);
|
|
|
|
}
|
2002-06-20 17:25:48 +04:00
|
|
|
delete transaction;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
case txOutputTransaction::eCommentTransaction:
|
|
|
|
{
|
|
|
|
txOneStringTransaction* transaction = (txOneStringTransaction*)mArray[counter];
|
Landing XSLT branch. Tracking bug is 155578, fixes bugs 46633, 54659, 73492, 70369, 85408, 90157, 130161, 109918, 150916 and 170097
* New scriptable interfaces to XSLT
* Make HTML-output create real html
* cleanup the XSLTProcessor class
Patch by sicking, pike and peterv
r=sicking/pike, sr=peterv, a=asa
2002-10-22 01:35:23 +04:00
|
|
|
handler->comment(transaction->mString);
|
2002-06-20 17:25:48 +04:00
|
|
|
delete transaction;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
case txOutputTransaction::ePITransaction:
|
|
|
|
{
|
|
|
|
txTwoStringTransaction* transaction = (txTwoStringTransaction*)mArray[counter];
|
Landing XSLT branch. Tracking bug is 155578, fixes bugs 46633, 54659, 73492, 70369, 85408, 90157, 130161, 109918, 150916 and 170097
* New scriptable interfaces to XSLT
* Make HTML-output create real html
* cleanup the XSLTProcessor class
Patch by sicking, pike and peterv
r=sicking/pike, sr=peterv, a=asa
2002-10-22 01:35:23 +04:00
|
|
|
handler->processingInstruction(transaction->mStringOne,
|
2002-06-20 17:25:48 +04:00
|
|
|
transaction->mStringTwo);
|
|
|
|
delete transaction;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
case txOutputTransaction::eStartDocumentTransaction:
|
|
|
|
{
|
Landing XSLT branch. Tracking bug is 155578, fixes bugs 46633, 54659, 73492, 70369, 85408, 90157, 130161, 109918, 150916 and 170097
* New scriptable interfaces to XSLT
* Make HTML-output create real html
* cleanup the XSLTProcessor class
Patch by sicking, pike and peterv
r=sicking/pike, sr=peterv, a=asa
2002-10-22 01:35:23 +04:00
|
|
|
handler->startDocument();
|
2002-06-20 17:25:48 +04:00
|
|
|
delete mArray[counter];
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
mTotal = 0;
|
Landing XSLT branch. Tracking bug is 155578, fixes bugs 46633, 54659, 73492, 70369, 85408, 90157, 130161, 109918, 150916 and 170097
* New scriptable interfaces to XSLT
* Make HTML-output create real html
* cleanup the XSLTProcessor class
Patch by sicking, pike and peterv
r=sicking/pike, sr=peterv, a=asa
2002-10-22 01:35:23 +04:00
|
|
|
|
|
|
|
return NS_OK;
|
2002-06-20 17:25:48 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
void txUnknownHandler::addTransaction(txOutputTransaction* aTransaction)
|
|
|
|
{
|
|
|
|
if (mTotal == mMax) {
|
|
|
|
PRUint32 newMax = mMax * 2;
|
|
|
|
txOutputTransaction** newArray = new txOutputTransaction*[newMax];
|
|
|
|
if (!newArray) {
|
Landing XSLT branch. Tracking bug is 155578, fixes bugs 46633, 54659, 73492, 70369, 85408, 90157, 130161, 109918, 150916 and 170097
* New scriptable interfaces to XSLT
* Make HTML-output create real html
* cleanup the XSLTProcessor class
Patch by sicking, pike and peterv
r=sicking/pike, sr=peterv, a=asa
2002-10-22 01:35:23 +04:00
|
|
|
NS_ASSERTION(0, "Out of memory!");
|
2002-06-20 17:25:48 +04:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
mMax = newMax;
|
|
|
|
memcpy(newArray, mArray, mTotal * sizeof(txOutputTransaction*));
|
|
|
|
delete [] mArray;
|
|
|
|
mArray = newArray;
|
|
|
|
}
|
|
|
|
mArray[mTotal++] = aTransaction;
|
|
|
|
}
|