Fix for bug 230633 (Constify Transformiix code a bit). r=Pike, sr=jst.

This commit is contained in:
peterv%propagandism.org 2005-11-02 07:41:37 +00:00
Родитель ec4bb16daa
Коммит 900ce9f5c3
9 изменённых файлов: 323 добавлений и 340 удалений

Просмотреть файл

@ -48,11 +48,8 @@ CPPSRCS = Double.cpp \
txAtoms.cpp \
txExpandedNameMap.cpp \
txNamespaceMap.cpp \
txURIUtils.cpp
ifdef TX_EXE
CPPSRCS += txStringUtils.cpp
endif
txURIUtils.cpp \
txStringUtils.cpp
include $(topsrcdir)/config/rules.mk

Просмотреть файл

@ -38,104 +38,66 @@
#include "txAtoms.h"
#include "nsStaticAtom.h"
#include "nsMemory.h"
#define TX_ATOM(_name, _value) nsIAtom* txXMLAtoms::_name = 0
XML_ATOMS;
// define storage for all atoms
#define TX_ATOM(_name, _value) nsIAtom* txXMLAtoms::_name;
XML_ATOMS
#undef TX_ATOM
#define TX_ATOM(_name, _value) nsIAtom* txXPathAtoms::_name = 0
#define TX_ATOM(_name, _value) nsIAtom* txXPathAtoms::_name;
#include "txXPathAtomList.h"
#undef TX_ATOM
#define TX_ATOM(_name, _value) nsIAtom* txXSLTAtoms::_name = 0
#define TX_ATOM(_name, _value) nsIAtom* txXSLTAtoms::_name;
#include "txXSLTAtomList.h"
#undef TX_ATOM
#define TX_ATOM(_name, _value) nsIAtom* txHTMLAtoms::_name = 0
#define TX_ATOM(_name, _value) nsIAtom* txHTMLAtoms::_name;
#include "txHTMLAtomList.h"
#undef TX_ATOM
static PRUint32 gXMLRefCnt = 0;
static PRUint32 gXPathRefCnt = 0;
static PRUint32 gXSLTRefCnt = 0;
static PRUint32 gHTMLRefCnt = 0;
#define TX_ATOM(_name, _value) \
_name = NS_NewAtom(_value); \
NS_ENSURE_TRUE(_name, MB_FALSE)
MBool txXMLAtoms::init()
{
if (0 == gXMLRefCnt++) {
// create atoms
XML_ATOMS;
}
return MB_TRUE;
}
MBool txXPathAtoms::init()
{
if (0 == gXPathRefCnt++) {
// create atoms
#include "txXPathAtomList.h"
}
return MB_TRUE;
}
MBool txXSLTAtoms::init()
{
if (0 == gXSLTRefCnt++) {
// create atoms
#include "txXSLTAtomList.h"
}
return MB_TRUE;
}
MBool txHTMLAtoms::init()
{
if (0 == gHTMLRefCnt++) {
// create atoms
#include "txHTMLAtomList.h"
}
return MB_TRUE;
}
static const nsStaticAtom XMLAtoms_info[] = {
#define TX_ATOM(name_, value_) { value_, &txXMLAtoms::name_ },
XML_ATOMS
#undef TX_ATOM
};
#define TX_ATOM(_name, _value) \
NS_IF_RELEASE(_name)
void txXMLAtoms::shutdown()
{
NS_ASSERTION(gXMLRefCnt != 0, "bad release atoms");
if (--gXMLRefCnt == 0) {
// release atoms
XML_ATOMS;
}
}
void txXPathAtoms::shutdown()
{
NS_ASSERTION(gXPathRefCnt != 0, "bad release atoms");
if (--gXPathRefCnt == 0) {
// release atoms
static const nsStaticAtom XPathAtoms_info[] = {
#define TX_ATOM(name_, value_) { value_, &txXPathAtoms::name_ },
#include "txXPathAtomList.h"
}
}
void txXSLTAtoms::shutdown()
{
NS_ASSERTION(gXSLTRefCnt != 0, "bad release atoms");
if (--gXSLTRefCnt == 0) {
// release atoms
#include "txXSLTAtomList.h"
}
}
void txHTMLAtoms::shutdown()
{
NS_ASSERTION(gHTMLRefCnt != 0, "bad release atoms");
if (--gHTMLRefCnt == 0) {
// release atoms
#include "txHTMLAtomList.h"
}
}
#undef TX_ATOM
};
static const nsStaticAtom XSLTAtoms_info[] = {
#define TX_ATOM(name_, value_) { value_, &txXSLTAtoms::name_ },
#include "txXSLTAtomList.h"
#undef TX_ATOM
};
static const nsStaticAtom HTMLAtoms_info[] = {
#define TX_ATOM(name_, value_) { value_, &txHTMLAtoms::name_ },
#include "txHTMLAtomList.h"
#undef TX_ATOM
};
void txXMLAtoms::init()
{
NS_RegisterStaticAtoms(XMLAtoms_info, NS_ARRAY_LENGTH(XMLAtoms_info));
}
void txXPathAtoms::init()
{
NS_RegisterStaticAtoms(XPathAtoms_info, NS_ARRAY_LENGTH(XPathAtoms_info));
}
void txXSLTAtoms::init()
{
NS_RegisterStaticAtoms(XSLTAtoms_info, NS_ARRAY_LENGTH(XSLTAtoms_info));
}
void txHTMLAtoms::init()
{
NS_RegisterStaticAtoms(HTMLAtoms_info, NS_ARRAY_LENGTH(HTMLAtoms_info));
}

