Bug 687326 - Kill txAtoms.h and s/txXPathAtoms|txXMLAtoms|txXSLTAtoms|txHTMLAtoms/nsGkAtoms/g; r=sicking
authorEd Morley <bmo@edmorley.co.uk>
Mon, 19 Sep 2011 21:07:17 +0100
changeset 78471 1d5cdab249a9e37a464dd4cbf4ac8a5301164cf3
parent 78470 40e482df5ab596f2a148853d2fbf89ab275064d2
child 78472 104fb6df714f1a9f45b01cde35530ac60b28651b
push id78
push userclegnitto@mozilla.com
push dateFri, 16 Dec 2011 17:32:24 +0000
treeherdermozilla-release@79d24e644fdd [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssicking
bugs687326
milestone9.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 687326 - Kill txAtoms.h and s/txXPathAtoms|txXMLAtoms|txXSLTAtoms|txHTMLAtoms/nsGkAtoms/g; r=sicking
content/xslt/src/base/txAtoms.h
content/xslt/src/base/txNamespaceMap.cpp
content/xslt/src/xml/txXMLUtils.cpp
content/xslt/src/xpath/txCoreFunctionCall.cpp
content/xslt/src/xpath/txExprLexer.cpp
content/xslt/src/xpath/txExprParser.cpp
content/xslt/src/xpath/txNameTest.cpp
content/xslt/src/xpath/txVariableRefExpr.cpp
content/xslt/src/xpath/txXPathOptimizer.cpp
content/xslt/src/xslt/txCurrentFunctionCall.cpp
content/xslt/src/xslt/txDocumentFunctionCall.cpp
content/xslt/src/xslt/txEXSLTFunctions.cpp
content/xslt/src/xslt/txFormatNumberFunctionCall.cpp
content/xslt/src/xslt/txGenerateIdFunctionCall.cpp
content/xslt/src/xslt/txInstructions.cpp
content/xslt/src/xslt/txKeyFunctionCall.cpp
content/xslt/src/xslt/txMozillaStylesheetCompiler.cpp
content/xslt/src/xslt/txMozillaXMLOutput.cpp
content/xslt/src/xslt/txNodeSorter.cpp
content/xslt/src/xslt/txPatternParser.cpp
content/xslt/src/xslt/txStylesheetCompileHandlers.cpp
content/xslt/src/xslt/txStylesheetCompiler.cpp
content/xslt/src/xslt/txUnknownHandler.cpp
content/xslt/src/xslt/txXSLTEnvironmentFunctionCall.cpp
content/xslt/src/xslt/txXSLTNumber.cpp
content/xslt/src/xslt/txXSLTProcessor.cpp
deleted file mode 100644
--- a/content/xslt/src/base/txAtoms.h
+++ /dev/null
@@ -1,48 +0,0 @@
-/* -*- 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 TransforMiiX XSLT processor code.
- *
- * 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@propagandism.org>
- *
- * 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 ***** */
-
-#ifndef TRANSFRMX_ATOMS_H
-#define TRANSFRMX_ATOMS_H
-
-#include "nsGkAtoms.h"
-typedef class nsGkAtoms txXPathAtoms;
-typedef class nsGkAtoms txXMLAtoms;
-typedef class nsGkAtoms txXSLTAtoms;
-typedef class nsGkAtoms txHTMLAtoms;
-
-#endif
--- a/content/xslt/src/base/txNamespaceMap.cpp
+++ b/content/xslt/src/base/txNamespaceMap.cpp
@@ -32,33 +32,33 @@
  * 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 "txNamespaceMap.h"
-#include "txAtoms.h"
+#include "nsGkAtoms.h"
 #include "txXPathNode.h"
 
 txNamespaceMap::txNamespaceMap()
 {
 }
 
 txNamespaceMap::txNamespaceMap(const txNamespaceMap& aOther)
     : mPrefixes(aOther.mPrefixes)
 {
     mNamespaces = aOther.mNamespaces; //bah! I want a copy-constructor!
 }
 
 nsresult
 txNamespaceMap::mapNamespace(nsIAtom* aPrefix, const nsAString& aNamespaceURI)
 {
-    nsIAtom* prefix = aPrefix == txXMLAtoms::_empty ? nsnull : aPrefix;
+    nsIAtom* prefix = aPrefix == nsGkAtoms::_empty ? nsnull : aPrefix;
 
     PRInt32 nsId;
     if (prefix && aNamespaceURI.IsEmpty()) {
         // Remove the mapping
         PRInt32 index = mPrefixes.IndexOf(prefix);
         if (index >= 0) {
             mPrefixes.RemoveObjectAt(index);
             mNamespaces.RemoveElementAt(index);
@@ -96,21 +96,21 @@ txNamespaceMap::mapNamespace(nsIAtom* aP
     }
 
     return NS_OK;
 }
 
 PRInt32
 txNamespaceMap::lookupNamespace(nsIAtom* aPrefix)
 {
-    if (aPrefix == txXMLAtoms::xml) {
+    if (aPrefix == nsGkAtoms::xml) {
         return kNameSpaceID_XML;
     }
 
-    nsIAtom* prefix = aPrefix == txXMLAtoms::_empty ? 0 : aPrefix;
+    nsIAtom* prefix = aPrefix == nsGkAtoms::_empty ? 0 : aPrefix;
 
     PRInt32 index = mPrefixes.IndexOf(prefix);
     if (index >= 0) {
         return mNamespaces.SafeElementAt(index, kNameSpaceID_Unknown);
     }
 
     if (!prefix) {
         return kNameSpaceID_None;
@@ -126,14 +126,14 @@ txNamespaceMap::lookupNamespace(const ns
 
     return lookupNamespace(prefix);
 }
 
 PRInt32
 txNamespaceMap::lookupNamespaceWithDefault(const nsAString& aPrefix)
 {
     nsCOMPtr<nsIAtom> prefix = do_GetAtom(aPrefix);
-    if (prefix != txXSLTAtoms::_poundDefault) {
+    if (prefix != nsGkAtoms::_poundDefault) {
         return lookupNamespace(prefix);
     }
 
     return lookupNamespace(nsnull);
 }
--- a/content/xslt/src/xml/txXMLUtils.cpp
+++ b/content/xslt/src/xml/txXMLUtils.cpp
@@ -39,17 +39,17 @@
 
 /*
  * XML utility classes
  */
 
 #include "txXMLUtils.h"
 #include "nsString.h"
 #include "nsReadableUtils.h"
-#include "txAtoms.h"
+#include "nsGkAtoms.h"
 #include "txStringUtils.h"
 #include "txNamespaceMap.h"
 #include "txXPathTreeWalker.h"
 
 nsresult
 txExpandedName::init(const nsAString& aQName, txNamespaceMap* aResolver,
                      MBool aUseDefault)
 {
@@ -230,20 +230,20 @@ void XMLUtils::normalizePIValue(nsAStrin
 }
 
 //static
 MBool XMLUtils::getXMLSpacePreserve(const txXPathNode& aNode)
 {
     nsAutoString value;
     txXPathTreeWalker walker(aNode);
     do {
-        if (walker.getAttr(txXMLAtoms::space, kNameSpaceID_XML, value)) {
-            if (TX_StringEqualsAtom(value, txXMLAtoms::preserve)) {
+        if (walker.getAttr(nsGkAtoms::space, kNameSpaceID_XML, value)) {
+            if (TX_StringEqualsAtom(value, nsGkAtoms::preserve)) {
                 return PR_TRUE;
             }
-            if (TX_StringEqualsAtom(value, txXMLAtoms::_default)) {
+            if (TX_StringEqualsAtom(value, nsGkAtoms::_default)) {
                 return PR_FALSE;
             }
         }
     } while (walker.moveToParent());
 
     return PR_FALSE;
 }
--- a/content/xslt/src/xpath/txCoreFunctionCall.cpp
+++ b/content/xslt/src/xpath/txCoreFunctionCall.cpp
@@ -34,17 +34,17 @@
  * 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 "txExpr.h"
 #include "nsAutoPtr.h"
 #include "txNodeSet.h"
-#include "txAtoms.h"
+#include "nsGkAtoms.h"
 #include "txIXPathContext.h"
 #include "nsWhitespaceTokenizer.h"
 #include "txXPathTreeWalker.h"
 #include <math.h>
 #include "txStringUtils.h"
 #include "txXMLUtils.h"
 
 struct txCoreFunctionDescriptor
@@ -54,46 +54,46 @@ struct txCoreFunctionDescriptor
     Expr::ResultType mReturnType;
     nsIAtom** mName;
 };
 
 // This must be ordered in the same order as txCoreFunctionCall::eType.
 // If you change one, change the other.
 static const txCoreFunctionDescriptor descriptTable[] =
 {
-    { 1, 1, Expr::NUMBER_RESULT,  &txXPathAtoms::count }, // COUNT
-    { 1, 1, Expr::NODESET_RESULT, &txXPathAtoms::id }, // ID
-    { 0, 0, Expr::NUMBER_RESULT,  &txXPathAtoms::last }, // LAST
-    { 0, 1, Expr::STRING_RESULT,  &txXPathAtoms::localName }, // LOCAL_NAME
-    { 0, 1, Expr::STRING_RESULT,  &txXPathAtoms::namespaceUri }, // NAMESPACE_URI
-    { 0, 1, Expr::STRING_RESULT,  &txXPathAtoms::name }, // NAME
-    { 0, 0, Expr::NUMBER_RESULT,  &txXPathAtoms::position }, // POSITION
+    { 1, 1, Expr::NUMBER_RESULT,  &nsGkAtoms::count }, // COUNT
+    { 1, 1, Expr::NODESET_RESULT, &nsGkAtoms::id }, // ID
+    { 0, 0, Expr::NUMBER_RESULT,  &nsGkAtoms::last }, // LAST
+    { 0, 1, Expr::STRING_RESULT,  &nsGkAtoms::localName }, // LOCAL_NAME
+    { 0, 1, Expr::STRING_RESULT,  &nsGkAtoms::namespaceUri }, // NAMESPACE_URI
+    { 0, 1, Expr::STRING_RESULT,  &nsGkAtoms::name }, // NAME
+    { 0, 0, Expr::NUMBER_RESULT,  &nsGkAtoms::position }, // POSITION
 
-    { 2, -1, Expr::STRING_RESULT, &txXPathAtoms::concat }, // CONCAT
-    { 2, 2, Expr::BOOLEAN_RESULT, &txXPathAtoms::contains }, // CONTAINS
-    { 0, 1, Expr::STRING_RESULT,  &txXPathAtoms::normalizeSpace }, // NORMALIZE_SPACE
-    { 2, 2, Expr::BOOLEAN_RESULT, &txXPathAtoms::startsWith }, // STARTS_WITH
-    { 0, 1, Expr::STRING_RESULT,  &txXPathAtoms::string }, // STRING
-    { 0, 1, Expr::NUMBER_RESULT,  &txXPathAtoms::stringLength }, // STRING_LENGTH
-    { 2, 3, Expr::STRING_RESULT,  &txXPathAtoms::substring }, // SUBSTRING
-    { 2, 2, Expr::STRING_RESULT,  &txXPathAtoms::substringAfter }, // SUBSTRING_AFTER
-    { 2, 2, Expr::STRING_RESULT,  &txXPathAtoms::substringBefore }, // SUBSTRING_BEFORE
-    { 3, 3, Expr::STRING_RESULT,  &txXPathAtoms::translate }, // TRANSLATE
+    { 2, -1, Expr::STRING_RESULT, &nsGkAtoms::concat }, // CONCAT
+    { 2, 2, Expr::BOOLEAN_RESULT, &nsGkAtoms::contains }, // CONTAINS
+    { 0, 1, Expr::STRING_RESULT,  &nsGkAtoms::normalizeSpace }, // NORMALIZE_SPACE
+    { 2, 2, Expr::BOOLEAN_RESULT, &nsGkAtoms::startsWith }, // STARTS_WITH
+    { 0, 1, Expr::STRING_RESULT,  &nsGkAtoms::string }, // STRING
+    { 0, 1, Expr::NUMBER_RESULT,  &nsGkAtoms::stringLength }, // STRING_LENGTH
+    { 2, 3, Expr::STRING_RESULT,  &nsGkAtoms::substring }, // SUBSTRING
+    { 2, 2, Expr::STRING_RESULT,  &nsGkAtoms::substringAfter }, // SUBSTRING_AFTER
+    { 2, 2, Expr::STRING_RESULT,  &nsGkAtoms::substringBefore }, // SUBSTRING_BEFORE
+    { 3, 3, Expr::STRING_RESULT,  &nsGkAtoms::translate }, // TRANSLATE
 
-    { 0, 1, Expr::NUMBER_RESULT,  &txXPathAtoms::number }, // NUMBER
-    { 1, 1, Expr::NUMBER_RESULT,  &txXPathAtoms::round }, // ROUND
-    { 1, 1, Expr::NUMBER_RESULT,  &txXPathAtoms::floor }, // FLOOR
-    { 1, 1, Expr::NUMBER_RESULT,  &txXPathAtoms::ceiling }, // CEILING
-    { 1, 1, Expr::NUMBER_RESULT,  &txXPathAtoms::sum }, // SUM
+    { 0, 1, Expr::NUMBER_RESULT,  &nsGkAtoms::number }, // NUMBER
+    { 1, 1, Expr::NUMBER_RESULT,  &nsGkAtoms::round }, // ROUND
+    { 1, 1, Expr::NUMBER_RESULT,  &nsGkAtoms::floor }, // FLOOR
+    { 1, 1, Expr::NUMBER_RESULT,  &nsGkAtoms::ceiling }, // CEILING
+    { 1, 1, Expr::NUMBER_RESULT,  &nsGkAtoms::sum }, // SUM
 
-    { 1, 1, Expr::BOOLEAN_RESULT, &txXPathAtoms::boolean }, // BOOLEAN
-    { 0, 0, Expr::BOOLEAN_RESULT, &txXPathAtoms::_false }, // _FALSE
-    { 1, 1, Expr::BOOLEAN_RESULT, &txXPathAtoms::lang }, // LANG
-    { 1, 1, Expr::BOOLEAN_RESULT, &txXPathAtoms::_not }, // _NOT
-    { 0, 0, Expr::BOOLEAN_RESULT, &txXPathAtoms::_true } // _TRUE
+    { 1, 1, Expr::BOOLEAN_RESULT, &nsGkAtoms::boolean }, // BOOLEAN
+    { 0, 0, Expr::BOOLEAN_RESULT, &nsGkAtoms::_false }, // _FALSE
+    { 1, 1, Expr::BOOLEAN_RESULT, &nsGkAtoms::lang }, // LANG
+    { 1, 1, Expr::BOOLEAN_RESULT, &nsGkAtoms::_not }, // _NOT
+    { 0, 0, Expr::BOOLEAN_RESULT, &nsGkAtoms::_true } // _TRUE
 };
 
 
 /*
  * Evaluates this Expr based on the given context node and processor state
  * @param context the context node for evaluation of this Expr
  * @param ps the ContextState containing the stack information needed
  * for evaluation
@@ -631,17 +631,17 @@ txCoreFunctionCall::evaluate(txIEvalCont
         }
         case LANG:
         {
             txXPathTreeWalker walker(aContext->getContextNode());
 
             nsAutoString lang;
             PRBool found;
             do {
-                found = walker.getAttr(txXMLAtoms::lang, kNameSpaceID_XML,
+                found = walker.getAttr(nsGkAtoms::lang, kNameSpaceID_XML,
                                        lang);
             } while (!found && walker.moveToParent());
 
             if (!found) {
                 aContext->recycler()->getBoolResult(PR_FALSE, aResult);
 
                 return NS_OK;
             }
--- a/content/xslt/src/xpath/txExprLexer.cpp
+++ b/content/xslt/src/xpath/txExprLexer.cpp
@@ -36,17 +36,17 @@
  *
  * ***** END LICENSE BLOCK ***** */
 
 /**
  * Lexical analyzer for XPath expressions
  */
 
 #include "txExprLexer.h"
-#include "txAtoms.h"
+#include "nsGkAtoms.h"
 #include "nsString.h"
 #include "txError.h"
 #include "txXMLUtils.h"
 
 /**
  * Creates a new ExprLexer
  */
 txExprLexer::txExprLexer()
@@ -175,26 +175,26 @@ txExprLexer::parse(const nsASingleFragme
           ++mPosition;
         }
         else {
           --mPosition; // step back
         }
       }
       if (nextIsOperatorToken(prevToken)) {
         nsDependentSubstring op(Substring(start, mPosition));
-        if (txXPathAtoms::_and->Equals(op)) {
+        if (nsGkAtoms::_and->Equals(op)) {
           defType = Token::AND_OP;
         }
-        else if (txXPathAtoms::_or->Equals(op)) {
+        else if (nsGkAtoms::_or->Equals(op)) {
           defType = Token::OR_OP;
         }
-        else if (txXPathAtoms::mod->Equals(op)) {
+        else if (nsGkAtoms::mod->Equals(op)) {
           defType = Token::MODULUS_OP;
         }
-        else if (txXPathAtoms::div->Equals(op)) {
+        else if (nsGkAtoms::div->Equals(op)) {
           defType = Token::DIVIDE_OP;
         }
         else {
           // XXX QUESTION: spec is not too precise
           // badops is sure an error, but is bad:ops, too? We say yes!
           return NS_ERROR_XPATH_OPERATOR_EXPECTED;
         }
       }
--- a/content/xslt/src/xpath/txExprParser.cpp
+++ b/content/xslt/src/xpath/txExprParser.cpp
@@ -41,17 +41,17 @@
  * This class is used to parse XSL Expressions
  * @see ExprLexer
 **/
 
 #include "txExprParser.h"
 #include "txExprLexer.h"
 #include "txExpr.h"
 #include "txStack.h"
-#include "txAtoms.h"
+#include "nsGkAtoms.h"
 #include "txError.h"
 #include "txIXPathContext.h"
 #include "txStringUtils.h"
 #include "txXPathNode.h"
 #include "txXPathOptimizer.h"
 
 /**
  * Creates an Attribute Value Template using the given value
@@ -513,53 +513,53 @@ txExprParser::createLocationStep(txExprL
     //-- get Axis Identifier or AbbreviatedStep, if present
     Token* tok = lexer.peek();
     switch (tok->mType) {
         case Token::AXIS_IDENTIFIER:
         {
             //-- eat token
             lexer.nextToken();
             nsCOMPtr<nsIAtom> axis = do_GetAtom(tok->Value());
-            if (axis == txXPathAtoms::ancestor) {
+            if (axis == nsGkAtoms::ancestor) {
                 axisIdentifier = LocationStep::ANCESTOR_AXIS;
             }
-            else if (axis == txXPathAtoms::ancestorOrSelf) {
+            else if (axis == nsGkAtoms::ancestorOrSelf) {
                 axisIdentifier = LocationStep::ANCESTOR_OR_SELF_AXIS;
             }
-            else if (axis == txXPathAtoms::attribute) {
+            else if (axis == nsGkAtoms::attribute) {
                 axisIdentifier = LocationStep::ATTRIBUTE_AXIS;
             }
-            else if (axis == txXPathAtoms::child) {
+            else if (axis == nsGkAtoms::child) {
                 axisIdentifier = LocationStep::CHILD_AXIS;
             }
-            else if (axis == txXPathAtoms::descendant) {
+            else if (axis == nsGkAtoms::descendant) {
                 axisIdentifier = LocationStep::DESCENDANT_AXIS;
             }
-            else if (axis == txXPathAtoms::descendantOrSelf) {
+            else if (axis == nsGkAtoms::descendantOrSelf) {
                 axisIdentifier = LocationStep::DESCENDANT_OR_SELF_AXIS;
             }
-            else if (axis == txXPathAtoms::following) {
+            else if (axis == nsGkAtoms::following) {
                 axisIdentifier = LocationStep::FOLLOWING_AXIS;
             }
-            else if (axis == txXPathAtoms::followingSibling) {
+            else if (axis == nsGkAtoms::followingSibling) {
                 axisIdentifier = LocationStep::FOLLOWING_SIBLING_AXIS;
             }
-            else if (axis == txXPathAtoms::_namespace) {
+            else if (axis == nsGkAtoms::_namespace) {
                 axisIdentifier = LocationStep::NAMESPACE_AXIS;
             }
-            else if (axis == txXPathAtoms::parent) {
+            else if (axis == nsGkAtoms::parent) {
                 axisIdentifier = LocationStep::PARENT_AXIS;
             }
-            else if (axis == txXPathAtoms::preceding) {
+            else if (axis == nsGkAtoms::preceding) {
                 axisIdentifier = LocationStep::PRECEDING_AXIS;
             }
-            else if (axis == txXPathAtoms::precedingSibling) {
+            else if (axis == nsGkAtoms::precedingSibling) {
                 axisIdentifier = LocationStep::PRECEDING_SIBLING_AXIS;
             }
-            else if (axis == txXPathAtoms::self) {
+            else if (axis == nsGkAtoms::self) {
                 axisIdentifier = LocationStep::SELF_AXIS;
             }
             else {
                 return NS_ERROR_XPATH_INVALID_AXIS;
             }
             break;
         }
         case Token::AT_SIGN:
--- a/content/xslt/src/xpath/txNameTest.cpp
+++ b/content/xslt/src/xpath/txNameTest.cpp
@@ -33,26 +33,26 @@
  * 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 "txExpr.h"
 #include "nsIAtom.h"
-#include "txAtoms.h"
+#include "nsGkAtoms.h"
 #include "txXPathTreeWalker.h"
 #include "txIXPathContext.h"
 
 txNameTest::txNameTest(nsIAtom* aPrefix, nsIAtom* aLocalName, PRInt32 aNSID,
                        PRUint16 aNodeType)
     :mPrefix(aPrefix), mLocalName(aLocalName), mNamespace(aNSID),
      mNodeType(aNodeType)
 {
-    if (aPrefix == txXMLAtoms::_empty)
+    if (aPrefix == nsGkAtoms::_empty)
         mPrefix = 0;
     NS_ASSERTION(aLocalName, "txNameTest without a local name?");
     NS_ASSERTION(aNodeType == txXPathNodeType::DOCUMENT_NODE ||
                  aNodeType == txXPathNodeType::ELEMENT_NODE ||
                  aNodeType == txXPathNodeType::ATTRIBUTE_NODE,
                  "Go fix txNameTest::matches");
 }
 
@@ -63,40 +63,40 @@ PRBool txNameTest::matches(const txXPath
         (mNodeType == txXPathNodeType::ATTRIBUTE_NODE &&
          !txXPathNodeUtils::isAttribute(aNode)) ||
         (mNodeType == txXPathNodeType::DOCUMENT_NODE &&
          !txXPathNodeUtils::isRoot(aNode))) {
         return PR_FALSE;
     }
 
     // Totally wild?
-    if (mLocalName == txXPathAtoms::_asterix && !mPrefix)
+    if (mLocalName == nsGkAtoms::_asterix && !mPrefix)
         return MB_TRUE;
 
     // Compare namespaces
     if (mNamespace != txXPathNodeUtils::getNamespaceID(aNode) 
         && !(mNamespace == kNameSpaceID_None &&
              txXPathNodeUtils::isHTMLElementInHTMLDocument(aNode))
        )
         return MB_FALSE;
 
     // Name wild?
-    if (mLocalName == txXPathAtoms::_asterix)
+    if (mLocalName == nsGkAtoms::_asterix)
         return MB_TRUE;
 
     // Compare local-names
     return txXPathNodeUtils::localNameEquals(aNode, mLocalName);
 }
 
 /*
  * Returns the default priority of this txNodeTest
  */
 double txNameTest::getDefaultPriority()
 {
-    if (mLocalName == txXPathAtoms::_asterix) {
+    if (mLocalName == nsGkAtoms::_asterix) {
         if (!mPrefix)
             return -0.5;
         return -0.25;
     }
     return 0;
 }
 
 txNodeTest::NodeTestType
--- a/content/xslt/src/xpath/txVariableRefExpr.cpp
+++ b/content/xslt/src/xpath/txVariableRefExpr.cpp
@@ -34,32 +34,32 @@
  * 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 "txExpr.h"
 #include "nsIAtom.h"
 #include "txNodeSet.h"
-#include "txAtoms.h"
+#include "nsGkAtoms.h"
 #include "txIXPathContext.h"
 
   //-------------------/
  //- VariableRefExpr -/
 //-------------------/
 
 /**
  * Creates a VariableRefExpr with the given variable name
 **/
 VariableRefExpr::VariableRefExpr(nsIAtom* aPrefix, nsIAtom* aLocalName,
                                  PRInt32 aNSID)
     : mPrefix(aPrefix), mLocalName(aLocalName), mNamespace(aNSID)
 {
     NS_ASSERTION(mLocalName, "VariableRefExpr without local name?");
-    if (mPrefix == txXMLAtoms::_empty)
+    if (mPrefix == nsGkAtoms::_empty)
         mPrefix = 0;
 }
 
 /**
  * Evaluates this Expr based on the given context node and processor state
  * @param context the context node for evaluation of this Expr
  * @param ps the ContextState containing the stack information needed
  * for evaluation
--- a/content/xslt/src/xpath/txXPathOptimizer.cpp
+++ b/content/xslt/src/xpath/txXPathOptimizer.cpp
@@ -34,17 +34,17 @@
  * 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 "txXPathOptimizer.h"
 #include "txExprResult.h"
 #include "nsIAtom.h"
-#include "txAtoms.h"
+#include "nsGkAtoms.h"
 #include "txXPathNode.h"
 #include "txExpr.h"
 #include "txIXPathContext.h"
 
 class txEarlyEvalContext : public txIEvalContext
 {
 public:
     txEarlyEvalContext(txResultRecycler* aRecycler)
@@ -170,17 +170,17 @@ txXPathOptimizer::optimizeStep(Expr* aIn
     LocationStep* step = static_cast<LocationStep*>(aInExpr);
 
     if (step->getAxisIdentifier() == LocationStep::ATTRIBUTE_AXIS) {
         // Test for @foo type steps.
         txNameTest* nameTest = nsnull;
         if (!step->getSubExprAt(0) &&
             step->getNodeTest()->getType() == txNameTest::NAME_TEST &&
             (nameTest = static_cast<txNameTest*>(step->getNodeTest()))->
-                mLocalName != txXPathAtoms::_asterix) {
+                mLocalName != nsGkAtoms::_asterix) {
 
             *aOutExpr = new txNamedAttributeStep(nameTest->mNamespace,
                                                  nameTest->mPrefix,
                                                  nameTest->mLocalName);
             NS_ENSURE_TRUE(*aOutExpr, NS_ERROR_OUT_OF_MEMORY);
 
             return NS_OK; // return since we no longer have a step-object.
         }
--- a/content/xslt/src/xslt/txCurrentFunctionCall.cpp
+++ b/content/xslt/src/xslt/txCurrentFunctionCall.cpp
@@ -1,9 +1,9 @@
-#include "txAtoms.h"
+#include "nsGkAtoms.h"
 #include "txXSLTFunctions.h"
 #include "txExecutionState.h"
 
 /*
   Implementation of XSLT 1.0 extension function: current
 */
 
 /**
@@ -49,13 +49,13 @@ CurrentFunctionCall::isSensitiveTo(Conte
 {
     return !!(aContext & PRIVATE_CONTEXT);
 }
 
 #ifdef TX_TO_STRING
 nsresult
 CurrentFunctionCall::getNameAtom(nsIAtom** aAtom)
 {
-    *aAtom = txXSLTAtoms::current;
+    *aAtom = nsGkAtoms::current;
     NS_ADDREF(*aAtom);
     return NS_OK;
 }
 #endif
--- a/content/xslt/src/xslt/txDocumentFunctionCall.cpp
+++ b/content/xslt/src/xslt/txDocumentFunctionCall.cpp
@@ -36,17 +36,17 @@
  *
  * ***** END LICENSE BLOCK ***** */
 
 /*
  * DocumentFunctionCall
  * A representation of the XSLT additional function: document()
  */
 
-#include "txAtoms.h"
+#include "nsGkAtoms.h"
 #include "txIXPathContext.h"
 #include "txXSLTFunctions.h"
 #include "txExecutionState.h"
 #include "txURIUtils.h"
 
 /*
  * Creates a new DocumentFunctionCall.
  */
@@ -186,13 +186,13 @@ DocumentFunctionCall::isSensitiveTo(Cont
 {
     return (aContext & PRIVATE_CONTEXT) || argsSensitiveTo(aContext);
 }
 
 #ifdef TX_TO_STRING
 nsresult
 DocumentFunctionCall::getNameAtom(nsIAtom** aAtom)
 {
-    *aAtom = txXSLTAtoms::document;
+    *aAtom = nsGkAtoms::document;
     NS_ADDREF(*aAtom);
     return NS_OK;
 }
 #endif
--- a/content/xslt/src/xslt/txEXSLTFunctions.cpp
+++ b/content/xslt/src/xslt/txEXSLTFunctions.cpp
@@ -33,17 +33,17 @@
  * 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 "nsIAtom.h"
-#include "txAtoms.h"
+#include "nsGkAtoms.h"
 #include "txExecutionState.h"
 #include "txExpr.h"
 #include "txIXPathContext.h"
 #include "txNodeSet.h"
 #include "txOutputFormat.h"
 #include "txRtfHandler.h"
 #include "txXPathTreeWalker.h"
 #include "nsPrintfCString.h"
@@ -213,32 +213,32 @@ static const char kEXSLTSetsNS[] = "http
 static const char kEXSLTStringsNS[] = "http://exslt.org/strings";
 static const char kEXSLTMathNS[] = "http://exslt.org/math";
 static const char kEXSLTDatesAndTimesNS[] = "http://exslt.org/dates-and-times";
 
 // The order of this table must be the same as the
 // txEXSLTFunctionCall::eType enum
 static txEXSLTFunctionDescriptor descriptTable[] =
 {
-    { 1, 1, Expr::NODESET_RESULT, &txXSLTAtoms::nodeSet, 0, kEXSLTCommonNS }, // NODE_SET
-    { 1, 1, Expr::STRING_RESULT,  &txXSLTAtoms::objectType, 0, kEXSLTCommonNS }, // OBJECT_TYPE
-    { 2, 2, Expr::NODESET_RESULT, &txXSLTAtoms::difference, 0, kEXSLTSetsNS }, // DIFFERENCE
-    { 1, 1, Expr::NODESET_RESULT, &txXSLTAtoms::distinct, 0, kEXSLTSetsNS }, // DISTINCT
-    { 2, 2, Expr::BOOLEAN_RESULT, &txXSLTAtoms::hasSameNode, 0, kEXSLTSetsNS }, // HAS_SAME_NODE
-    { 2, 2, Expr::NODESET_RESULT, &txXSLTAtoms::intersection, 0, kEXSLTSetsNS }, // INTERSECTION
-    { 2, 2, Expr::NODESET_RESULT, &txXSLTAtoms::leading, 0, kEXSLTSetsNS }, // LEADING
-    { 2, 2, Expr::NODESET_RESULT, &txXSLTAtoms::trailing, 0, kEXSLTSetsNS }, // TRAILING
-    { 1, 1, Expr::STRING_RESULT,  &txXSLTAtoms::concat, 0, kEXSLTStringsNS }, // CONCAT
-    { 1, 2, Expr::STRING_RESULT,  &txXSLTAtoms::split, 0, kEXSLTStringsNS }, // SPLIT
-    { 1, 2, Expr::STRING_RESULT,  &txXSLTAtoms::tokenize, 0, kEXSLTStringsNS }, // TOKENIZE
-    { 1, 1, Expr::NUMBER_RESULT,  &txXSLTAtoms::max, 0, kEXSLTMathNS }, // MAX
-    { 1, 1, Expr::NUMBER_RESULT,  &txXSLTAtoms::min, 0, kEXSLTMathNS }, // MIN
-    { 1, 1, Expr::NODESET_RESULT, &txXSLTAtoms::highest, 0, kEXSLTMathNS }, // HIGHEST
-    { 1, 1, Expr::NODESET_RESULT, &txXSLTAtoms::lowest, 0, kEXSLTMathNS }, // LOWEST
-    { 0, 0, Expr::STRING_RESULT,  &txXSLTAtoms::dateTime, 0, kEXSLTDatesAndTimesNS }, // DATE_TIME
+    { 1, 1, Expr::NODESET_RESULT, &nsGkAtoms::nodeSet, 0, kEXSLTCommonNS }, // NODE_SET
+    { 1, 1, Expr::STRING_RESULT,  &nsGkAtoms::objectType, 0, kEXSLTCommonNS }, // OBJECT_TYPE
+    { 2, 2, Expr::NODESET_RESULT, &nsGkAtoms::difference, 0, kEXSLTSetsNS }, // DIFFERENCE
+    { 1, 1, Expr::NODESET_RESULT, &nsGkAtoms::distinct, 0, kEXSLTSetsNS }, // DISTINCT
+    { 2, 2, Expr::BOOLEAN_RESULT, &nsGkAtoms::hasSameNode, 0, kEXSLTSetsNS }, // HAS_SAME_NODE
+    { 2, 2, Expr::NODESET_RESULT, &nsGkAtoms::intersection, 0, kEXSLTSetsNS }, // INTERSECTION
+    { 2, 2, Expr::NODESET_RESULT, &nsGkAtoms::leading, 0, kEXSLTSetsNS }, // LEADING
+    { 2, 2, Expr::NODESET_RESULT, &nsGkAtoms::trailing, 0, kEXSLTSetsNS }, // TRAILING
+    { 1, 1, Expr::STRING_RESULT,  &nsGkAtoms::concat, 0, kEXSLTStringsNS }, // CONCAT
+    { 1, 2, Expr::STRING_RESULT,  &nsGkAtoms::split, 0, kEXSLTStringsNS }, // SPLIT
+    { 1, 2, Expr::STRING_RESULT,  &nsGkAtoms::tokenize, 0, kEXSLTStringsNS }, // TOKENIZE
+    { 1, 1, Expr::NUMBER_RESULT,  &nsGkAtoms::max, 0, kEXSLTMathNS }, // MAX
+    { 1, 1, Expr::NUMBER_RESULT,  &nsGkAtoms::min, 0, kEXSLTMathNS }, // MIN
+    { 1, 1, Expr::NODESET_RESULT, &nsGkAtoms::highest, 0, kEXSLTMathNS }, // HIGHEST
+    { 1, 1, Expr::NODESET_RESULT, &nsGkAtoms::lowest, 0, kEXSLTMathNS }, // LOWEST
+    { 0, 0, Expr::STRING_RESULT,  &nsGkAtoms::dateTime, 0, kEXSLTDatesAndTimesNS }, // DATE_TIME
 
 };
 
 class txEXSLTFunctionCall : public FunctionCall
 {
 public:
     // The order of this enum must be the same as the descriptTable
     // table above
@@ -536,63 +536,63 @@ txEXSLTFunctionCall::evaluate(txIEvalCon
 
             PRUint32 tailIndex;
 
             // Start splitting
             if (pattern.IsEmpty()) {
                 nsString::const_char_iterator start = string.BeginReading();
                 nsString::const_char_iterator end = string.EndReading();
                 for (; start < end; ++start) {
-                    rv = createAndAddToResult(txXSLTAtoms::token,
+                    rv = createAndAddToResult(nsGkAtoms::token,
                                               Substring(start, start + 1),
                                               resultSet, docFrag);
                     NS_ENSURE_SUCCESS(rv, rv);
                 }
 
                 tailIndex = string.Length();
             }
             else if (mType == SPLIT) {
                 nsAString::const_iterator strStart, strEnd;
                 string.BeginReading(strStart);
                 string.EndReading(strEnd);
                 nsAString::const_iterator start = strStart, end = strEnd;
 
                 while (FindInReadable(pattern, start, end)) {
                     if (start != strStart) {
-                        rv = createAndAddToResult(txXSLTAtoms::token,
+                        rv = createAndAddToResult(nsGkAtoms::token,
                                                   Substring(strStart, start),
                                                   resultSet, docFrag);
                         NS_ENSURE_SUCCESS(rv, rv);
                     }
                     strStart = start = end;
                     end = strEnd;
                 }
 
                 tailIndex = strStart.get() - string.get();
             }
             else {
                 PRInt32 found, start = 0;
                 while ((found = string.FindCharInSet(pattern, start)) !=
                        kNotFound) {
                     if (found != start) {
-                        rv = createAndAddToResult(txXSLTAtoms::token,
+                        rv = createAndAddToResult(nsGkAtoms::token,
                                                   Substring(string, start,
                                                             found - start),
                                                   resultSet, docFrag);
                         NS_ENSURE_SUCCESS(rv, rv);
                     }
                     start = found + 1;
                 }
 
                 tailIndex = start;
             }
 
             // Add tail if needed
             if (tailIndex != (PRUint32)string.Length()) {
-                rv = createAndAddToResult(txXSLTAtoms::token,
+                rv = createAndAddToResult(nsGkAtoms::token,
                                           Substring(string, tailIndex),
                                           resultSet, docFrag);
                 NS_ENSURE_SUCCESS(rv, rv);
             }
 
             NS_ADDREF(*aResult = resultSet);
 
             return NS_OK;
--- a/content/xslt/src/xslt/txFormatNumberFunctionCall.cpp
+++ b/content/xslt/src/xslt/txFormatNumberFunctionCall.cpp
@@ -32,17 +32,17 @@
  * 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 "txXSLTFunctions.h"
-#include "txAtoms.h"
+#include "nsGkAtoms.h"
 #include "txIXPathContext.h"
 #include "txStylesheet.h"
 #include <math.h>
 #include "txNamespaceMap.h"
 
 #include "prdtoa.h"
 
 #define INVALID_PARAM_VALUE \
@@ -419,17 +419,17 @@ txFormatNumberFunctionCall::isSensitiveT
 {
     return argsSensitiveTo(aContext);
 }
 
 #ifdef TX_TO_STRING
 nsresult
 txFormatNumberFunctionCall::getNameAtom(nsIAtom** aAtom)
 {
-    *aAtom = txXSLTAtoms::formatNumber;
+    *aAtom = nsGkAtoms::formatNumber;
     NS_ADDREF(*aAtom);
     return NS_OK;
 }
 #endif
 
 /*
  * txDecimalFormat
  * A representation of the XSLT element <xsl:decimal-format>
--- a/content/xslt/src/xslt/txGenerateIdFunctionCall.cpp
+++ b/content/xslt/src/xslt/txGenerateIdFunctionCall.cpp
@@ -30,17 +30,17 @@
  * 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 "txAtoms.h"
+#include "nsGkAtoms.h"
 #include "txIXPathContext.h"
 #include "txNodeSet.h"
 #include "txXPathTreeWalker.h"
 #include "txXSLTFunctions.h"
 #include "txExecutionState.h"
 
 /*
   Implementation of XSLT 1.0 extension function: generate-id
@@ -130,13 +130,13 @@ GenerateIdFunctionCall::isSensitiveTo(Co
 
     return argsSensitiveTo(aContext);
 }
 
 #ifdef TX_TO_STRING
 nsresult
 GenerateIdFunctionCall::getNameAtom(nsIAtom** aAtom)
 {
-    *aAtom = txXSLTAtoms::generateId;
+    *aAtom = nsGkAtoms::generateId;
     NS_ADDREF(*aAtom);
     return NS_OK;
 }
 #endif
--- a/content/xslt/src/xslt/txInstructions.cpp
+++ b/content/xslt/src/xslt/txInstructions.cpp
@@ -40,17 +40,17 @@
 #include "txError.h"
 #include "txExpr.h"
 #include "txStylesheet.h"
 #include "txNodeSetContext.h"
 #include "txTextHandler.h"
 #include "nsIConsoleService.h"
 #include "nsServiceManagerUtils.h"
 #include "txStringUtils.h"
-#include "txAtoms.h"
+#include "nsGkAtoms.h"
 #include "txRtfHandler.h"
 #include "txNodeSorter.h"
 #include "txXSLTNumber.h"
 #include "txExecutionState.h"
 
 nsresult
 txApplyDefaultElementTemplate::execute(txExecutionState& aEs)
 {
@@ -131,17 +131,17 @@ nsresult
 txAttribute::execute(txExecutionState& aEs)
 {
     nsAutoString name;
     nsresult rv = mName->evaluateToString(aEs.getEvalContext(), name);
     NS_ENSURE_SUCCESS(rv, rv);
 
     const PRUnichar* colon;
     if (!XMLUtils::isValidQName(name, &colon) ||
-        TX_StringEqualsAtom(name, txXMLAtoms::xmlns)) {
+        TX_StringEqualsAtom(name, nsGkAtoms::xmlns)) {
         return NS_OK;
     }
 
     nsCOMPtr<nsIAtom> prefix;
     PRUint32 lnameStart = 0;
     if (colon) {
         prefix = do_GetAtom(Substring(name.get(), colon));
         lnameStart = colon - name.get() + 1;
--- a/content/xslt/src/xslt/txKeyFunctionCall.cpp
+++ b/content/xslt/src/xslt/txKeyFunctionCall.cpp
@@ -32,17 +32,17 @@
  * 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 "txExecutionState.h"
-#include "txAtoms.h"
+#include "nsGkAtoms.h"
 #include "txSingleNodeContext.h"
 #include "txXSLTFunctions.h"
 #include "nsReadableUtils.h"
 #include "txKey.h"
 #include "txXSLTPatterns.h"
 #include "txNamespaceMap.h"
 
 /*
@@ -137,17 +137,17 @@ txKeyFunctionCall::isSensitiveTo(Context
 {
     return (aContext & NODE_CONTEXT) || argsSensitiveTo(aContext);
 }
 
 #ifdef TX_TO_STRING
 nsresult
 txKeyFunctionCall::getNameAtom(nsIAtom** aAtom)
 {
-    *aAtom = txXSLTAtoms::key;
+    *aAtom = nsGkAtoms::key;
     NS_ADDREF(*aAtom);
     return NS_OK;
 }
 #endif
 
 /**
  * Hash functions
  */
--- a/content/xslt/src/xslt/txMozillaStylesheetCompiler.cpp
+++ b/content/xslt/src/xslt/txMozillaStylesheetCompiler.cpp
@@ -57,17 +57,17 @@
 #include "nsSyncLoadService.h"
 #include "nsIURI.h"
 #include "nsIPrincipal.h"
 #include "nsIWindowWatcher.h"
 #include "nsIXMLContentSink.h"
 #include "nsMimeTypes.h"
 #include "nsNetUtil.h"
 #include "nsParserCIID.h"
-#include "txAtoms.h"
+#include "nsGkAtoms.h"
 #include "txLog.h"
 #include "txMozillaXSLTProcessor.h"
 #include "txStylesheetCompiler.h"
 #include "txXMLUtils.h"
 #include "nsAttrName.h"
 #include "nsIScriptError.h"
 #include "nsIURL.h"
 #include "nsCrossSiteListenerProxy.h"
--- a/content/xslt/src/xslt/txMozillaXMLOutput.cpp
+++ b/content/xslt/src/xslt/txMozillaXMLOutput.cpp
@@ -46,17 +46,17 @@
 #include "nsIScriptElement.h"
 #include "nsIParser.h"
 #include "nsIRefreshURI.h"
 #include "nsPIDOMWindow.h"
 #include "nsIContent.h"
 #include "nsContentCID.h"
 #include "nsNetUtil.h"
 #include "nsUnicharUtils.h"
-#include "txAtoms.h"
+#include "nsGkAtoms.h"
 #include "txLog.h"
 #include "nsIConsoleService.h"
 #include "nsIDOMDocumentFragment.h"
 #include "nsINameSpaceManager.h"
 #include "nsCSSStyleSheet.h"
 #include "txStringUtils.h"
 #include "txURIUtils.h"
 #include "nsIHTMLDocument.h"
@@ -711,30 +711,30 @@ txMozillaXMLOutput::createTxWrapper()
 }
 
 nsresult
 txMozillaXMLOutput::startHTMLElement(nsIContent* aElement, PRBool aIsHTML)
 {
     nsresult rv = NS_OK;
     nsIAtom *atom = aElement->Tag();
 
-    if ((atom != txHTMLAtoms::tr || !aIsHTML) &&
+    if ((atom != nsGkAtoms::tr || !aIsHTML) &&
         NS_PTR_TO_INT32(mTableStateStack.peek()) == ADDED_TBODY) {
         PRUint32 last = mCurrentNodeStack.Count() - 1;
         NS_ASSERTION(last != (PRUint32)-1, "empty stack");
 
         mCurrentNode = mCurrentNodeStack.SafeObjectAt(last);
         mCurrentNodeStack.RemoveObjectAt(last);
         mTableStateStack.pop();
     }
 
-    if (atom == txHTMLAtoms::table && aIsHTML) {
+    if (atom == nsGkAtoms::table && aIsHTML) {
         mTableState = TABLE;
     }
-    else if (atom == txHTMLAtoms::tr && aIsHTML &&
+    else if (atom == nsGkAtoms::tr && aIsHTML &&
              NS_PTR_TO_INT32(mTableStateStack.peek()) == TABLE) {
         nsCOMPtr<nsIContent> tbody;
         rv = createHTMLElement(nsGkAtoms::tbody, getter_AddRefs(tbody));
         NS_ENSURE_SUCCESS(rv, rv);
 
         rv = mCurrentNode->AppendChildTo(tbody, PR_TRUE);
         NS_ENSURE_SUCCESS(rv, rv);
 
@@ -742,17 +742,17 @@ txMozillaXMLOutput::startHTMLElement(nsI
         NS_ENSURE_SUCCESS(rv, rv);
 
         if (!mCurrentNodeStack.AppendObject(tbody)) {
             return NS_ERROR_OUT_OF_MEMORY;
         }
 
         mCurrentNode = tbody;
     }
-    else if (atom == txHTMLAtoms::head &&
+    else if (atom == nsGkAtoms::head &&
              mOutputFormat.mMethod == eHTMLOutput) {
         // Insert META tag, according to spec, 16.2, like
         // <META http-equiv="Content-Type" content="text/html; charset=EUC-JP">
         nsCOMPtr<nsIContent> meta;
         rv = createHTMLElement(nsGkAtoms::meta, getter_AddRefs(meta));
         NS_ENSURE_SUCCESS(rv, rv);
 
         rv = meta->SetAttr(kNameSpaceID_None, nsGkAtoms::httpEquiv,
@@ -777,51 +777,51 @@ txMozillaXMLOutput::startHTMLElement(nsI
 }
 
 nsresult
 txMozillaXMLOutput::endHTMLElement(nsIContent* aElement)
 {
     nsIAtom *atom = aElement->Tag();
 
     if (mTableState == ADDED_TBODY) {
-        NS_ASSERTION(atom == txHTMLAtoms::tbody,
+        NS_ASSERTION(atom == nsGkAtoms::tbody,
                      "Element flagged as added tbody isn't a tbody");
         PRUint32 last = mCurrentNodeStack.Count() - 1;
         NS_ASSERTION(last != (PRUint32)-1, "empty stack");
 
         mCurrentNode = mCurrentNodeStack.SafeObjectAt(last);
         mCurrentNodeStack.RemoveObjectAt(last);
         mTableState = static_cast<TableState>
                                  (NS_PTR_TO_INT32(mTableStateStack.pop()));
 
         return NS_OK;
     }
-    else if (mCreatingNewDocument && atom == txHTMLAtoms::meta) {
+    else if (mCreatingNewDocument && atom == nsGkAtoms::meta) {
         // handle HTTP-EQUIV data
         nsAutoString httpEquiv;
-        aElement->GetAttr(kNameSpaceID_None, txHTMLAtoms::httpEquiv, httpEquiv);
+        aElement->GetAttr(kNameSpaceID_None, nsGkAtoms::httpEquiv, httpEquiv);
         if (!httpEquiv.IsEmpty()) {
             nsAutoString value;
-            aElement->GetAttr(kNameSpaceID_None, txHTMLAtoms::content, value);
+            aElement->GetAttr(kNameSpaceID_None, nsGkAtoms::content, value);
             if (!value.IsEmpty()) {
                 ToLowerCase(httpEquiv);
                 nsCOMPtr<nsIAtom> header = do_GetAtom(httpEquiv);
                 processHTTPEquiv(header, value);
             }
         }
     }
     
     return NS_OK;
 }
 
 void txMozillaXMLOutput::processHTTPEquiv(nsIAtom* aHeader, const nsString& aValue)
 {
     // For now we only handle "refresh". There's a longer list in
     // HTMLContentSink::ProcessHeaderData
-    if (aHeader == txHTMLAtoms::refresh)
+    if (aHeader == nsGkAtoms::refresh)
         LossyCopyUTF16toASCII(aValue, mRefreshString);
 }
 
 nsresult
 txMozillaXMLOutput::createResultDocument(const nsSubstring& aName, PRInt32 aNsID,
                                          nsIDOMDocument* aSourceDocument)
 {
     nsresult rv;
--- a/content/xslt/src/xslt/txNodeSorter.cpp
+++ b/content/xslt/src/xslt/txNodeSorter.cpp
@@ -35,17 +35,17 @@
  * 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 "txNodeSorter.h"
 #include "txExecutionState.h"
 #include "txXPathResultComparator.h"
-#include "txAtoms.h"
+#include "nsGkAtoms.h"
 #include "txNodeSetContext.h"
 #include "txExpr.h"
 #include "txStringUtils.h"
 #include "prmem.h"
 #include "nsQuickSort.h"
 
 /*
  * Sorts Nodes as specified by the W3C XSLT 1.0 Recommendation
@@ -79,34 +79,34 @@ txNodeSorter::addSortElement(Expr* aSele
 
     // Order
     MBool ascending = MB_TRUE;
     if (aOrderExpr) {
         nsAutoString attrValue;
         rv = aOrderExpr->evaluateToString(aContext, attrValue);
         NS_ENSURE_SUCCESS(rv, rv);
 
-        if (TX_StringEqualsAtom(attrValue, txXSLTAtoms::descending)) {
+        if (TX_StringEqualsAtom(attrValue, nsGkAtoms::descending)) {
             ascending = MB_FALSE;
         }
-        else if (!TX_StringEqualsAtom(attrValue, txXSLTAtoms::ascending)) {
+        else if (!TX_StringEqualsAtom(attrValue, nsGkAtoms::ascending)) {
             // XXX ErrorReport: unknown value for order attribute
             return NS_ERROR_XSLT_BAD_VALUE;
         }
     }
 
 
     // Create comparator depending on datatype
     nsAutoString dataType;
     if (aDataTypeExpr) {
         rv = aDataTypeExpr->evaluateToString(aContext, dataType);
         NS_ENSURE_SUCCESS(rv, rv);
     }
 
-    if (!aDataTypeExpr || TX_StringEqualsAtom(dataType, txXSLTAtoms::text)) {
+    if (!aDataTypeExpr || TX_StringEqualsAtom(dataType, nsGkAtoms::text)) {
         // Text comparator
         
         // Language
         nsAutoString lang;
         if (aLangExpr) {
             rv = aLangExpr->evaluateToString(aContext, lang);
             NS_ENSURE_SUCCESS(rv, rv);
         }
@@ -114,32 +114,32 @@ txNodeSorter::addSortElement(Expr* aSele
         // Case-order 
         MBool upperFirst = PR_FALSE;
         if (aCaseOrderExpr) {
             nsAutoString attrValue;
 
             rv = aCaseOrderExpr->evaluateToString(aContext, attrValue);
             NS_ENSURE_SUCCESS(rv, rv);
 
-            if (TX_StringEqualsAtom(attrValue, txXSLTAtoms::upperFirst)) {
+            if (TX_StringEqualsAtom(attrValue, nsGkAtoms::upperFirst)) {
                 upperFirst = PR_TRUE;
             }
             else if (!TX_StringEqualsAtom(attrValue,
-                                          txXSLTAtoms::lowerFirst)) {
+                                          nsGkAtoms::lowerFirst)) {
                 // XXX ErrorReport: unknown value for case-order attribute
                 return NS_ERROR_XSLT_BAD_VALUE;
             }
         }
 
         key->mComparator = new txResultStringComparator(ascending,
                                                         upperFirst,
                                                         lang);
         NS_ENSURE_TRUE(key->mComparator, NS_ERROR_OUT_OF_MEMORY);
     }
-    else if (TX_StringEqualsAtom(dataType, txXSLTAtoms::number)) {
+    else if (TX_StringEqualsAtom(dataType, nsGkAtoms::number)) {
         // Number comparator
         key->mComparator = new txResultNumberComparator(ascending);
         NS_ENSURE_TRUE(key->mComparator, NS_ERROR_OUT_OF_MEMORY);
     }
     else {
         // XXX ErrorReport: unknown data-type
         return NS_ERROR_XSLT_BAD_VALUE;
     }
--- a/content/xslt/src/xslt/txPatternParser.cpp
+++ b/content/xslt/src/xslt/txPatternParser.cpp
@@ -33,17 +33,17 @@
  * 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 "txPatternParser.h"
 #include "txExprLexer.h"
-#include "txAtoms.h"
+#include "nsGkAtoms.h"
 #include "txError.h"
 #include "txStringUtils.h"
 #include "txXSLTPatterns.h"
 #include "txIXPathContext.h"
 #include "txPatternOptimizer.h"
 
 
 txPattern* txPatternParser::createPattern(const nsAFlatString& aPattern,
@@ -161,20 +161,20 @@ nsresult txPatternParser::createLocPathP
                 return aPattern ? NS_OK : NS_ERROR_OUT_OF_MEMORY;
             }
             break;
         case Token::FUNCTION_NAME_AND_PAREN:
             // id(Literal) or key(Literal, Literal)
             {
                 nsCOMPtr<nsIAtom> nameAtom =
                     do_GetAtom(aLexer.nextToken()->Value());
-                if (nameAtom == txXPathAtoms::id) {
+                if (nameAtom == nsGkAtoms::id) {
                     rv = createIdPattern(aLexer, stepPattern);
                 }
-                else if (nameAtom == txXSLTAtoms::key) {
+                else if (nameAtom == nsGkAtoms::key) {
                     rv = createKeyPattern(aLexer, aContext, stepPattern);
                 }
                 if (NS_FAILED(rv))
                     return rv;
             }
             break;
         default:
             break;
@@ -297,20 +297,20 @@ nsresult txPatternParser::createKeyPatte
 nsresult txPatternParser::createStepPattern(txExprLexer& aLexer,
                                             txIParseContext* aContext,
                                             txPattern*& aPattern)
 {
     nsresult rv = NS_OK;
     MBool isAttr = MB_FALSE;
     Token* tok = aLexer.peek();
     if (tok->mType == Token::AXIS_IDENTIFIER) {
-        if (TX_StringEqualsAtom(tok->Value(), txXPathAtoms::attribute)) {
+        if (TX_StringEqualsAtom(tok->Value(), nsGkAtoms::attribute)) {
             isAttr = MB_TRUE;
         }
-        else if (!TX_StringEqualsAtom(tok->Value(), txXPathAtoms::child)) {
+        else if (!TX_StringEqualsAtom(tok->Value(), nsGkAtoms::child)) {
             // all done already for CHILD_AXIS, for all others
             // XXX report unexpected axis error
             return NS_ERROR_XPATH_PARSE_FAILURE;
         }
         aLexer.nextToken();
     }
     else if (tok->mType == Token::AT_SIGN) {
         aLexer.nextToken();
--- a/content/xslt/src/xslt/txStylesheetCompileHandlers.cpp
+++ b/content/xslt/src/xslt/txStylesheetCompileHandlers.cpp
@@ -35,17 +35,17 @@
  * the terms of any one of the MPL, the GPL or the LGPL.
  *
  * ***** END LICENSE BLOCK ***** */
 
 #include "txStylesheetCompiler.h"
 #include "txStylesheetCompileHandlers.h"
 #include "nsWhitespaceTokenizer.h"
 #include "txInstructions.h"
-#include "txAtoms.h"
+#include "nsGkAtoms.h"
 #include "txCore.h"
 #include "txStringUtils.h"
 #include "txStylesheet.h"
 #include "txToplevelItems.h"
 #include "txPatternParser.h"
 #include "txNamespaceMap.h"
 #include "txURIUtils.h"
 #include "txXSLTFunctions.h"
@@ -121,17 +121,17 @@ parseUseAttrSets(txStylesheetAttr* aAttr
                  PRInt32 aAttrCount,
                  PRBool aInXSLTNS,
                  txStylesheetCompilerState& aState)
 {
     txStylesheetAttr* attr = nsnull;
     nsresult rv = getStyleAttr(aAttributes, aAttrCount,
                                aInXSLTNS ? kNameSpaceID_XSLT
                                          : kNameSpaceID_None,
-                               txXSLTAtoms::useAttributeSets, PR_FALSE,
+                               nsGkAtoms::useAttributeSets, PR_FALSE,
                                &attr);
     if (!attr) {
         return rv;
     }
 
     nsWhitespaceTokenizer tok(attr->mValue);
     while (tok.hasMoreTokens()) {
         txExpandedName name;
@@ -150,17 +150,17 @@ parseUseAttrSets(txStylesheetAttr* aAttr
 
 static nsresult
 parseExcludeResultPrefixes(txStylesheetAttr* aAttributes,
                            PRInt32 aAttrCount,
                            PRInt32 aNamespaceID)
 {
     txStylesheetAttr* attr = nsnull;
     nsresult rv = getStyleAttr(aAttributes, aAttrCount, aNamespaceID,
-                               txXSLTAtoms::excludeResultPrefixes, PR_FALSE,
+                               nsGkAtoms::excludeResultPrefixes, PR_FALSE,
                                &attr);
     if (!attr) {
         return rv;
     }
 
     // XXX Needs to be implemented.
 
     return NS_OK;
@@ -349,20 +349,20 @@ getYesNoAttr(txStylesheetAttr* aAttribut
     aRes = eNotSet;
     nsCOMPtr<nsIAtom> atom;
     nsresult rv = getAtomAttr(aAttributes, aAttrCount, aName, aRequired,
                               aState, getter_AddRefs(atom));
     if (!atom) {
         return rv;
     }
 
-    if (atom == txXSLTAtoms::yes) {
+    if (atom == nsGkAtoms::yes) {
         aRes = eTrue;
     }
-    else if (atom == txXSLTAtoms::no) {
+    else if (atom == nsGkAtoms::no) {
         aRes = eFalse;
     }
     else if (aRequired || !aState.fcp()) {
         // XXX ErrorReport: unknown values
         return NS_ERROR_XSLT_PARSE_FAILURE;
     }
 
     return NS_OK;
@@ -496,24 +496,24 @@ txFnStartStylesheet(PRInt32 aNamespaceID
                     PRInt32 aAttrCount,
                     txStylesheetCompilerState& aState)
 {
     // extension-element-prefixes is handled in
     // txStylesheetCompiler::startElementInternal
 
     txStylesheetAttr* attr;
     nsresult rv = getStyleAttr(aAttributes, aAttrCount, kNameSpaceID_None,
-                               txXSLTAtoms::id, PR_FALSE, &attr);
+                               nsGkAtoms::id, PR_FALSE, &attr);
     NS_ENSURE_SUCCESS(rv, rv);
 
     rv = parseExcludeResultPrefixes(aAttributes, aAttrCount, kNameSpaceID_None);
     NS_ENSURE_SUCCESS(rv, rv);
 
     rv = getStyleAttr(aAttributes, aAttrCount, kNameSpaceID_None,
-                      txXSLTAtoms::version, PR_TRUE, &attr);
+                      nsGkAtoms::version, PR_TRUE, &attr);
     NS_ENSURE_SUCCESS(rv, rv);
 
     return aState.pushHandlerTable(gTxImportHandler);
 }
 
 static nsresult
 txFnEndStylesheet(txStylesheetCompilerState& aState)
 {
@@ -539,17 +539,17 @@ txFnStartLREStylesheet(PRInt32 aNamespac
                        nsIAtom* aLocalName,
                        nsIAtom* aPrefix,
                        txStylesheetAttr* aAttributes,
                        PRInt32 aAttrCount,
                        txStylesheetCompilerState& aState)
 {
     txStylesheetAttr* attr;
     nsresult rv = getStyleAttr(aAttributes, aAttrCount, kNameSpaceID_XSLT,
-                               txXSLTAtoms::version, PR_TRUE, &attr);
+                               nsGkAtoms::version, PR_TRUE, &attr);
     NS_ENSURE_SUCCESS(rv, rv);
 
     txExpandedName nullExpr;
     double prio = Double::NaN;
 
     nsAutoPtr<txPattern> match(new txRootPattern());
     NS_ENSURE_TRUE(match, NS_ERROR_OUT_OF_MEMORY);
 
@@ -596,18 +596,18 @@ txFnStartEmbed(PRInt32 aNamespaceID,
                txStylesheetAttr* aAttributes,
                PRInt32 aAttrCount,
                txStylesheetCompilerState& aState)
 {
     if (!aState.handleEmbeddedSheet()) {
         return NS_OK;
     }
     if (aNamespaceID != kNameSpaceID_XSLT ||
-        (aLocalName != txXSLTAtoms::stylesheet &&
-         aLocalName != txXSLTAtoms::transform)) {
+        (aLocalName != nsGkAtoms::stylesheet &&
+         aLocalName != nsGkAtoms::transform)) {
         return NS_ERROR_XSLT_PARSE_FAILURE;
     }
     return txFnStartStylesheet(aNamespaceID, aLocalName, aPrefix,
                                aAttributes, aAttrCount, aState);
 }
 
 static nsresult
 txFnEndEmbed(txStylesheetCompilerState& aState)
@@ -654,17 +654,17 @@ txFnStartAttributeSet(PRInt32 aNamespace
                       nsIAtom* aLocalName,
                       nsIAtom* aPrefix,
                       txStylesheetAttr* aAttributes,
                       PRInt32 aAttrCount,
                       txStylesheetCompilerState& aState)
 {
     nsresult rv = NS_OK;
     txExpandedName name;
-    rv = getQNameAttr(aAttributes, aAttrCount, txXSLTAtoms::name, PR_TRUE,
+    rv = getQNameAttr(aAttributes, aAttrCount, nsGkAtoms::name, PR_TRUE,
                       aState, name);
     NS_ENSURE_SUCCESS(rv, rv);
 
     nsAutoPtr<txAttributeSetItem> attrSet(new txAttributeSetItem(name));
     NS_ENSURE_TRUE(attrSet, NS_ERROR_OUT_OF_MEMORY);
 
     aState.openInstructionContainer(attrSet);
 
@@ -702,69 +702,69 @@ txFnStartDecimalFormat(PRInt32 aNamespac
                        nsIAtom* aLocalName,
                        nsIAtom* aPrefix,
                        txStylesheetAttr* aAttributes,
                        PRInt32 aAttrCount,
                        txStylesheetCompilerState& aState)
 {
     nsresult rv = NS_OK;
     txExpandedName name;
-    rv = getQNameAttr(aAttributes, aAttrCount, txXSLTAtoms::name, PR_FALSE,
+    rv = getQNameAttr(aAttributes, aAttrCount, nsGkAtoms::name, PR_FALSE,
                       aState, name);
     NS_ENSURE_SUCCESS(rv, rv);
 
     nsAutoPtr<txDecimalFormat> format(new txDecimalFormat);
     NS_ENSURE_TRUE(format, NS_ERROR_OUT_OF_MEMORY);
 
-    rv = getCharAttr(aAttributes, aAttrCount, txXSLTAtoms::decimalSeparator,
+    rv = getCharAttr(aAttributes, aAttrCount, nsGkAtoms::decimalSeparator,
                      PR_FALSE, aState, format->mDecimalSeparator);
     NS_ENSURE_SUCCESS(rv, rv);
 
-    rv = getCharAttr(aAttributes, aAttrCount, txXSLTAtoms::groupingSeparator,
+    rv = getCharAttr(aAttributes, aAttrCount, nsGkAtoms::groupingSeparator,
                      PR_FALSE, aState, format->mGroupingSeparator);
     NS_ENSURE_SUCCESS(rv, rv);
 
     txStylesheetAttr* attr = nsnull;
     rv = getStyleAttr(aAttributes, aAttrCount, kNameSpaceID_None,
-                      txXSLTAtoms::infinity, PR_FALSE, &attr);
+                      nsGkAtoms::infinity, PR_FALSE, &attr);
     NS_ENSURE_SUCCESS(rv, rv);
 
     if (attr) {
         format->mInfinity = attr->mValue;
     }
 
-    rv = getCharAttr(aAttributes, aAttrCount, txXSLTAtoms::minusSign,
+    rv = getCharAttr(aAttributes, aAttrCount, nsGkAtoms::minusSign,
                      PR_FALSE, aState, format->mMinusSign);
     NS_ENSURE_SUCCESS(rv, rv);
 
     rv = getStyleAttr(aAttributes, aAttrCount, kNameSpaceID_None,
-                      txXSLTAtoms::NaN, PR_FALSE, &attr);
+                      nsGkAtoms::NaN, PR_FALSE, &attr);
     NS_ENSURE_SUCCESS(rv, rv);
 
     if (attr) {
         format->mNaN = attr->mValue;
     }
 
-    rv = getCharAttr(aAttributes, aAttrCount, txXSLTAtoms::percent,
+    rv = getCharAttr(aAttributes, aAttrCount, nsGkAtoms::percent,
                      PR_FALSE, aState, format->mPercent);
     NS_ENSURE_SUCCESS(rv, rv);
 
-    rv = getCharAttr(aAttributes, aAttrCount, txXSLTAtoms::perMille,
+    rv = getCharAttr(aAttributes, aAttrCount, nsGkAtoms::perMille,
                      PR_FALSE, aState, format->mPerMille);
     NS_ENSURE_SUCCESS(rv, rv);
 
-    rv = getCharAttr(aAttributes, aAttrCount, txXSLTAtoms::zeroDigit,
+    rv = getCharAttr(aAttributes, aAttrCount, nsGkAtoms::zeroDigit,
                      PR_FALSE, aState, format->mZeroDigit);
     NS_ENSURE_SUCCESS(rv, rv);
 
-    rv = getCharAttr(aAttributes, aAttrCount, txXSLTAtoms::digit,
+    rv = getCharAttr(aAttributes, aAttrCount, nsGkAtoms::digit,
                      PR_FALSE, aState, format->mDigit);
     NS_ENSURE_SUCCESS(rv, rv);
 
-    rv = getCharAttr(aAttributes, aAttrCount, txXSLTAtoms::patternSeparator,
+    rv = getCharAttr(aAttributes, aAttrCount, nsGkAtoms::patternSeparator,
                      PR_FALSE, aState, format->mPatternSeparator);
     NS_ENSURE_SUCCESS(rv, rv);
 
     rv = aState.mStylesheet->addDecimalFormat(name, format);
     NS_ENSURE_SUCCESS(rv, rv);
     
     return aState.pushHandlerTable(gTxIgnoreHandler);
 }
@@ -794,17 +794,17 @@ txFnStartImport(PRInt32 aNamespaceID,
 
     nsresult rv = aState.addToplevelItem(import);
     NS_ENSURE_SUCCESS(rv, rv);
     
     txImportItem* importPtr = import.forget();
     
     txStylesheetAttr* attr = nsnull;
     rv = getStyleAttr(aAttributes, aAttrCount, kNameSpaceID_None,
-                      txXSLTAtoms::href, PR_TRUE, &attr);
+                      nsGkAtoms::href, PR_TRUE, &attr);
     NS_ENSURE_SUCCESS(rv, rv);
 
     nsAutoString absUri;
     URIUtils::resolveHref(attr->mValue, aState.mElementContext->mBaseURI,
                           absUri);
     rv = aState.loadImportedStylesheet(absUri, importPtr->mFrame);
     NS_ENSURE_SUCCESS(rv, rv);
 
@@ -825,17 +825,17 @@ txFnStartInclude(PRInt32 aNamespaceID,
                  nsIAtom* aLocalName,
                  nsIAtom* aPrefix,
                  txStylesheetAttr* aAttributes,
                  PRInt32 aAttrCount,
                  txStylesheetCompilerState& aState)
 {
     txStylesheetAttr* attr = nsnull;
     nsresult rv = getStyleAttr(aAttributes, aAttrCount, kNameSpaceID_None,
-                               txXSLTAtoms::href, PR_TRUE, &attr);
+                               nsGkAtoms::href, PR_TRUE, &attr);
     NS_ENSURE_SUCCESS(rv, rv);
 
     nsAutoString absUri;
     URIUtils::resolveHref(attr->mValue, aState.mElementContext->mBaseURI,
                           absUri);
     rv = aState.loadIncludedStylesheet(absUri);
     NS_ENSURE_SUCCESS(rv, rv);
 
@@ -856,27 +856,27 @@ txFnStartKey(PRInt32 aNamespaceID,
              nsIAtom* aLocalName,
              nsIAtom* aPrefix,
              txStylesheetAttr* aAttributes,
              PRInt32 aAttrCount,
              txStylesheetCompilerState& aState)
 {
     nsresult rv = NS_OK;
     txExpandedName name;
-    rv = getQNameAttr(aAttributes, aAttrCount, txXSLTAtoms::name, PR_TRUE,
+    rv = getQNameAttr(aAttributes, aAttrCount, nsGkAtoms::name, PR_TRUE,
                       aState, name);
     NS_ENSURE_SUCCESS(rv, rv);
 
     nsAutoPtr<txPattern> match;
-    rv = getPatternAttr(aAttributes, aAttrCount, txXSLTAtoms::match, PR_TRUE,
+    rv = getPatternAttr(aAttributes, aAttrCount, nsGkAtoms::match, PR_TRUE,
                         aState, match);
     NS_ENSURE_SUCCESS(rv, rv);
 
     nsAutoPtr<Expr> use;
-    rv = getExprAttr(aAttributes, aAttrCount, txXSLTAtoms::use, PR_TRUE,
+    rv = getExprAttr(aAttributes, aAttrCount, nsGkAtoms::use, PR_TRUE,
                      aState, use);
     NS_ENSURE_SUCCESS(rv, rv);
 
     rv = aState.mStylesheet->addKey(name, match, use);
     NS_ENSURE_SUCCESS(rv, rv);
     
     return aState.pushHandlerTable(gTxIgnoreHandler);
 }
@@ -895,21 +895,21 @@ txFnStartNamespaceAlias(PRInt32 aNamespa
              nsIAtom* aLocalName,
              nsIAtom* aPrefix,
              txStylesheetAttr* aAttributes,
              PRInt32 aAttrCount,
              txStylesheetCompilerState& aState)
 {
     txStylesheetAttr* attr = nsnull;
     nsresult rv = getStyleAttr(aAttributes, aAttrCount, kNameSpaceID_None,
-                               txXSLTAtoms::stylesheetPrefix, PR_TRUE, &attr);
+                               nsGkAtoms::stylesheetPrefix, PR_TRUE, &attr);
     NS_ENSURE_SUCCESS(rv, rv);
 
     rv = getStyleAttr(aAttributes, aAttrCount, kNameSpaceID_None,
-                      txXSLTAtoms::resultPrefix, PR_TRUE, &attr);
+                      nsGkAtoms::resultPrefix, PR_TRUE, &attr);
     NS_ENSURE_SUCCESS(rv, rv);
 
     // XXX Needs to be implemented.
 
     return aState.pushHandlerTable(gTxIgnoreHandler);
 }
 
 static nsresult
@@ -930,76 +930,76 @@ txFnStartOutput(PRInt32 aNamespaceID,
                 txStylesheetCompilerState& aState)
 {
     nsresult rv = NS_OK;
 
     nsAutoPtr<txOutputItem> item(new txOutputItem);
     NS_ENSURE_TRUE(item, NS_ERROR_OUT_OF_MEMORY);
 
     txExpandedName methodExpName;
-    rv = getQNameAttr(aAttributes, aAttrCount, txXSLTAtoms::method, PR_FALSE,
+    rv = getQNameAttr(aAttributes, aAttrCount, nsGkAtoms::method, PR_FALSE,
                       aState, methodExpName);
     NS_ENSURE_SUCCESS(rv, rv);
 
     if (!methodExpName.isNull()) {
         if (methodExpName.mNamespaceID != kNameSpaceID_None) {
             // The spec doesn't say what to do here so we'll just ignore the
             // value. We could possibly warn.
         }
-        else if (methodExpName.mLocalName == txXSLTAtoms::html) {
+        else if (methodExpName.mLocalName == nsGkAtoms::html) {
             item->mFormat.mMethod = eHTMLOutput;
         }
-        else if (methodExpName.mLocalName == txXSLTAtoms::text) {
+        else if (methodExpName.mLocalName == nsGkAtoms::text) {
             item->mFormat.mMethod = eTextOutput;
         }
-        else if (methodExpName.mLocalName == txXSLTAtoms::xml) {
+        else if (methodExpName.mLocalName == nsGkAtoms::xml) {
             item->mFormat.mMethod = eXMLOutput;
         }
         else {
             return NS_ERROR_XSLT_PARSE_FAILURE;
         }
     }
 
     txStylesheetAttr* attr = nsnull;
     getStyleAttr(aAttributes, aAttrCount, kNameSpaceID_None,
-                 txXSLTAtoms::version, PR_FALSE, &attr);
+                 nsGkAtoms::version, PR_FALSE, &attr);
     if (attr) {
         item->mFormat.mVersion = attr->mValue;
     }
 
     getStyleAttr(aAttributes, aAttrCount, kNameSpaceID_None,
-                 txXSLTAtoms::encoding, PR_FALSE, &attr);
+                 nsGkAtoms::encoding, PR_FALSE, &attr);
     if (attr) {
         item->mFormat.mEncoding = attr->mValue;
     }
 
     rv = getYesNoAttr(aAttributes, aAttrCount,
-                      txXSLTAtoms::omitXmlDeclaration, PR_FALSE, aState,
+                      nsGkAtoms::omitXmlDeclaration, PR_FALSE, aState,
                       item->mFormat.mOmitXMLDeclaration);
     NS_ENSURE_SUCCESS(rv, rv);
 
     rv = getYesNoAttr(aAttributes, aAttrCount,
-                      txXSLTAtoms::standalone, PR_FALSE, aState,
+                      nsGkAtoms::standalone, PR_FALSE, aState,
                       item->mFormat.mStandalone);
     NS_ENSURE_SUCCESS(rv, rv);
 
     getStyleAttr(aAttributes, aAttrCount, kNameSpaceID_None,
-                 txXSLTAtoms::doctypePublic, PR_FALSE, &attr);
+                 nsGkAtoms::doctypePublic, PR_FALSE, &attr);
     if (attr) {
         item->mFormat.mPublicId = attr->mValue;
     }
 
     getStyleAttr(aAttributes, aAttrCount, kNameSpaceID_None,
-                 txXSLTAtoms::doctypeSystem, PR_FALSE, &attr);
+                 nsGkAtoms::doctypeSystem, PR_FALSE, &attr);
     if (attr) {
         item->mFormat.mSystemId = attr->mValue;
     }
 
     getStyleAttr(aAttributes, aAttrCount, kNameSpaceID_None,
-                 txXSLTAtoms::cdataSectionElements, PR_FALSE, &attr);
+                 nsGkAtoms::cdataSectionElements, PR_FALSE, &attr);
     if (attr) {
         nsWhitespaceTokenizer tokens(attr->mValue);
         while (tokens.hasMoreTokens()) {
             nsAutoPtr<txExpandedName> qname(new txExpandedName());
             NS_ENSURE_TRUE(qname, NS_ERROR_OUT_OF_MEMORY);
 
             rv = qname->init(tokens.nextToken(),
                              aState.mElementContext->mMappings, PR_FALSE);
@@ -1007,22 +1007,22 @@ txFnStartOutput(PRInt32 aNamespaceID,
 
             rv = item->mFormat.mCDATASectionElements.add(qname);
             NS_ENSURE_SUCCESS(rv, rv);
             qname.forget();
         }
     }
 
     rv = getYesNoAttr(aAttributes, aAttrCount,
-                      txXSLTAtoms::indent, PR_FALSE, aState,
+                      nsGkAtoms::indent, PR_FALSE, aState,
                       item->mFormat.mIndent);
     NS_ENSURE_SUCCESS(rv, rv);
 
     getStyleAttr(aAttributes, aAttrCount, kNameSpaceID_None,
-                 txXSLTAtoms::mediaType, PR_FALSE, &attr);
+                 nsGkAtoms::mediaType, PR_FALSE, &attr);
     if (attr) {
         item->mFormat.mMediaType = attr->mValue;
     }
 
     rv = aState.addToplevelItem(item);
     NS_ENSURE_SUCCESS(rv, rv);
     
     item.forget();
@@ -1044,20 +1044,20 @@ txFnStartStripSpace(PRInt32 aNamespaceID
                     nsIAtom* aLocalName,
                     nsIAtom* aPrefix,
                     txStylesheetAttr* aAttributes,
                     PRInt32 aAttrCount,
                     txStylesheetCompilerState& aState)
 {
     txStylesheetAttr* attr = nsnull;
     nsresult rv = getStyleAttr(aAttributes, aAttrCount, kNameSpaceID_None,
-                               txXSLTAtoms::elements, PR_TRUE, &attr);
+                               nsGkAtoms::elements, PR_TRUE, &attr);
     NS_ENSURE_SUCCESS(rv, rv);
 
-    PRBool strip = aLocalName == txXSLTAtoms::stripSpace;
+    PRBool strip = aLocalName == nsGkAtoms::stripSpace;
 
     nsAutoPtr<txStripSpaceItem> stripItem(new txStripSpaceItem);
     NS_ENSURE_TRUE(stripItem, NS_ERROR_OUT_OF_MEMORY);
 
     nsWhitespaceTokenizer tokenizer(attr->mValue);
     while (tokenizer.hasMoreTokens()) {
         const nsASingleFragmentString& name = tokenizer.nextToken();
         PRInt32 ns = kNameSpaceID_None;
@@ -1084,17 +1084,17 @@ txFnStartStripSpace(PRInt32 aNamespaceID
                                           getter_AddRefs(prefix),
                                           getter_AddRefs(localName));
                 if (NS_FAILED(rv) || prefix) {
                     // bad chars or two ':'
                     return NS_ERROR_XSLT_PARSE_FAILURE;
                 }
                 prefix = localName;
             }
-            localName = txXPathAtoms::_asterix;
+            localName = nsGkAtoms::_asterix;
         }
         if (prefix) {
             ns = aState.mElementContext->mMappings->lookupNamespace(prefix);
             NS_ENSURE_TRUE(ns != kNameSpaceID_Unknown, NS_ERROR_FAILURE);
         }
         nsAutoPtr<txStripSpaceTest> sst(new txStripSpaceTest(prefix, localName,
                                                              ns, strip));
         NS_ENSURE_TRUE(sst, NS_ERROR_OUT_OF_MEMORY);
@@ -1127,32 +1127,32 @@ txFnStartTemplate(PRInt32 aNamespaceID,
                   nsIAtom* aLocalName,
                   nsIAtom* aPrefix,
                   txStylesheetAttr* aAttributes,
                   PRInt32 aAttrCount,
                   txStylesheetCompilerState& aState)
 {
     nsresult rv = NS_OK;
     txExpandedName name;
-    rv = getQNameAttr(aAttributes, aAttrCount, txXSLTAtoms::name, PR_FALSE,
+    rv = getQNameAttr(aAttributes, aAttrCount, nsGkAtoms::name, PR_FALSE,
                       aState, name);
     NS_ENSURE_SUCCESS(rv, rv);
 
     txExpandedName mode;
-    rv = getQNameAttr(aAttributes, aAttrCount, txXSLTAtoms::mode, PR_FALSE,
+    rv = getQNameAttr(aAttributes, aAttrCount, nsGkAtoms::mode, PR_FALSE,
                       aState, mode);
     NS_ENSURE_SUCCESS(rv, rv);
 
     double prio = Double::NaN;
-    rv = getNumberAttr(aAttributes, aAttrCount, txXSLTAtoms::priority,
+    rv = getNumberAttr(aAttributes, aAttrCount, nsGkAtoms::priority,
                        PR_FALSE, aState, prio);
     NS_ENSURE_SUCCESS(rv, rv);
 
     nsAutoPtr<txPattern> match;
-    rv = getPatternAttr(aAttributes, aAttrCount, txXSLTAtoms::match,
+    rv = getPatternAttr(aAttributes, aAttrCount, nsGkAtoms::match,
                         name.isNull(), aState, match);
     NS_ENSURE_SUCCESS(rv, rv);
 
     nsAutoPtr<txTemplateItem> templ(new txTemplateItem(match, name, mode, prio));
     NS_ENSURE_TRUE(templ, NS_ERROR_OUT_OF_MEMORY);
 
     aState.openInstructionContainer(templ);
     rv = aState.addToplevelItem(templ);
@@ -1185,27 +1185,27 @@ txFnStartTopVariable(PRInt32 aNamespaceI
                      nsIAtom* aLocalName,
                      nsIAtom* aPrefix,
                      txStylesheetAttr* aAttributes,
                      PRInt32 aAttrCount,
                      txStylesheetCompilerState& aState)
 {
     nsresult rv = NS_OK;
     txExpandedName name;
-    rv = getQNameAttr(aAttributes, aAttrCount, txXSLTAtoms::name, PR_TRUE,
+    rv = getQNameAttr(aAttributes, aAttrCount, nsGkAtoms::name, PR_TRUE,
                       aState, name);
     NS_ENSURE_SUCCESS(rv, rv);
 
     nsAutoPtr<Expr> select;
-    rv = getExprAttr(aAttributes, aAttrCount, txXSLTAtoms::select, PR_FALSE,
+    rv = getExprAttr(aAttributes, aAttrCount, nsGkAtoms::select, PR_FALSE,
                      aState, select);
     NS_ENSURE_SUCCESS(rv, rv);
 
     nsAutoPtr<txVariableItem> var(
-        new txVariableItem(name, select, aLocalName == txXSLTAtoms::param));
+        new txVariableItem(name, select, aLocalName == nsGkAtoms::param));
     NS_ENSURE_TRUE(var, NS_ERROR_OUT_OF_MEMORY);
 
     aState.openInstructionContainer(var);
     rv = aState.pushPtr(var);
     NS_ENSURE_SUCCESS(rv, rv);
 
     if (var->mValue) {
         // XXX should be gTxErrorHandler?
@@ -1313,17 +1313,17 @@ txFnStartLRE(PRInt32 aNamespaceID,
     NS_ENSURE_SUCCESS(rv, rv);
 
     txStylesheetAttr* attr = nsnull;
     PRInt32 i;
     for (i = 0; i < aAttrCount; ++i) {
         attr = aAttributes + i;
         
         if (attr->mNamespaceID == kNameSpaceID_XSLT) {
-            if (attr->mLocalName == txXSLTAtoms::version) {
+            if (attr->mLocalName == nsGkAtoms::version) {
                 attr->mLocalName = nsnull;
             }
 
             continue;
         }
 
         nsAutoPtr<Expr> avt;
         rv = txExprParser::createAVT(attr->mValue, &aState,
@@ -1433,30 +1433,30 @@ txFnStartApplyTemplates(PRInt32 aNamespa
 
     nsAutoPtr<txInstruction> instr(new txPushParams);
     NS_ENSURE_TRUE(instr, NS_ERROR_OUT_OF_MEMORY);
 
     rv = aState.addInstruction(instr);
     NS_ENSURE_SUCCESS(rv, rv);
 
     txExpandedName mode;
-    rv = getQNameAttr(aAttributes, aAttrCount, txXSLTAtoms::mode, PR_FALSE,
+    rv = getQNameAttr(aAttributes, aAttrCount, nsGkAtoms::mode, PR_FALSE,
                       aState, mode);
     NS_ENSURE_SUCCESS(rv, rv);
 
     instr = new txApplyTemplates(mode);
     NS_ENSURE_TRUE(instr, NS_ERROR_OUT_OF_MEMORY);
 
     rv = aState.pushObject(instr);
     NS_ENSURE_SUCCESS(rv, rv);
 
     instr.forget();
 
     nsAutoPtr<Expr> select;
-    rv = getExprAttr(aAttributes, aAttrCount, txXSLTAtoms::select, PR_FALSE,
+    rv = getExprAttr(aAttributes, aAttrCount, nsGkAtoms::select, PR_FALSE,
                      aState, select);
     NS_ENSURE_SUCCESS(rv, rv);
 
     if (!select) {
         nsAutoPtr<txNodeTest> nt(
             new txNodeTypeTest(txNodeTypeTest::NODE_TYPE));
         NS_ENSURE_TRUE(nt, NS_ERROR_OUT_OF_MEMORY);
 
@@ -1533,22 +1533,22 @@ txFnStartAttribute(PRInt32 aNamespaceID,
 
     nsAutoPtr<txInstruction> instr(new txPushStringHandler(PR_TRUE));
     NS_ENSURE_TRUE(instr, NS_ERROR_OUT_OF_MEMORY);
 
     rv = aState.addInstruction(instr);
     NS_ENSURE_SUCCESS(rv, rv);
 
     nsAutoPtr<Expr> name;
-    rv = getAVTAttr(aAttributes, aAttrCount, txXSLTAtoms::name, PR_TRUE,
+    rv = getAVTAttr(aAttributes, aAttrCount, nsGkAtoms::name, PR_TRUE,
                     aState, name);
     NS_ENSURE_SUCCESS(rv, rv);
 
     nsAutoPtr<Expr> nspace;
-    rv = getAVTAttr(aAttributes, aAttrCount, txXSLTAtoms::_namespace, PR_FALSE,
+    rv = getAVTAttr(aAttributes, aAttrCount, nsGkAtoms::_namespace, PR_FALSE,
                     aState, nspace);
     NS_ENSURE_SUCCESS(rv, rv);
 
     instr = new txAttribute(name, nspace, aState.mElementContext->mMappings);
     NS_ENSURE_TRUE(instr, NS_ERROR_OUT_OF_MEMORY);
 
     rv = aState.pushObject(instr);
     NS_ENSURE_SUCCESS(rv, rv);
@@ -1592,17 +1592,17 @@ txFnStartCallTemplate(PRInt32 aNamespace
 
     nsAutoPtr<txInstruction> instr(new txPushParams);
     NS_ENSURE_TRUE(instr, NS_ERROR_OUT_OF_MEMORY);
 
     rv = aState.addInstruction(instr);
     NS_ENSURE_SUCCESS(rv, rv);
 
     txExpandedName name;
-    rv = getQNameAttr(aAttributes, aAttrCount, txXSLTAtoms::name, PR_TRUE,
+    rv = getQNameAttr(aAttributes, aAttrCount, nsGkAtoms::name, PR_TRUE,
                       aState, name);
     NS_ENSURE_SUCCESS(rv, rv);
 
     instr = new txCallTemplate(name);
     NS_ENSURE_TRUE(instr, NS_ERROR_OUT_OF_MEMORY);
 
     rv = aState.pushObject(instr);
     NS_ENSURE_SUCCESS(rv, rv);
@@ -1772,17 +1772,17 @@ txFnStartCopyOf(PRInt32 aNamespaceID,
                 nsIAtom* aPrefix,
                 txStylesheetAttr* aAttributes,
                 PRInt32 aAttrCount,
                 txStylesheetCompilerState& aState)
 {
     nsresult rv = NS_OK;
 
     nsAutoPtr<Expr> select;
-    rv = getExprAttr(aAttributes, aAttrCount, txXSLTAtoms::select, PR_TRUE,
+    rv = getExprAttr(aAttributes, aAttrCount, nsGkAtoms::select, PR_TRUE,
                     aState, select);
     NS_ENSURE_SUCCESS(rv, rv);
 
     nsAutoPtr<txInstruction> instr(new txCopyOf(select));
     NS_ENSURE_TRUE(instr, NS_ERROR_OUT_OF_MEMORY);
     
     rv = aState.addInstruction(instr);
     NS_ENSURE_SUCCESS(rv, rv);
@@ -1811,22 +1811,22 @@ txFnStartElement(PRInt32 aNamespaceID,
                  nsIAtom* aPrefix,
                  txStylesheetAttr* aAttributes,
                  PRInt32 aAttrCount,
                  txStylesheetCompilerState& aState)
 {
     nsresult rv = NS_OK;
 
     nsAutoPtr<Expr> name;
-    rv = getAVTAttr(aAttributes, aAttrCount, txXSLTAtoms::name, PR_TRUE,
+    rv = getAVTAttr(aAttributes, aAttrCount, nsGkAtoms::name, PR_TRUE,
                     aState, name);
     NS_ENSURE_SUCCESS(rv, rv);
 
     nsAutoPtr<Expr> nspace;
-    rv = getAVTAttr(aAttributes, aAttrCount, txXSLTAtoms::_namespace, PR_FALSE,
+    rv = getAVTAttr(aAttributes, aAttrCount, nsGkAtoms::_namespace, PR_FALSE,
                     aState, nspace);
     NS_ENSURE_SUCCESS(rv, rv);
 
     nsAutoPtr<txInstruction> instr(
         new txStartElement(name, nspace, aState.mElementContext->mMappings));
     NS_ENSURE_TRUE(instr, NS_ERROR_OUT_OF_MEMORY);
 
     rv = aState.addInstruction(instr);
@@ -1893,17 +1893,17 @@ txFnStartForEach(PRInt32 aNamespaceID,
                  nsIAtom* aPrefix,
                  txStylesheetAttr* aAttributes,
                  PRInt32 aAttrCount,
                  txStylesheetCompilerState& aState)
 {
     nsresult rv = NS_OK;
 
     nsAutoPtr<Expr> select;
-    rv = getExprAttr(aAttributes, aAttrCount, txXSLTAtoms::select, PR_TRUE,
+    rv = getExprAttr(aAttributes, aAttrCount, nsGkAtoms::select, PR_TRUE,
                      aState, select);
     NS_ENSURE_SUCCESS(rv, rv);
 
     nsAutoPtr<txPushNewContext> pushcontext(new txPushNewContext(select));
     NS_ENSURE_TRUE(pushcontext, NS_ERROR_OUT_OF_MEMORY);
 
     rv = aState.pushPtr(pushcontext);
     NS_ENSURE_SUCCESS(rv, rv);
@@ -1985,17 +1985,17 @@ txFnStartIf(PRInt32 aNamespaceID,
             nsIAtom* aPrefix,
             txStylesheetAttr* aAttributes,
             PRInt32 aAttrCount,
             txStylesheetCompilerState& aState)
 {
     nsresult rv = NS_OK;
 
     nsAutoPtr<Expr> test;
-    rv = getExprAttr(aAttributes, aAttrCount, txXSLTAtoms::test, PR_TRUE,
+    rv = getExprAttr(aAttributes, aAttrCount, nsGkAtoms::test, PR_TRUE,
                      aState, test);
     NS_ENSURE_SUCCESS(rv, rv);
 
     nsAutoPtr<txConditionalGoto> condGoto(new txConditionalGoto(test, nsnull));
     NS_ENSURE_TRUE(condGoto, NS_ERROR_OUT_OF_MEMORY);
 
     rv = aState.pushPtr(condGoto);
     NS_ENSURE_SUCCESS(rv, rv);
@@ -2032,17 +2032,17 @@ txFnStartMessage(PRInt32 aNamespaceID,
 {
     nsAutoPtr<txInstruction> instr(new txPushStringHandler(PR_FALSE));
     NS_ENSURE_TRUE(instr, NS_ERROR_OUT_OF_MEMORY);
 
     nsresult rv = aState.addInstruction(instr);
     NS_ENSURE_SUCCESS(rv, rv);
 
     txThreeState term;
-    rv = getYesNoAttr(aAttributes, aAttrCount, txXSLTAtoms::terminate,
+    rv = getYesNoAttr(aAttributes, aAttrCount, nsGkAtoms::terminate,
                       PR_FALSE, aState, term);
     NS_ENSURE_SUCCESS(rv, rv);
 
     instr = new txMessage(term == eTrue);
     NS_ENSURE_TRUE(instr, NS_ERROR_OUT_OF_MEMORY);
 
     rv = aState.pushObject(instr);
     NS_ENSURE_SUCCESS(rv, rv);
@@ -2073,68 +2073,68 @@ txFnStartNumber(PRInt32 aNamespaceID,
                 nsIAtom* aPrefix,
                 txStylesheetAttr* aAttributes,
                 PRInt32 aAttrCount,
                 txStylesheetCompilerState& aState)
 {
     nsresult rv = NS_OK;
 
     nsCOMPtr<nsIAtom> levelAtom;
-    rv = getAtomAttr(aAttributes, aAttrCount, txXSLTAtoms::level, PR_FALSE,
+    rv = getAtomAttr(aAttributes, aAttrCount, nsGkAtoms::level, PR_FALSE,
                      aState, getter_AddRefs(levelAtom));
     NS_ENSURE_SUCCESS(rv, rv);
     
     txXSLTNumber::LevelType level = txXSLTNumber::eLevelSingle;
-    if (levelAtom == txXSLTAtoms::multiple) {
+    if (levelAtom == nsGkAtoms::multiple) {
         level = txXSLTNumber::eLevelMultiple;
     }
-    else if (levelAtom == txXSLTAtoms::any) {
+    else if (levelAtom == nsGkAtoms::any) {
         level = txXSLTNumber::eLevelAny;
     }
-    else if (levelAtom && levelAtom != txXSLTAtoms::single && !aState.fcp()) {
+    else if (levelAtom && levelAtom != nsGkAtoms::single && !aState.fcp()) {
         return NS_ERROR_XSLT_PARSE_FAILURE;
     }
     
     nsAutoPtr<txPattern> count;
-    rv = getPatternAttr(aAttributes, aAttrCount, txXSLTAtoms::count, PR_FALSE,
+    rv = getPatternAttr(aAttributes, aAttrCount, nsGkAtoms::count, PR_FALSE,
                         aState, count);
     NS_ENSURE_SUCCESS(rv, rv);
     
     nsAutoPtr<txPattern> from;
-    rv = getPatternAttr(aAttributes, aAttrCount, txXSLTAtoms::from, PR_FALSE,
+    rv = getPatternAttr(aAttributes, aAttrCount, nsGkAtoms::from, PR_FALSE,
                         aState, from);
     NS_ENSURE_SUCCESS(rv, rv);
 
     nsAutoPtr<Expr> value;
-    rv = getExprAttr(aAttributes, aAttrCount, txXSLTAtoms::value, PR_FALSE,
+    rv = getExprAttr(aAttributes, aAttrCount, nsGkAtoms::value, PR_FALSE,
                      aState, value);
     NS_ENSURE_SUCCESS(rv, rv);
 
     nsAutoPtr<Expr> format;
-    rv = getAVTAttr(aAttributes, aAttrCount, txXSLTAtoms::format, PR_FALSE,
+    rv = getAVTAttr(aAttributes, aAttrCount, nsGkAtoms::format, PR_FALSE,
                     aState, format);
     NS_ENSURE_SUCCESS(rv, rv);
     
     nsAutoPtr<Expr> lang;
-    rv = getAVTAttr(aAttributes, aAttrCount, txXSLTAtoms::lang, PR_FALSE,
+    rv = getAVTAttr(aAttributes, aAttrCount, nsGkAtoms::lang, PR_FALSE,
                       aState, lang);
     NS_ENSURE_SUCCESS(rv, rv);
     
     nsAutoPtr<Expr> letterValue;
-    rv = getAVTAttr(aAttributes, aAttrCount, txXSLTAtoms::letterValue, PR_FALSE,
+    rv = getAVTAttr(aAttributes, aAttrCount, nsGkAtoms::letterValue, PR_FALSE,
                     aState, letterValue);
     NS_ENSURE_SUCCESS(rv, rv);
     
     nsAutoPtr<Expr> groupingSeparator;
-    rv = getAVTAttr(aAttributes, aAttrCount, txXSLTAtoms::groupingSeparator,
+    rv = getAVTAttr(aAttributes, aAttrCount, nsGkAtoms::groupingSeparator,
                     PR_FALSE, aState, groupingSeparator);
     NS_ENSURE_SUCCESS(rv, rv);
     
     nsAutoPtr<Expr> groupingSize;
-    rv = getAVTAttr(aAttributes, aAttrCount, txXSLTAtoms::groupingSize,
+    rv = getAVTAttr(aAttributes, aAttrCount, nsGkAtoms::groupingSize,
                     PR_FALSE, aState, groupingSize);
     NS_ENSURE_SUCCESS(rv, rv);
     
     nsAutoPtr<txInstruction> instr(new txNumber(level, count, from, value,
                                                 format,groupingSeparator,
                                                 groupingSize));
     NS_ENSURE_TRUE(instr, NS_ERROR_OUT_OF_MEMORY);
     
@@ -2192,32 +2192,32 @@ txFnStartParam(PRInt32 aNamespaceID,
                nsIAtom* aPrefix,
                txStylesheetAttr* aAttributes,
                PRInt32 aAttrCount,
                txStylesheetCompilerState& aState)
 {
     nsresult rv = NS_OK;
 
     txExpandedName name;
-    rv = getQNameAttr(aAttributes, aAttrCount, txXSLTAtoms::name, PR_TRUE,
+    rv = getQNameAttr(aAttributes, aAttrCount, nsGkAtoms::name, PR_TRUE,
                       aState, name);
     NS_ENSURE_SUCCESS(rv, rv);
 
     nsAutoPtr<txCheckParam> checkParam(new txCheckParam(name));
     NS_ENSURE_SUCCESS(rv, rv);
     
     rv = aState.pushPtr(checkParam);
     NS_ENSURE_SUCCESS(rv, rv);
 
     nsAutoPtr<txInstruction> instr(checkParam.forget());
     rv = aState.addInstruction(instr);
     NS_ENSURE_SUCCESS(rv, rv);
 
     nsAutoPtr<Expr> select;
-    rv = getExprAttr(aAttributes, aAttrCount, txXSLTAtoms::select, PR_FALSE,
+    rv = getExprAttr(aAttributes, aAttrCount, nsGkAtoms::select, PR_FALSE,
                      aState, select);
     NS_ENSURE_SUCCESS(rv, rv);
 
     nsAutoPtr<txSetVariable> var(new txSetVariable(name, select));
     NS_ENSURE_TRUE(var, NS_ERROR_OUT_OF_MEMORY);
 
     if (var->mValue) {
         // XXX should be gTxErrorHandler?
@@ -2283,17 +2283,17 @@ txFnStartPI(PRInt32 aNamespaceID,
 {
     nsAutoPtr<txInstruction> instr(new txPushStringHandler(PR_TRUE));
     NS_ENSURE_TRUE(instr, NS_ERROR_OUT_OF_MEMORY);
 
     nsresult rv = aState.addInstruction(instr);
     NS_ENSURE_SUCCESS(rv, rv);
 
     nsAutoPtr<Expr> name;
-    rv = getAVTAttr(aAttributes, aAttrCount, txXSLTAtoms::name, PR_TRUE,
+    rv = getAVTAttr(aAttributes, aAttrCount, nsGkAtoms::name, PR_TRUE,
                     aState, name);
     NS_ENSURE_SUCCESS(rv, rv);
 
     instr = new txProcessingInstruction(name);
     NS_ENSURE_TRUE(instr, NS_ERROR_OUT_OF_MEMORY);
 
     rv = aState.pushObject(instr);
     NS_ENSURE_SUCCESS(rv, rv);
@@ -2325,48 +2325,48 @@ txFnStartSort(PRInt32 aNamespaceID,
               nsIAtom* aPrefix,
               txStylesheetAttr* aAttributes,
               PRInt32 aAttrCount,
               txStylesheetCompilerState& aState)
 {
     nsresult rv = NS_OK;
 
     nsAutoPtr<Expr> select;
-    rv = getExprAttr(aAttributes, aAttrCount, txXSLTAtoms::select, PR_FALSE,
+    rv = getExprAttr(aAttributes, aAttrCount, nsGkAtoms::select, PR_FALSE,
                      aState, select);
     NS_ENSURE_SUCCESS(rv, rv);
 
     if (!select) {
         nsAutoPtr<txNodeTest> nt(
               new txNodeTypeTest(txNodeTypeTest::NODE_TYPE));
         NS_ENSURE_TRUE(nt, NS_ERROR_OUT_OF_MEMORY);
 
         select = new LocationStep(nt, LocationStep::SELF_AXIS);
         NS_ENSURE_TRUE(select, NS_ERROR_OUT_OF_MEMORY);
 
         nt.forget();
     }
 
     nsAutoPtr<Expr> lang;
-    rv = getAVTAttr(aAttributes, aAttrCount, txXSLTAtoms::lang, PR_FALSE,
+    rv = getAVTAttr(aAttributes, aAttrCount, nsGkAtoms::lang, PR_FALSE,
                     aState, lang);
     NS_ENSURE_SUCCESS(rv, rv);
 
     nsAutoPtr<Expr> dataType;
-    rv = getAVTAttr(aAttributes, aAttrCount, txXSLTAtoms::dataType, PR_FALSE,
+    rv = getAVTAttr(aAttributes, aAttrCount, nsGkAtoms::dataType, PR_FALSE,
                     aState, dataType);
     NS_ENSURE_SUCCESS(rv, rv);
 
     nsAutoPtr<Expr> order;
-    rv = getAVTAttr(aAttributes, aAttrCount, txXSLTAtoms::order, PR_FALSE,
+    rv = getAVTAttr(aAttributes, aAttrCount, nsGkAtoms::order, PR_FALSE,
                     aState, order);
     NS_ENSURE_SUCCESS(rv, rv);
 
     nsAutoPtr<Expr> caseOrder;
-    rv = getAVTAttr(aAttributes, aAttrCount, txXSLTAtoms::caseOrder, PR_FALSE,
+    rv = getAVTAttr(aAttributes, aAttrCount, nsGkAtoms::caseOrder, PR_FALSE,
                     aState, caseOrder);
     NS_ENSURE_SUCCESS(rv, rv);
 
     rv = aState.mSorter->addSort(select, lang, dataType, order, caseOrder);
     NS_ENSURE_SUCCESS(rv, rv);
 
     return aState.pushHandlerTable(gTxIgnoreHandler);
 }
@@ -2392,17 +2392,17 @@ txFnStartText(PRInt32 aNamespaceID,
               PRInt32 aAttrCount,
               txStylesheetCompilerState& aState)
 {
     NS_ASSERTION(!aState.mDOE, "nested d-o-e elements should not happen");
 
     nsresult rv = NS_OK;
     txThreeState doe;
     rv = getYesNoAttr(aAttributes, aAttrCount,
-                      txXSLTAtoms::disableOutputEscaping, PR_FALSE, aState,
+                      nsGkAtoms::disableOutputEscaping, PR_FALSE, aState,
                       doe);
     NS_ENSURE_SUCCESS(rv, rv);
 
     aState.mDOE = doe == eTrue;
 
     return aState.pushHandlerTable(gTxTextHandler);
 }
 
@@ -2438,22 +2438,22 @@ txFnStartValueOf(PRInt32 aNamespaceID,
                  txStylesheetAttr* aAttributes,
                  PRInt32 aAttrCount,
                  txStylesheetCompilerState& aState)
 {
     nsresult rv = NS_OK;
 
     txThreeState doe;
     rv = getYesNoAttr(aAttributes, aAttrCount,
-                     txXSLTAtoms::disableOutputEscaping, PR_FALSE, aState,
+                     nsGkAtoms::disableOutputEscaping, PR_FALSE, aState,
                      doe);
     NS_ENSURE_SUCCESS(rv, rv);
 
     nsAutoPtr<Expr> select;
-    rv = getExprAttr(aAttributes, aAttrCount, txXSLTAtoms::select, PR_TRUE,
+    rv = getExprAttr(aAttributes, aAttrCount, nsGkAtoms::select, PR_TRUE,
                      aState, select);
     NS_ENSURE_SUCCESS(rv, rv);
 
     nsAutoPtr<txInstruction> instr(new txValueOf(select, doe == eTrue));
     NS_ENSURE_TRUE(instr, NS_ERROR_OUT_OF_MEMORY);
 
     rv = aState.addInstruction(instr);
     NS_ENSURE_SUCCESS(rv, rv);
@@ -2481,22 +2481,22 @@ txFnStartVariable(PRInt32 aNamespaceID,
                   nsIAtom* aPrefix,
                   txStylesheetAttr* aAttributes,
                   PRInt32 aAttrCount,
                   txStylesheetCompilerState& aState)
 {
     nsresult rv = NS_OK;
 
     txExpandedName name;
-    rv = getQNameAttr(aAttributes, aAttrCount, txXSLTAtoms::name, PR_TRUE,
+    rv = getQNameAttr(aAttributes, aAttrCount, nsGkAtoms::name, PR_TRUE,
                       aState, name);
     NS_ENSURE_SUCCESS(rv, rv);
 
     nsAutoPtr<Expr> select;
-    rv = getExprAttr(aAttributes, aAttrCount, txXSLTAtoms::select, PR_FALSE,
+    rv = getExprAttr(aAttributes, aAttrCount, nsGkAtoms::select, PR_FALSE,
                      aState, select);
     NS_ENSURE_SUCCESS(rv, rv);
 
     nsAutoPtr<txSetVariable> var(new txSetVariable(name, select));
     NS_ENSURE_TRUE(var, NS_ERROR_OUT_OF_MEMORY);
 
     if (var->mValue) {
         // XXX should be gTxErrorHandler?
@@ -2589,17 +2589,17 @@ txFnStartWhen(PRInt32 aNamespaceID,
               nsIAtom* aPrefix,
               txStylesheetAttr* aAttributes,
               PRInt32 aAttrCount,
               txStylesheetCompilerState& aState)
 {
     nsresult rv = NS_OK;
 
     nsAutoPtr<Expr> test;
-    rv = getExprAttr(aAttributes, aAttrCount, txXSLTAtoms::test, PR_TRUE,
+    rv = getExprAttr(aAttributes, aAttrCount, nsGkAtoms::test, PR_TRUE,
                      aState, test);
     NS_ENSURE_SUCCESS(rv, rv);
 
     nsAutoPtr<txConditionalGoto> condGoto(new txConditionalGoto(test, nsnull));
     NS_ENSURE_TRUE(condGoto, NS_ERROR_OUT_OF_MEMORY);
 
     rv = aState.pushPtr(condGoto);
     NS_ENSURE_SUCCESS(rv, rv);
@@ -2646,22 +2646,22 @@ txFnStartWithParam(PRInt32 aNamespaceID,
                    nsIAtom* aPrefix,
                    txStylesheetAttr* aAttributes,
                    PRInt32 aAttrCount,
                    txStylesheetCompilerState& aState)
 {
     nsresult rv = NS_OK;
 
     txExpandedName name;
-    rv = getQNameAttr(aAttributes, aAttrCount, txXSLTAtoms::name, PR_TRUE,
+    rv = getQNameAttr(aAttributes, aAttrCount, nsGkAtoms::name, PR_TRUE,
                       aState, name);
     NS_ENSURE_SUCCESS(rv, rv);
 
     nsAutoPtr<Expr> select;
-    rv = getExprAttr(aAttributes, aAttrCount, txXSLTAtoms::select, PR_FALSE,
+    rv = getExprAttr(aAttributes, aAttrCount, nsGkAtoms::select, PR_FALSE,
                      aState, select);
     NS_ENSURE_SUCCESS(rv, rv);
 
     nsAutoPtr<txSetParam> var(new txSetParam(name, select));
     NS_ENSURE_TRUE(var, NS_ERROR_OUT_OF_MEMORY);
 
     if (var->mValue) {
         // XXX should be gTxErrorHandler?
--- a/content/xslt/src/xslt/txStylesheetCompiler.cpp
+++ b/content/xslt/src/xslt/txStylesheetCompiler.cpp
@@ -33,17 +33,17 @@
  * 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 "txStylesheetCompiler.h"
 #include "txStylesheetCompileHandlers.h"
-#include "txAtoms.h"
+#include "nsGkAtoms.h"
 #include "txURIUtils.h"
 #include "nsWhitespaceTokenizer.h"
 #include "txStylesheet.h"
 #include "txInstructions.h"
 #include "txToplevelItems.h"
 #include "txExprParser.h"
 #include "txLog.h"
 #include "txPatternParser.h"
@@ -109,17 +109,17 @@ txStylesheetCompiler::startElement(PRInt
             if (!hasOwnNamespaceMap) {
                 mElementContext->mMappings =
                     new txNamespaceMap(*mElementContext->mMappings);
                 NS_ENSURE_TRUE(mElementContext->mMappings,
                                NS_ERROR_OUT_OF_MEMORY);
                 hasOwnNamespaceMap = PR_TRUE;
             }
 
-            if (attr->mLocalName == txXMLAtoms::xmlns) {
+            if (attr->mLocalName == nsGkAtoms::xmlns) {
                 mElementContext->mMappings->mapNamespace(nsnull, attr->mValue);
             }
             else {
                 mElementContext->mMappings->
                     mapNamespace(attr->mLocalName, attr->mValue);
             }
         }
     }
@@ -154,21 +154,21 @@ txStylesheetCompiler::startElement(const
         rv = XMLUtils::splitExpatName(aAttrs[i * 2],
                                       getter_AddRefs(atts[i].mPrefix),
                                       getter_AddRefs(atts[i].mLocalName),
                                       &atts[i].mNamespaceID);
         NS_ENSURE_SUCCESS(rv, rv);
         atts[i].mValue.Append(aAttrs[i * 2 + 1]);
 
         nsCOMPtr<nsIAtom> prefixToBind;
-        if (atts[i].mPrefix == txXMLAtoms::xmlns) {
+        if (atts[i].mPrefix == nsGkAtoms::xmlns) {
             prefixToBind = atts[i].mLocalName;
         }
         else if (atts[i].mNamespaceID == kNameSpaceID_XMLNS) {
-            prefixToBind = txXMLAtoms::_empty;
+            prefixToBind = nsGkAtoms::_empty;
         }
 
         if (prefixToBind) {
             rv = ensureNewElementContext();
             NS_ENSURE_SUCCESS(rv, rv);
 
             if (!hasOwnNamespaceMap) {
                 mElementContext->mMappings =
@@ -213,52 +213,52 @@ txStylesheetCompiler::startElementIntern
     }
 
     // Update the elementcontext if we have special attributes
     for (i = 0; i < aAttrCount; ++i) {
         txStylesheetAttr* attr = aAttributes + i;
 
         // xml:space
         if (attr->mNamespaceID == kNameSpaceID_XML &&
-            attr->mLocalName == txXMLAtoms::space) {
+            attr->mLocalName == nsGkAtoms::space) {
             rv = ensureNewElementContext();
             NS_ENSURE_SUCCESS(rv, rv);
 
-            if (TX_StringEqualsAtom(attr->mValue, txXMLAtoms::preserve)) {
+            if (TX_StringEqualsAtom(attr->mValue, nsGkAtoms::preserve)) {
                 mElementContext->mPreserveWhitespace = MB_TRUE;
             }
-            else if (TX_StringEqualsAtom(attr->mValue, txXMLAtoms::_default)) {
+            else if (TX_StringEqualsAtom(attr->mValue, nsGkAtoms::_default)) {
                 mElementContext->mPreserveWhitespace = MB_FALSE;
             }
             else {
                 return NS_ERROR_XSLT_PARSE_FAILURE;
             }
         }
 
         // xml:base
         if (attr->mNamespaceID == kNameSpaceID_XML &&
-            attr->mLocalName == txXMLAtoms::base &&
+            attr->mLocalName == nsGkAtoms::base &&
             !attr->mValue.IsEmpty()) {
             rv = ensureNewElementContext();
             NS_ENSURE_SUCCESS(rv, rv);
             
             nsAutoString uri;
             URIUtils::resolveHref(attr->mValue, mElementContext->mBaseURI, uri);
             mElementContext->mBaseURI = uri;
         }
 
         // extension-element-prefixes
         if ((attr->mNamespaceID == kNameSpaceID_XSLT &&
-             attr->mLocalName == txXSLTAtoms::extensionElementPrefixes &&
+             attr->mLocalName == nsGkAtoms::extensionElementPrefixes &&
              aNamespaceID != kNameSpaceID_XSLT) ||
             (attr->mNamespaceID == kNameSpaceID_None &&
-             attr->mLocalName == txXSLTAtoms::extensionElementPrefixes &&
+             attr->mLocalName == nsGkAtoms::extensionElementPrefixes &&
              aNamespaceID == kNameSpaceID_XSLT &&
-             (aLocalName == txXSLTAtoms::stylesheet ||
-              aLocalName == txXSLTAtoms::transform))) {
+             (aLocalName == nsGkAtoms::stylesheet ||
+              aLocalName == nsGkAtoms::transform))) {
             rv = ensureNewElementContext();
             NS_ENSURE_SUCCESS(rv, rv);
 
             nsWhitespaceTokenizer tok(attr->mValue);
             while (tok.hasMoreTokens()) {
                 PRInt32 namespaceID = mElementContext->mMappings->
                     lookupNamespaceWithDefault(tok.nextToken());
                 
@@ -271,23 +271,23 @@ txStylesheetCompiler::startElementIntern
                 }
             }
 
             attr->mLocalName = nsnull;
         }
 
         // version
         if ((attr->mNamespaceID == kNameSpaceID_XSLT &&
-             attr->mLocalName == txXSLTAtoms::version &&
+             attr->mLocalName == nsGkAtoms::version &&
              aNamespaceID != kNameSpaceID_XSLT) ||
             (attr->mNamespaceID == kNameSpaceID_None &&
-             attr->mLocalName == txXSLTAtoms::version &&
+             attr->mLocalName == nsGkAtoms::version &&
              aNamespaceID == kNameSpaceID_XSLT &&
-             (aLocalName == txXSLTAtoms::stylesheet ||
-              aLocalName == txXSLTAtoms::transform))) {
+             (aLocalName == nsGkAtoms::stylesheet ||
+              aLocalName == nsGkAtoms::transform))) {
             rv = ensureNewElementContext();
             NS_ENSURE_SUCCESS(rv, rv);
 
             if (attr->mValue.EqualsLiteral("1.0")) {
                 mElementContext->mForwardsCompatibleParsing = MB_FALSE;
             }
             else {
                 mElementContext->mForwardsCompatibleParsing = MB_TRUE;
@@ -856,17 +856,17 @@ txStylesheetCompilerState::addVariable(c
 
     return NS_OK;
 }
 
 nsresult
 txStylesheetCompilerState::resolveNamespacePrefix(nsIAtom* aPrefix,
                                                   PRInt32& aID)
 {
-    NS_ASSERTION(aPrefix && aPrefix != txXMLAtoms::_empty,
+    NS_ASSERTION(aPrefix && aPrefix != nsGkAtoms::_empty,
                  "caller should handle default namespace ''");
     aID = mElementContext->mMappings->lookupNamespace(aPrefix);
     return (aID != kNameSpaceID_Unknown) ? NS_OK : NS_ERROR_FAILURE;
 }
 
 /**
  * Error Function to be used for unknown extension functions.
  *
@@ -922,49 +922,49 @@ txErrorFunctionCall::getNameAtom(nsIAtom
 }
 #endif
 
 static nsresult
 TX_ConstructXSLTFunction(nsIAtom* aName, PRInt32 aNamespaceID,
                          txStylesheetCompilerState* aState,
                          FunctionCall** aFunction)
 {
-    if (aName == txXSLTAtoms::document) {
+    if (aName == nsGkAtoms::document) {
         *aFunction =
             new DocumentFunctionCall(aState->mElementContext->mBaseURI);
     }
-    else if (aName == txXSLTAtoms::key) {
+    else if (aName == nsGkAtoms::key) {
         *aFunction =
             new txKeyFunctionCall(aState->mElementContext->mMappings);
     }
-    else if (aName == txXSLTAtoms::formatNumber) {
+    else if (aName == nsGkAtoms::formatNumber) {
         *aFunction =
             new txFormatNumberFunctionCall(aState->mStylesheet,
                                            aState->mElementContext->mMappings);
     }
-    else if (aName == txXSLTAtoms::current) {
+    else if (aName == nsGkAtoms::current) {
         *aFunction = new CurrentFunctionCall();
     }
-    else if (aName == txXSLTAtoms::unparsedEntityUri) {
+    else if (aName == nsGkAtoms::unparsedEntityUri) {
         return NS_ERROR_NOT_IMPLEMENTED;
     }
-    else if (aName == txXSLTAtoms::generateId) {
+    else if (aName == nsGkAtoms::generateId) {
         *aFunction = new GenerateIdFunctionCall();
     }
-    else if (aName == txXSLTAtoms::systemProperty) {
+    else if (aName == nsGkAtoms::systemProperty) {
         *aFunction = new txXSLTEnvironmentFunctionCall(
             txXSLTEnvironmentFunctionCall::SYSTEM_PROPERTY,
             aState->mElementContext->mMappings);
     }
-    else if (aName == txXSLTAtoms::elementAvailable) {
+    else if (aName == nsGkAtoms::elementAvailable) {
         *aFunction = new txXSLTEnvironmentFunctionCall(
             txXSLTEnvironmentFunctionCall::ELEMENT_AVAILABLE,
             aState->mElementContext->mMappings);
     }
-    else if (aName == txXSLTAtoms::functionAvailable) {
+    else if (aName == nsGkAtoms::functionAvailable) {
         *aFunction = new txXSLTEnvironmentFunctionCall(
             txXSLTEnvironmentFunctionCall::FUNCTION_AVAILABLE,
             aState->mElementContext->mMappings);
     }
     else {
         return NS_ERROR_XPATH_UNKNOWN_FUNCTION;
     }
 
--- a/content/xslt/src/xslt/txUnknownHandler.cpp
+++ b/content/xslt/src/xslt/txUnknownHandler.cpp
@@ -35,17 +35,17 @@
  * the terms of any one of the MPL, the GPL or the LGPL.
  *
  * ***** END LICENSE BLOCK ***** */
 
 #include "txUnknownHandler.h"
 #include "txExecutionState.h"
 #include "txStringUtils.h"
 #include "txStylesheet.h"
-#include "txAtoms.h"
+#include "nsGkAtoms.h"
 
 txUnknownHandler::txUnknownHandler(txExecutionState* aEs)
     : mEs(aEs),
       mFlushed(PR_FALSE)
 {
     MOZ_COUNT_CTOR_INHERITED(txUnknownHandler, txBufferingHandler);
 }
 
@@ -155,17 +155,17 @@ txUnknownHandler::startElement(nsIAtom* 
         if (!aLowercaseLocalName) {
             owner = TX_ToLowerCaseAtom(aLocalName);
             NS_ENSURE_TRUE(owner, NS_ERROR_OUT_OF_MEMORY);
 
             aLowercaseLocalName = owner;
         }
 
         PRBool htmlRoot = aNsID == kNameSpaceID_None && !aPrefix &&
-                          aLowercaseLocalName == txHTMLAtoms::html;
+                          aLowercaseLocalName == nsGkAtoms::html;
 
         // Use aLocalName and not aLowercaseLocalName in case the output
         // handler cares about case. For eHTMLOutput the handler will hardcode
         // to 'html' anyway.
         nsresult rv = createHandlerAndFlush(htmlRoot,
                                             nsDependentAtomString(aLocalName),
                                             aNsID);
         NS_ENSURE_SUCCESS(rv, rv);
--- a/content/xslt/src/xslt/txXSLTEnvironmentFunctionCall.cpp
+++ b/content/xslt/src/xslt/txXSLTEnvironmentFunctionCall.cpp
@@ -33,17 +33,17 @@
  * 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 "txIXPathContext.h"
-#include "txAtoms.h"
+#include "nsGkAtoms.h"
 #include "txError.h"
 #include "txXMLUtils.h"
 #include "txXSLTFunctions.h"
 #include "txNamespaceMap.h"
 
 nsresult
 txXSLTEnvironmentFunctionCall::evaluate(txIEvalContext* aContext,
                                         txAExprResult** aResult)
@@ -61,70 +61,70 @@ txXSLTEnvironmentFunctionCall::evaluate(
     txExpandedName qname;
     rv = qname.init(property, mMappings, mType != FUNCTION_AVAILABLE);
     NS_ENSURE_SUCCESS(rv, rv);
 
     switch (mType) {
         case SYSTEM_PROPERTY:
         {
             if (qname.mNamespaceID == kNameSpaceID_XSLT) {
-                if (qname.mLocalName == txXSLTAtoms::version) {
+                if (qname.mLocalName == nsGkAtoms::version) {
                     return aContext->recycler()->getNumberResult(1.0, aResult);
                 }
-                if (qname.mLocalName == txXSLTAtoms::vendor) {
+                if (qname.mLocalName == nsGkAtoms::vendor) {
                     return aContext->recycler()->getStringResult(
                           NS_LITERAL_STRING("Transformiix"), aResult);
                 }
-                if (qname.mLocalName == txXSLTAtoms::vendorUrl) {
+                if (qname.mLocalName == nsGkAtoms::vendorUrl) {
                     return aContext->recycler()->getStringResult(
                           NS_LITERAL_STRING("http://www.mozilla.org/projects/xslt/"),
                           aResult);
                 }
             }
             aContext->recycler()->getEmptyStringResult(aResult);
             break;
         }
         case ELEMENT_AVAILABLE:
         {
             PRBool val = qname.mNamespaceID == kNameSpaceID_XSLT &&
-                         (qname.mLocalName == txXSLTAtoms::applyImports ||
-                          qname.mLocalName == txXSLTAtoms::applyTemplates ||
-                          qname.mLocalName == txXSLTAtoms::attribute ||
-                          qname.mLocalName == txXSLTAtoms::attributeSet ||
-                          qname.mLocalName == txXSLTAtoms::callTemplate ||
-                          qname.mLocalName == txXSLTAtoms::choose ||
-                          qname.mLocalName == txXSLTAtoms::comment ||
-                          qname.mLocalName == txXSLTAtoms::copy ||
-                          qname.mLocalName == txXSLTAtoms::copyOf ||
-                          qname.mLocalName == txXSLTAtoms::decimalFormat ||
-                          qname.mLocalName == txXSLTAtoms::element ||
-                          qname.mLocalName == txXSLTAtoms::fallback ||
-                          qname.mLocalName == txXSLTAtoms::forEach ||
-                          qname.mLocalName == txXSLTAtoms::_if ||
-                          qname.mLocalName == txXSLTAtoms::import ||
-                          qname.mLocalName == txXSLTAtoms::include ||
-                          qname.mLocalName == txXSLTAtoms::key ||
-                          qname.mLocalName == txXSLTAtoms::message ||
-                          //qname.mLocalName == txXSLTAtoms::namespaceAlias ||
-                          qname.mLocalName == txXSLTAtoms::number ||
-                          qname.mLocalName == txXSLTAtoms::otherwise ||
-                          qname.mLocalName == txXSLTAtoms::output ||
-                          qname.mLocalName == txXSLTAtoms::param ||
-                          qname.mLocalName == txXSLTAtoms::preserveSpace ||
-                          qname.mLocalName == txXSLTAtoms::processingInstruction ||
-                          qname.mLocalName == txXSLTAtoms::sort ||
-                          qname.mLocalName == txXSLTAtoms::stripSpace ||
-                          qname.mLocalName == txXSLTAtoms::stylesheet ||
-                          qname.mLocalName == txXSLTAtoms::_template ||
-                          qname.mLocalName == txXSLTAtoms::text ||
-                          qname.mLocalName == txXSLTAtoms::transform ||
-                          qname.mLocalName == txXSLTAtoms::valueOf ||
-                          qname.mLocalName == txXSLTAtoms::variable ||
-                          qname.mLocalName == txXSLTAtoms::when ||
-                          qname.mLocalName == txXSLTAtoms::withParam);
+                         (qname.mLocalName == nsGkAtoms::applyImports ||
+                          qname.mLocalName == nsGkAtoms::applyTemplates ||
+                          qname.mLocalName == nsGkAtoms::attribute ||
+                          qname.mLocalName == nsGkAtoms::attributeSet ||
+                          qname.mLocalName == nsGkAtoms::callTemplate ||
+                          qname.mLocalName == nsGkAtoms::choose ||
+                          qname.mLocalName == nsGkAtoms::comment ||
+                          qname.mLocalName == nsGkAtoms::copy ||
+                          qname.mLocalName == nsGkAtoms::copyOf ||
+                          qname.mLocalName == nsGkAtoms::decimalFormat ||
+                          qname.mLocalName == nsGkAtoms::element ||
+                          qname.mLocalName == nsGkAtoms::fallback ||
+                          qname.mLocalName == nsGkAtoms::forEach ||
+                          qname.mLocalName == nsGkAtoms::_if ||
+                          qname.mLocalName == nsGkAtoms::import ||
+                          qname.mLocalName == nsGkAtoms::include ||
+                          qname.mLocalName == nsGkAtoms::key ||
+                          qname.mLocalName == nsGkAtoms::message ||
+                          //qname.mLocalName == nsGkAtoms::namespaceAlias ||
+                          qname.mLocalName == nsGkAtoms::number ||
+                          qname.mLocalName == nsGkAtoms::otherwise ||
+                          qname.mLocalName == nsGkAtoms::output ||
+                          qname.mLocalName == nsGkAtoms::param ||
+                          qname.mLocalName == nsGkAtoms::preserveSpace ||
+                          qname.mLocalName == nsGkAtoms::processingInstruction ||
+                          qname.mLocalName == nsGkAtoms::sort ||
+                          qname.mLocalName == nsGkAtoms::stripSpace ||
+                          qname.mLocalName == nsGkAtoms::stylesheet ||
+                          qname.mLocalName == nsGkAtoms::_template ||
+                          qname.mLocalName == nsGkAtoms::text ||
+                          qname.mLocalName == nsGkAtoms::transform ||
+                          qname.mLocalName == nsGkAtoms::valueOf ||
+                          qname.mLocalName == nsGkAtoms::variable ||
+                          qname.mLocalName == nsGkAtoms::when ||
+                          qname.mLocalName == nsGkAtoms::withParam);
 
             aContext->recycler()->getBoolResult(val, aResult);
             break;
         }
         case FUNCTION_AVAILABLE:
         {
             extern PRBool TX_XSLTFunctionAvailable(nsIAtom* aName,
                                                    PRInt32 aNameSpaceID);
@@ -156,16 +156,16 @@ txXSLTEnvironmentFunctionCall::isSensiti
 {
     return argsSensitiveTo(aContext);
 }
 
 #ifdef TX_TO_STRING
 nsresult
 txXSLTEnvironmentFunctionCall::getNameAtom(nsIAtom** aAtom)
 {
-    *aAtom = mType == SYSTEM_PROPERTY ? txXSLTAtoms::systemProperty :
-             mType == ELEMENT_AVAILABLE ? txXSLTAtoms::elementAvailable :
-             txXSLTAtoms::functionAvailable;
+    *aAtom = mType == SYSTEM_PROPERTY ? nsGkAtoms::systemProperty :
+             mType == ELEMENT_AVAILABLE ? nsGkAtoms::elementAvailable :
+             nsGkAtoms::functionAvailable;
     NS_ADDREF(*aAtom);
 
     return NS_OK;
 }
 #endif
--- a/content/xslt/src/xslt/txXSLTNumber.cpp
+++ b/content/xslt/src/xslt/txXSLTNumber.cpp
@@ -32,17 +32,17 @@
  * 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 "txXSLTNumber.h"
-#include "txAtoms.h"
+#include "nsGkAtoms.h"
 #include "txCore.h"
 #include <math.h>
 #include "txExpr.h"
 #include "txXSLTPatterns.h"
 #include "txIXPathContext.h"
 #include "txXPathTreeWalker.h"
 
 nsresult txXSLTNumber::createNumber(Expr* aValueExpr, txPattern* aCountPattern,
@@ -179,17 +179,17 @@ txXSLTNumber::getValueList(Expr* aValueE
                 break;
             }
             case txXPathNodeType::DOCUMENT_NODE:
             case txXPathNodeType::ATTRIBUTE_NODE:
             default:
             {
                 // this won't match anything as we walk up the tree
                 // but it's what the spec says to do
-                nodeTest = new txNameTest(0, txXPathAtoms::_asterix, 0,
+                nodeTest = new txNameTest(0, nsGkAtoms::_asterix, 0,
                                           nodeType);
                 break;
             }
         }
         NS_ENSURE_TRUE(nodeTest, NS_ERROR_OUT_OF_MEMORY);
 
         countPattern = new txStepPattern(nodeTest, MB_FALSE);
         if (!countPattern) {
--- a/content/xslt/src/xslt/txXSLTProcessor.cpp
+++ b/content/xslt/src/xslt/txXSLTProcessor.cpp
@@ -33,17 +33,17 @@
  * 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 "txXSLTProcessor.h"
 #include "txInstructions.h"
-#include "txAtoms.h"
+#include "nsGkAtoms.h"
 #include "txLog.h"
 #include "txStylesheetCompileHandlers.h"
 #include "txStylesheetCompiler.h"
 #include "txExecutionState.h"
 #include "txExprResult.h"
 
 TX_LG_IMPL