silenced many more warnings

This commit is contained in:
Jez Higgins 2010-01-11 09:02:17 +00:00
parent 953e46ba92
commit 3dc2f255c7
13 changed files with 71 additions and 68 deletions

View file

@ -19,8 +19,8 @@ public:
{ {
} // SortHandler } // SortHandler
virtual void startElement(const std::string& namespaceURI, virtual void startElement(const std::string& /* namespaceURI */,
const std::string& localName, const std::string& /* localName */,
const std::string& qName, const std::string& qName,
const SAX::Attributes<std::string>& atts) const SAX::Attributes<std::string>& atts)
{ {
@ -29,12 +29,12 @@ public:
static const char* DataTypes[] = { "text", "number", 0 }; static const char* DataTypes[] = { "text", "number", 0 };
static const char* SortOrder[] = { "ascending", "descending", 0 }; static const char* SortOrder[] = { "ascending", "descending", 0 };
static const char* CaseOrder[] = { "upper-first", "lower-first", 0 }; static const char* CaseOrder[] = { "upper-first", "lower-first", 0 };
static const ValueRule rules[] = { { "select", false, "." }, static const ValueRule rules[] = { { "select", false, ".", 0 },
{ "lang", false, 0 }, { "lang", false, 0, 0 },
{ "data-type", false, "text", DataTypes }, { "data-type", false, "text", DataTypes },
{ "order", false, "ascending", SortOrder }, { "order", false, "ascending", SortOrder },
{ "case-order", false, "upper-first", CaseOrder }, { "case-order", false, "upper-first", CaseOrder },
{ 0, false, 0 } }; { 0, false, 0, 0 } };
std::map<std::string, std::string> attr = gatherAttributes(qName, atts, rules); std::map<std::string, std::string> attr = gatherAttributes(qName, atts, rules);
@ -57,9 +57,9 @@ public:
throw SAX::SAXException("xsl:sort can not contain elements"); throw SAX::SAXException("xsl:sort can not contain elements");
} // startElement } // startElement
virtual void endElement(const std::string& namespaceURI, virtual void endElement(const std::string& /* namespaceURI */,
const std::string& localName, const std::string& /* localName */,
const std::string& qName) const std::string& /* qName */)
{ {
sortee_.add_sort(sort_); sortee_.add_sort(sort_);
context_.pop(); context_.pop();

View file

@ -34,16 +34,16 @@ public:
} // characters } // characters
protected: protected:
virtual Template* createContainer(const std::string& namespaceURI, virtual Template* createContainer(const std::string& /* namespaceURI */,
const std::string& localName, const std::string& /* localName */,
const std::string& qName, const std::string& qName,
const SAX::Attributes<std::string>& atts) const SAX::Attributes<std::string>& atts)
{ {
static const ValueRule rules[] = { { "match", false, 0 }, static const ValueRule rules[] = { { "match", false, 0, 0 },
{ "mode", false, 0 }, { "mode", false, 0, 0 },
{ "name", false, 0 }, { "name", false, 0, 0 },
{ "priority", false, 0 }, { "priority", false, 0, 0 },
{ 0, false, 0} }; { 0, false, 0, 0 } };
std::map<std::string, std::string> attributes = gatherAttributes(qName, atts, rules); std::map<std::string, std::string> attributes = gatherAttributes(qName, atts, rules);
const std::string& match = attributes["match"]; const std::string& match = attributes["match"];
@ -112,9 +112,9 @@ protected:
} // createChild } // createChild
public: public:
virtual void endElement(const std::string& namespaceURI, virtual void endElement(const std::string& /* namespaceURI */,
const std::string& localName, const std::string& /* localName */,
const std::string& qName) const std::string& /* qName */)
{ {
context().stylesheet().add_template(container()); context().stylesheet().add_template(container());
context().pop(); context().pop();

View file

@ -17,15 +17,15 @@ public:
{ {
} // TextHandler } // TextHandler
virtual void startElement(const std::string& namespaceURI, virtual void startElement(const std::string& /* namespaceURI */,
const std::string& localName, const std::string& /* localName */,
const std::string& qName, const std::string& qName,
const SAX::Attributes<std::string>& atts) const SAX::Attributes<std::string>& atts)
{ {
if(text_ == 0) if(text_ == 0)
{ {
static const ValueRule rules[] = { { "disable-output-escaping", false, No, AllowedYesNo }, static const ValueRule rules[] = { { "disable-output-escaping", false, No, AllowedYesNo },
{ 0, false, 0} }; { 0, false, 0, 0 } };
text_ = new Text(gatherAttributes(qName, atts, rules)["disable-output-escaping"] == Yes); text_ = new Text(gatherAttributes(qName, atts, rules)["disable-output-escaping"] == Yes);
return; return;
} // if(text_ == 0) } // if(text_ == 0)
@ -33,9 +33,9 @@ public:
throw SAX::SAXException(qName + " can not contain elements"); throw SAX::SAXException(qName + " can not contain elements");
} // startElement } // startElement
virtual void endElement(const std::string& namespaceURI, virtual void endElement(const std::string& /* namespaceURI */,
const std::string& localName, const std::string& /* localName */,
const std::string& qName) const std::string& /* qName */)
{ {
text_->set(buffer_); text_->set(buffer_);
context_.parentContainer().add_item(text_); context_.parentContainer().add_item(text_);

View file

@ -18,16 +18,16 @@ public:
{ {
} // ValueOfHandler } // ValueOfHandler
virtual void startElement(const std::string& namespaceURI, virtual void startElement(const std::string& /* namespaceURI */,
const std::string& localName, const std::string& /* localName */,
const std::string& qName, const std::string& qName,
const SAX::Attributes<std::string>& atts) const SAX::Attributes<std::string>& atts)
{ {
if(valueOf_ == 0) if(valueOf_ == 0)
{ {
static const ValueRule rules[] = { { "select", true, 0 }, static const ValueRule rules[] = { { "select", true, 0, 0 },
{ "disable-output-escaping", false, No, AllowedYesNo }, { "disable-output-escaping", false, No, AllowedYesNo },
{ 0, false, 0} }; { 0, false, 0, 0 } };
std::map<std::string, std::string> attrs = gatherAttributes(qName, atts, rules); std::map<std::string, std::string> attrs = gatherAttributes(qName, atts, rules);
valueOf_ = new ValueOf(context_.xpath_expression(attrs["select"]), valueOf_ = new ValueOf(context_.xpath_expression(attrs["select"]),
@ -38,9 +38,9 @@ public:
throw SAX::SAXException(qName + " can not contain elements"); throw SAX::SAXException(qName + " can not contain elements");
} // startElement } // startElement
virtual void endElement(const std::string& namespaceURI, virtual void endElement(const std::string& /* namespaceURI */,
const std::string& localName, const std::string& /* localName */,
const std::string& qName) const std::string& /* qName */)
{ {
context_.parentContainer().add_item(valueOf_); context_.parentContainer().add_item(valueOf_);
context_.pop(); context_.pop();

View file

@ -87,7 +87,7 @@ std::map<std::string, std::string> gatherAttributes(const std::string& parentEle
} }
return results; return results;
}; // validateAttributes } // validateAttributes
} // namespace XSLT } // namespace XSLT
} // namespace Arabica } // namespace Arabica

View file

@ -29,14 +29,14 @@ public:
} // VariableHandler } // VariableHandler
protected: protected:
virtual VType* createContainer(const std::string& namespaceURI, virtual VType* createContainer(const std::string& /* namespaceURI */,
const std::string& localName, const std::string& /* localName */,
const std::string& qName, const std::string& qName,
const SAX::Attributes<std::string>& atts) const SAX::Attributes<std::string>& atts)
{ {
static const ValueRule rules[] = { { "name", true, 0 }, static const ValueRule rules[] = { { "name", true, 0, 0 },
{ "select", false, 0 }, { "select", false, 0, 0 },
{ 0, false, 0} }; { 0, false, 0, 0 } };
std::map<std::string, std::string> attrs = gatherAttributes(qName, atts, rules); std::map<std::string, std::string> attrs = gatherAttributes(qName, atts, rules);
@ -78,9 +78,9 @@ public:
{ {
} // VariableHandler } // VariableHandler
virtual void endElement(const std::string& namespaceURI, virtual void endElement(const std::string& /* namespaceURI */,
const std::string& localName, const std::string& /* localName */,
const std::string& qName) const std::string& /* qName */)
{ {
this->context().stylesheet().add_variable(this->container()); this->context().stylesheet().add_variable(this->container());
this->context().pop(); this->context().pop();

View file

@ -19,9 +19,9 @@ public:
{ {
} // WithParamHandler } // WithParamHandler
virtual void endElement(const std::string& namespaceURI, virtual void endElement(const std::string& /* namespaceURI */,
const std::string& localName, const std::string& /* localName */,
const std::string& qName) const std::string& /* qName */)
{ {
paramee_.add_with_param(container()); paramee_.add_with_param(container());
context().pop(); context().pop();

View file

@ -84,21 +84,22 @@ public:
stream_(stream), stream_(stream),
disable_output_escaping_(false), disable_output_escaping_(false),
in_cdata_(false), in_cdata_(false),
empty_(false),
seen_root_(true), seen_root_(true),
out_again_(false),
indent_(-1), indent_(-1),
empty_(false) out_again_(false)
{ {
} // StreamSink } // StreamSink
StreamSink(const StreamSink& rhs) : StreamSink(const StreamSink& rhs) :
stream_(rhs.stream_), stream_(rhs.stream_),
disable_output_escaping_(rhs.disable_output_escaping_), disable_output_escaping_(rhs.disable_output_escaping_),
seen_root_(rhs.seen_root_), in_cdata_(rhs.in_cdata_),
settings_(rhs.settings_),
indent_(rhs.indent_),
empty_(false), empty_(false),
out_again_(rhs.out_again_) seen_root_(rhs.seen_root_),
indent_(rhs.indent_),
out_again_(rhs.out_again_),
settings_(rhs.settings_)
{ {
} // StreamSink } // StreamSink
@ -123,7 +124,7 @@ protected:
} // do_end_document } // do_end_document
void do_start_element(const std::string& qName, void do_start_element(const std::string& qName,
const std::string& namespaceURI, const std::string& /* namespaceURI */,
const SAX::Attributes<std::string>& atts) const SAX::Attributes<std::string>& atts)
{ {
if(!seen_root_) if(!seen_root_)
@ -144,7 +145,8 @@ protected:
empty_ = true; empty_ = true;
} // do_start_element } // do_start_element
void do_end_element(const std::string& qName, const std::string& namespaceURI) void do_end_element(const std::string& qName,
const std::string& /* namespaceURI */)
{ {
if(!seen_root_) if(!seen_root_)
do_decl(""); do_decl("");
@ -305,9 +307,9 @@ private:
bool in_cdata_; bool in_cdata_;
bool empty_; bool empty_;
bool seen_root_; bool seen_root_;
Settings settings_;
int indent_; int indent_;
bool out_again_; bool out_again_;
Settings settings_;
bool operator==(const StreamSink&) const; bool operator==(const StreamSink&) const;
StreamSink& operator=(const StreamSink&); StreamSink& operator=(const StreamSink&);

View file

@ -145,8 +145,8 @@ private:
Arabica::XPath::XPathExpressionPtr<std::string> datatype_; Arabica::XPath::XPathExpressionPtr<std::string> datatype_;
Arabica::XPath::XPathExpressionPtr<std::string> order_; Arabica::XPath::XPathExpressionPtr<std::string> order_;
Arabica::XPath::XPathExpressionPtr<std::string> caseorder_; Arabica::XPath::XPathExpressionPtr<std::string> caseorder_;
ExecutionContext* context_;
Sort* sub_sort_; Sort* sub_sort_;
ExecutionContext* context_;
sortFn sort_fn_; sortFn sort_fn_;
Sort& operator=(const Sort&); Sort& operator=(const Sort&);

View file

@ -59,9 +59,9 @@ public:
oops(qName); oops(qName);
} // startElement } // startElement
virtual void endElement(const std::string& namespaceURI, virtual void endElement(const std::string& /* namespaceURI */,
const std::string& localName, const std::string& /* localName */,
const std::string& qName) const std::string& /* qName */)
{ {
} // endElement } // endElement
@ -79,7 +79,7 @@ public:
} // endDocument } // endDocument
private: private:
void startStylesheet(const std::string& namespaceURI, void startStylesheet(const std::string& /* namespaceURI */,
const std::string& localName, const std::string& localName,
const std::string& qName, const std::string& qName,
const SAX::Attributes<std::string>& atts) const SAX::Attributes<std::string>& atts)
@ -87,11 +87,11 @@ private:
if(localName != "stylesheet" && localName != "transform") if(localName != "stylesheet" && localName != "transform")
throw SAX::SAXException("Top-level element must be 'stylesheet' or 'transform'."); throw SAX::SAXException("Top-level element must be 'stylesheet' or 'transform'.");
static const ValueRule rules[] = { { "version", true, 0 }, static const ValueRule rules[] = { { "version", true, 0, 0 },
{ "extension-element-prefixes", false, 0 }, { "extension-element-prefixes", false, 0, 0 },
{ "exclude-result-prefixes", false, 0 }, { "exclude-result-prefixes", false, 0, 0 },
{ "id", false, 0 }, { "id", false, 0, 0 },
{ 0, false, 0 } }; { 0, false, 0, 0 } };
std::map<std::string, std::string> attributes = gatherAttributes(qName, atts, rules); std::map<std::string, std::string> attributes = gatherAttributes(qName, atts, rules);
if(attributes["version"] != StylesheetConstant::Version()) if(attributes["version"] != StylesheetConstant::Version())
throw SAX::SAXException("I'm only a poor version 1.0 XSLT Transformer."); throw SAX::SAXException("I'm only a poor version 1.0 XSLT Transformer.");

View file

@ -14,8 +14,8 @@ class Template : public ItemContainer
public: public:
Template(const std::string& name, Template(const std::string& name,
const std::string& mode, const std::string& mode,
const std::string& priority, const std::string& /* priority */,
const Precedence& precedence) : const Precedence& precedence) :
matches_(), matches_(),
name_(name), name_(name),
mode_(mode), mode_(mode),

View file

@ -24,7 +24,8 @@ public:
void set(const std::string& text) { text_ = text; } void set(const std::string& text) { text_ = text; }
virtual void execute(const DOM::Node<std::string>& node, ExecutionContext& context) const virtual void execute(const DOM::Node<std::string>& /* node */,
ExecutionContext& context) const
{ {
if(disable_) if(disable_)
context.sink().disableOutputEscaping(true); context.sink().disableOutputEscaping(true);

View file

@ -27,9 +27,9 @@ public:
virtual const std::string& namespace_uri() const { return namespace_uri_; } virtual const std::string& namespace_uri() const { return namespace_uri_; }
virtual const std::string& name() const { return name_; } virtual const std::string& name() const { return name_; }
virtual Arabica::XPath::XPathValue<std::string> value(const DOM::Node<std::string>& node, virtual Arabica::XPath::XPathValue<std::string> value(const DOM::Node<std::string>& /* node */,
ExecutionContext& context, ExecutionContext& /* context */,
DOMSink& sink) const DOMSink& /* sink */) const
{ {
return value_; return value_;
} // value } // value