Просмотреть файл

@ -39,8 +39,7 @@
#ifndef TRANSFRMX_ATOMS_H
#define TRANSFRMX_ATOMS_H
#include "nsIAtom.h"
#include "baseutils.h"
class nsIAtom;
/*
* Declare all atoms
@ -51,47 +50,43 @@
* be auto-generated.
*/
#define XML_ATOMS \
TX_ATOM(_empty, ""); \
TX_ATOM(base, "base"); \
TX_ATOM(_default, "default"); \
TX_ATOM(lang, "lang"); \
TX_ATOM(preserve, "preserve"); \
TX_ATOM(space, "space"); \
TX_ATOM(xml, "xml"); \
#define XML_ATOMS \
TX_ATOM(_empty, "") \
TX_ATOM(base, "base") \
TX_ATOM(_default, "default") \
TX_ATOM(lang, "lang") \
TX_ATOM(preserve, "preserve") \
TX_ATOM(space, "space") \
TX_ATOM(xml, "xml") \
TX_ATOM(xmlns, "xmlns")
#define TX_ATOM(_name, _value) static nsIAtom* _name
#define TX_ATOM(_name, _value) static nsIAtom* _name;
class txXMLAtoms
{
public:
static MBool init();
static void shutdown();
XML_ATOMS;
static void init();
XML_ATOMS
};
class txXPathAtoms
{
public:
static MBool init();
static void shutdown();
static void init();
#include "txXPathAtomList.h"
};
class txXSLTAtoms
{
public:
static MBool init();
static void shutdown();
static void init();
#include "txXSLTAtomList.h"
};
class txHTMLAtoms
{
public:
static MBool init();
static void shutdown();
static void init();
#include "txHTMLAtomList.h"
};

Просмотреть файл

@ -39,7 +39,34 @@
* ***** END LICENSE BLOCK ***** */
#include "txStringUtils.h"
#include "nsDependentString.h"
PRBool
TX_StringEqualsAtom(const nsASingleFragmentString& aString, nsIAtom* aAtom)
{
const char* ASCIIAtom;
aAtom->GetUTF8String(&ASCIIAtom);
PRUint32 UTF16Length = aString.Length();
if (strlen(ASCIIAtom) != UTF16Length) {
return PR_FALSE;
}
const PRUnichar* UTF16Iter;
aString.BeginReading(UTF16Iter);
while (ASCIIAtom) {
if (PRUnichar(*ASCIIAtom) != *UTF16Iter) {
return PR_FALSE;
}
++ASCIIAtom;
++UTF16Iter;
}
return PR_TRUE;
}
#ifdef TX_EXE
int
txCaseInsensitiveStringComparator::operator()(const char_type* lhs,
const char_type* rhs,
@ -151,3 +178,5 @@ void TX_ToLowerCase(const nsAString& aSource, nsAString& aDest)
copy_string(aSource.BeginReading(fromBegin), aSource.EndReading(fromEnd),
converter);
}
#endif

Просмотреть файл

@ -44,6 +44,14 @@
#include "nsAString.h"
#include "nsIAtom.h"
class nsASingleFragmentString;
/**
* Check equality between a string and an atom containing ASCII.
*/
PRBool
TX_StringEqualsAtom(const nsASingleFragmentString& aString, nsIAtom* aAtom);
#ifndef TX_EXE
#include "nsUnicharUtils.h"
@ -68,12 +76,4 @@ void TX_ToLowerCase(const nsAString& aSource, nsAString& aDest);
#endif
/**
* Check equality between a string and an atom.
*/
inline PRBool TX_StringEqualsAtom(const nsAString& aString, nsIAtom* aAtom)
{
return aAtom->Equals(aString);
}
#endif // txStringUtils_h__

Просмотреть файл

@ -36,54 +36,57 @@
*
* ***** END LICENSE BLOCK ***** */
TX_ATOM(_and, "and");
TX_ATOM(_asterix, "*");
TX_ATOM(boolean, "boolean");
TX_ATOM(ceiling, "ceiling");
TX_ATOM(comment, "comment");
TX_ATOM(concat, "concat");
TX_ATOM(contains, "contains");
TX_ATOM(count, "count");
TX_ATOM(div, "div");
TX_ATOM(_false, "false");
TX_ATOM(floor, "floor");
TX_ATOM(id, "id");
TX_ATOM(lang, "lang");
TX_ATOM(last, "last");
TX_ATOM(localName, "local-name");
TX_ATOM(mod, "mod");
TX_ATOM(name, "name");
TX_ATOM(namespaceUri, "namespace-uri");
TX_ATOM(node, "node");
TX_ATOM(normalizeSpace, "normalize-space");
TX_ATOM(_not, "not");
TX_ATOM(number, "number");
TX_ATOM(_or, "or");
TX_ATOM(position, "position");
TX_ATOM(processingInstruction, "processing-instruction");
TX_ATOM(round, "round");
TX_ATOM(startsWith, "starts-with");
TX_ATOM(string, "string");
TX_ATOM(stringLength, "string-length");
TX_ATOM(substring, "substring");
TX_ATOM(substringAfter, "substring-after");
TX_ATOM(substringBefore, "substring-before");
TX_ATOM(sum, "sum");
TX_ATOM(text, "text");
TX_ATOM(translate, "translate");
TX_ATOM(_true, "true");
// OUTPUT_CLASS=txXPathAtoms
// MACRO_NAME=TX_ATOM
TX_ATOM(_and, "and")
TX_ATOM(_asterix, "*")
TX_ATOM(boolean, "boolean")
TX_ATOM(ceiling, "ceiling")
TX_ATOM(comment, "comment")
TX_ATOM(concat, "concat")
TX_ATOM(contains, "contains")
TX_ATOM(count, "count")
TX_ATOM(div, "div")
TX_ATOM(_false, "false")
TX_ATOM(floor, "floor")
TX_ATOM(id, "id")
TX_ATOM(lang, "lang")
TX_ATOM(last, "last")
TX_ATOM(localName, "local-name")
TX_ATOM(mod, "mod")
TX_ATOM(name, "name")
TX_ATOM(namespaceUri, "namespace-uri")
TX_ATOM(node, "node")
TX_ATOM(normalizeSpace, "normalize-space")
TX_ATOM(_not, "not")
TX_ATOM(number, "number")
TX_ATOM(_or, "or")
TX_ATOM(position, "position")
TX_ATOM(processingInstruction, "processing-instruction")
TX_ATOM(round, "round")
TX_ATOM(startsWith, "starts-with")
TX_ATOM(string, "string")
TX_ATOM(stringLength, "string-length")
TX_ATOM(substring, "substring")
TX_ATOM(substringAfter, "substring-after")
TX_ATOM(substringBefore, "substring-before")
TX_ATOM(sum, "sum")
TX_ATOM(text, "text")
TX_ATOM(translate, "translate")
TX_ATOM(_true, "true")
// XPath Axes
TX_ATOM(ancestor, "ancestor");
TX_ATOM(ancestorOrSelf, "ancestor-or-self");
TX_ATOM(attribute, "attribute");
TX_ATOM(child, "child");
TX_ATOM(descendant, "descendant");
TX_ATOM(descendantOrSelf, "descendant-or-self");
TX_ATOM(following, "following");
TX_ATOM(followingSibling, "following-sibling");
TX_ATOM(_namespace, "namespace");
TX_ATOM(parent, "parent");
TX_ATOM(preceding, "preceding");
TX_ATOM(precedingSibling, "preceding-sibling");
TX_ATOM(self, "self");
TX_ATOM(ancestor, "ancestor")
TX_ATOM(ancestorOrSelf, "ancestor-or-self")
TX_ATOM(attribute, "attribute")
TX_ATOM(child, "child")
TX_ATOM(descendant, "descendant")
TX_ATOM(descendantOrSelf, "descendant-or-self")
TX_ATOM(following, "following")
TX_ATOM(followingSibling, "following-sibling")
TX_ATOM(_namespace, "namespace")
TX_ATOM(parent, "parent")
TX_ATOM(preceding, "preceding")
TX_ATOM(precedingSibling, "preceding-sibling")
TX_ATOM(self, "self")

Просмотреть файл

@ -36,59 +36,62 @@
*
* ***** END LICENSE BLOCK ***** */
TX_ATOM(area, "area");
TX_ATOM(base, "base");
TX_ATOM(basefont, "basefont");
TX_ATOM(br, "br");
TX_ATOM(button, "button");
TX_ATOM(checked, "checked");
TX_ATOM(col, "col");
TX_ATOM(compact, "compact");
TX_ATOM(content, "content");
TX_ATOM(declare, "declare");
TX_ATOM(defer, "defer");
TX_ATOM(dir, "dir");
TX_ATOM(disabled, "disabled");
TX_ATOM(dl, "dl");
TX_ATOM(frame, "frame");
TX_ATOM(headerDefaultStyle, "default-style");
TX_ATOM(head, "head");
TX_ATOM(hr, "hr");
TX_ATOM(href, "href");
TX_ATOM(httpEquiv, "http-equiv");
TX_ATOM(img, "img");
TX_ATOM(input, "input");
TX_ATOM(isindex, "isindex");
TX_ATOM(ismap, "ismap");
TX_ATOM(li, "li");
TX_ATOM(link, "link");
TX_ATOM(media, "media");
TX_ATOM(menu, "menu");
TX_ATOM(meta, "meta");
TX_ATOM(multiple, "multiple");
TX_ATOM(noresize, "noresize");
TX_ATOM(noshade, "noshade");
TX_ATOM(nowrap, "nowrap");
TX_ATOM(object, "object");
TX_ATOM(ol, "ol");
TX_ATOM(optgroup, "optgroup");
TX_ATOM(option, "option");
TX_ATOM(p, "p");
TX_ATOM(param, "param");
TX_ATOM(readonly, "readonly");
TX_ATOM(refresh, "refresh");
TX_ATOM(script, "script");
TX_ATOM(select, "select");
TX_ATOM(selected, "selected");
TX_ATOM(src, "src");
TX_ATOM(style, "style");
TX_ATOM(table, "table");
TX_ATOM(target, "target");
TX_ATOM(tbody, "tbody");
TX_ATOM(td, "td");
TX_ATOM(textarea, "textarea");
TX_ATOM(th, "th");
TX_ATOM(title, "title");
TX_ATOM(tr, "tr");
TX_ATOM(type, "type");
TX_ATOM(ul, "ul");
// OUTPUT_CLASS=txHTMLAtoms
// MACRO_NAME=TX_ATOM
TX_ATOM(area, "area")
TX_ATOM(base, "base")
TX_ATOM(basefont, "basefont")
TX_ATOM(br, "br")
TX_ATOM(button, "button")
TX_ATOM(checked, "checked")
TX_ATOM(col, "col")
TX_ATOM(compact, "compact")
TX_ATOM(content, "content")
TX_ATOM(declare, "declare")
TX_ATOM(defer, "defer")
TX_ATOM(dir, "dir")
TX_ATOM(disabled, "disabled")
TX_ATOM(dl, "dl")
TX_ATOM(frame, "frame")
TX_ATOM(headerDefaultStyle, "default-style")
TX_ATOM(head, "head")
TX_ATOM(hr, "hr")
TX_ATOM(href, "href")
TX_ATOM(httpEquiv, "http-equiv")
TX_ATOM(img, "img")
TX_ATOM(input, "input")
TX_ATOM(isindex, "isindex")
TX_ATOM(ismap, "ismap")
TX_ATOM(li, "li")
TX_ATOM(link, "link")
TX_ATOM(media, "media")
TX_ATOM(menu, "menu")
TX_ATOM(meta, "meta")
TX_ATOM(multiple, "multiple")
TX_ATOM(noresize, "noresize")
TX_ATOM(noshade, "noshade")
TX_ATOM(nowrap, "nowrap")
TX_ATOM(object, "object")
TX_ATOM(ol, "ol")
TX_ATOM(optgroup, "optgroup")
TX_ATOM(option, "option")
TX_ATOM(p, "p")
TX_ATOM(param, "param")
TX_ATOM(readonly, "readonly")
TX_ATOM(refresh, "refresh")
TX_ATOM(script, "script")
TX_ATOM(select, "select")
TX_ATOM(selected, "selected")
TX_ATOM(src, "src")
TX_ATOM(style, "style")
TX_ATOM(table, "table")
TX_ATOM(target, "target")
TX_ATOM(tbody, "tbody")
TX_ATOM(td, "td")
TX_ATOM(textarea, "textarea")
TX_ATOM(th, "th")
TX_ATOM(title, "title")
TX_ATOM(tr, "tr")
TX_ATOM(type, "type")
TX_ATOM(ul, "ul")

Просмотреть файл

@ -36,113 +36,116 @@
*
* ***** END LICENSE BLOCK ***** */
// OUTPUT_CLASS=txXSLTAtoms
// MACRO_NAME=TX_ATOM
// XSLT elements
TX_ATOM(applyImports, "apply-imports");
TX_ATOM(applyTemplates, "apply-templates");
TX_ATOM(attribute, "attribute");
TX_ATOM(attributeSet, "attribute-set");
TX_ATOM(callTemplate, "call-template");
TX_ATOM(choose, "choose");
TX_ATOM(comment, "comment");
TX_ATOM(copy, "copy");
TX_ATOM(copyOf, "copy-of");
TX_ATOM(decimalFormat, "decimal-format");
TX_ATOM(element, "element");
TX_ATOM(fallback, "fallback");
TX_ATOM(forEach, "for-each");
TX_ATOM(_if, "if");
TX_ATOM(import, "import");
TX_ATOM(include, "include");
TX_ATOM(key, "key");
TX_ATOM(message, "message");
TX_ATOM(namespaceAlias, "namespace-alias");
TX_ATOM(number, "number");
TX_ATOM(otherwise, "otherwise");
TX_ATOM(output, "output");
TX_ATOM(param, "param");
TX_ATOM(preserveSpace, "preserve-space");
TX_ATOM(processingInstruction, "processing-instruction");
TX_ATOM(sort, "sort");
TX_ATOM(stripSpace, "strip-space");
TX_ATOM(stylesheet, "stylesheet");
TX_ATOM(_template, "template");
TX_ATOM(text, "text");
TX_ATOM(transform, "transform");
TX_ATOM(valueOf, "value-of");
TX_ATOM(variable, "variable");
TX_ATOM(when, "when");
TX_ATOM(withParam, "with-param");
TX_ATOM(applyImports, "apply-imports")
TX_ATOM(applyTemplates, "apply-templates")
TX_ATOM(attribute, "attribute")
TX_ATOM(attributeSet, "attribute-set")
TX_ATOM(callTemplate, "call-template")
TX_ATOM(choose, "choose")
TX_ATOM(comment, "comment")
TX_ATOM(copy, "copy")
TX_ATOM(copyOf, "copy-of")
TX_ATOM(decimalFormat, "decimal-format")
TX_ATOM(element, "element")
TX_ATOM(fallback, "fallback")
TX_ATOM(forEach, "for-each")
TX_ATOM(_if, "if")
TX_ATOM(import, "import")
TX_ATOM(include, "include")
TX_ATOM(key, "key")
TX_ATOM(message, "message")
TX_ATOM(namespaceAlias, "namespace-alias")
TX_ATOM(number, "number")
TX_ATOM(otherwise, "otherwise")
TX_ATOM(output, "output")
TX_ATOM(param, "param")
TX_ATOM(preserveSpace, "preserve-space")
TX_ATOM(processingInstruction, "processing-instruction")
TX_ATOM(sort, "sort")
TX_ATOM(stripSpace, "strip-space")
TX_ATOM(stylesheet, "stylesheet")
TX_ATOM(_template, "template")
TX_ATOM(text, "text")
TX_ATOM(transform, "transform")
TX_ATOM(valueOf, "value-of")
TX_ATOM(variable, "variable")
TX_ATOM(when, "when")
TX_ATOM(withParam, "with-param")
// XSLT attributes
TX_ATOM(caseOrder, "case-order");
TX_ATOM(cdataSectionElements, "cdata-section-elements");
TX_ATOM(count, "count");
TX_ATOM(dataType, "data-type");
TX_ATOM(decimalSeparator, "decimal-separator");
TX_ATOM(digit, "digit");
TX_ATOM(disableOutputEscaping, "disable-output-escaping");
TX_ATOM(doctypePublic, "doctype-public");
TX_ATOM(doctypeSystem, "doctype-system");
TX_ATOM(elements, "elements");
TX_ATOM(encoding, "encoding");
TX_ATOM(extensionElementPrefixes, "extension-element-prefixes");
TX_ATOM(format, "format");
TX_ATOM(from, "from");
TX_ATOM(groupingSeparator, "grouping-separator");
TX_ATOM(groupingSize, "grouping-size");
TX_ATOM(href, "href");
TX_ATOM(indent, "indent");
TX_ATOM(infinity, "infinity");
TX_ATOM(lang, "lang");
TX_ATOM(level, "level");
TX_ATOM(match, "match");
TX_ATOM(method, "method");
TX_ATOM(mediaType, "media-type");
TX_ATOM(minusSign, "minus-sign");
TX_ATOM(mode, "mode");
TX_ATOM(name, "name");
TX_ATOM(_namespace, "namespace");
TX_ATOM(NaN, "NaN");
TX_ATOM(omitXmlDeclaration, "omit-xml-declaration");
TX_ATOM(order, "order");
TX_ATOM(patternSeparator, "pattern-separator");
TX_ATOM(perMille, "per-mille");
TX_ATOM(percent, "percent");
TX_ATOM(priority, "priority");
TX_ATOM(select, "select");
TX_ATOM(standalone, "standalone");
TX_ATOM(test, "test");
TX_ATOM(terminate, "terminate");
TX_ATOM(use, "use");
TX_ATOM(useAttributeSets, "use-attribute-sets");
TX_ATOM(value, "value");
TX_ATOM(version, "version");
TX_ATOM(zeroDigit, "zero-digit");
TX_ATOM(caseOrder, "case-order")
TX_ATOM(cdataSectionElements, "cdata-section-elements")
TX_ATOM(count, "count")
TX_ATOM(dataType, "data-type")
TX_ATOM(decimalSeparator, "decimal-separator")
TX_ATOM(digit, "digit")
TX_ATOM(disableOutputEscaping, "disable-output-escaping")
TX_ATOM(doctypePublic, "doctype-public")
TX_ATOM(doctypeSystem, "doctype-system")
TX_ATOM(elements, "elements")
TX_ATOM(encoding, "encoding")
TX_ATOM(extensionElementPrefixes, "extension-element-prefixes")
TX_ATOM(format, "format")
TX_ATOM(from, "from")
TX_ATOM(groupingSeparator, "grouping-separator")
TX_ATOM(groupingSize, "grouping-size")
TX_ATOM(href, "href")
TX_ATOM(indent, "indent")
TX_ATOM(infinity, "infinity")
TX_ATOM(lang, "lang")
TX_ATOM(level, "level")
TX_ATOM(match, "match")
TX_ATOM(method, "method")
TX_ATOM(mediaType, "media-type")
TX_ATOM(minusSign, "minus-sign")
TX_ATOM(mode, "mode")
TX_ATOM(name, "name")
TX_ATOM(_namespace, "namespace")
TX_ATOM(NaN, "NaN")
TX_ATOM(omitXmlDeclaration, "omit-xml-declaration")
TX_ATOM(order, "order")
TX_ATOM(patternSeparator, "pattern-separator")
TX_ATOM(perMille, "per-mille")
TX_ATOM(percent, "percent")
TX_ATOM(priority, "priority")
TX_ATOM(select, "select")
TX_ATOM(standalone, "standalone")
TX_ATOM(test, "test")
TX_ATOM(terminate, "terminate")
TX_ATOM(use, "use")
TX_ATOM(useAttributeSets, "use-attribute-sets")
TX_ATOM(value, "value")
TX_ATOM(version, "version")
TX_ATOM(zeroDigit, "zero-digit")
// XSLT functions
TX_ATOM(current, "current");
TX_ATOM(document, "document");
TX_ATOM(elementAvailable, "element-available");
TX_ATOM(formatNumber, "format-number");
TX_ATOM(functionAvailable, "function-available");
TX_ATOM(generateId, "generate-id");
TX_ATOM(unparsedEntityUri, "unparsed-entity-uri");
TX_ATOM(systemProperty, "system-property");
TX_ATOM(current, "current")
TX_ATOM(document, "document")
TX_ATOM(elementAvailable, "element-available")
TX_ATOM(formatNumber, "format-number")
TX_ATOM(functionAvailable, "function-available")
TX_ATOM(generateId, "generate-id")
TX_ATOM(unparsedEntityUri, "unparsed-entity-uri")
TX_ATOM(systemProperty, "system-property")
// XSLT properties
TX_ATOM(vendor, "vendor");
TX_ATOM(vendorUrl, "vendor-url");
TX_ATOM(vendor, "vendor")
TX_ATOM(vendorUrl, "vendor-url")
// XSLT attribute values
TX_ATOM(any, "any");
TX_ATOM(ascending, "ascending");
TX_ATOM(descending, "descending");
TX_ATOM(html, "html");
TX_ATOM(lowerFirst, "lower-first");
TX_ATOM(multiple, "multiple");
TX_ATOM(no, "no");
TX_ATOM(single, "single");
TX_ATOM(upperFirst, "upper-first");
TX_ATOM(xml, "xml");
TX_ATOM(yes, "yes");
TX_ATOM(_poundDefault, "#default");
TX_ATOM(any, "any")
TX_ATOM(ascending, "ascending")
TX_ATOM(descending, "descending")
TX_ATOM(html, "html")
TX_ATOM(lowerFirst, "lower-first")
TX_ATOM(multiple, "multiple")
TX_ATOM(no, "no")
TX_ATOM(single, "single")
TX_ATOM(upperFirst, "upper-first")
TX_ATOM(xml, "xml")
TX_ATOM(yes, "yes")
TX_ATOM(_poundDefault, "#default")

Просмотреть файл

@ -64,14 +64,10 @@ txXSLTProcessor::init()
}
#endif
if (!txHTMLAtoms::init())
return MB_FALSE;
if (!txXMLAtoms::init())
return MB_FALSE;
if (!txXPathAtoms::init())
return MB_FALSE;
if (!txXSLTAtoms::init())
return MB_FALSE;
txXMLAtoms::init();
txXPathAtoms::init();
txXSLTAtoms::init();
txHTMLAtoms::init();
if (!txHandlerTable::init())
return MB_FALSE;
@ -88,11 +84,6 @@ txXSLTProcessor::shutdown()
txHTMLOutput::shutdown();
#endif
txHTMLAtoms::shutdown();
txXMLAtoms::shutdown();
txXPathAtoms::shutdown();
txXSLTAtoms::shutdown();
txHandlerTable::shutdown();
}