mirror of
https://github.com/jezhiggins/arabica
synced 2025-01-30 08:38:15 +01:00
more warnings silenced
This commit is contained in:
parent
327328c9aa
commit
2e82578767
10 changed files with 69 additions and 67 deletions
|
@ -21,9 +21,9 @@ public:
|
|||
{
|
||||
} // ~ApplyImportsHandler
|
||||
|
||||
virtual void startElement(const std::string& namespaceURI,
|
||||
const std::string& localName,
|
||||
const std::string& qName,
|
||||
virtual void startElement(const std::string& /* namespaceURI */,
|
||||
const std::string& /* localName */,
|
||||
const std::string& /* qName */,
|
||||
const SAX::Attributes<std::string>& atts)
|
||||
{
|
||||
if(applyImports_ == 0)
|
||||
|
@ -37,9 +37,9 @@ public:
|
|||
throw SAX::SAXException("xsl:apply-imports element must be empty");
|
||||
} // startElement
|
||||
|
||||
virtual void endElement(const std::string& namespaceURI,
|
||||
const std::string& localName,
|
||||
const std::string& qName)
|
||||
virtual void endElement(const std::string& /* namespaceURI */,
|
||||
const std::string& /* localName */,
|
||||
const std::string& /* qName */)
|
||||
{
|
||||
context_.parentContainer().add_item(applyImports_);
|
||||
context_.pop();
|
||||
|
|
|
@ -26,9 +26,9 @@ public:
|
|||
{
|
||||
if(applyTemplates_ == 0)
|
||||
{
|
||||
static const ValueRule rules[] = { { "select", false, 0 },
|
||||
{ "mode", false, 0 },
|
||||
{ 0, false, 0} };
|
||||
static const ValueRule rules[] = { { "select", false, 0, 0 },
|
||||
{ "mode", false, 0, 0 },
|
||||
{ 0, false, 0, 0} };
|
||||
std::map<std::string, std::string> attrs = gatherAttributes(qName, atts, rules);
|
||||
|
||||
const std::string& select = attrs["select"];
|
||||
|
@ -73,9 +73,9 @@ public:
|
|||
throw SAX::SAXException("xsl:apply-templates can only contain xsl:sort and xsl:with-param elements.");
|
||||
} // startElement
|
||||
|
||||
virtual void endElement(const std::string& namespaceURI,
|
||||
const std::string& localName,
|
||||
const std::string& qName)
|
||||
virtual void endElement(const std::string& /* namespaceURI */,
|
||||
const std::string& /* localName */,
|
||||
const std::string& /* qName */)
|
||||
{
|
||||
context_.parentContainer().add_item(applyTemplates_);
|
||||
context_.pop();
|
||||
|
|
|
@ -18,14 +18,14 @@ public:
|
|||
} // AttributeHandler
|
||||
|
||||
protected:
|
||||
virtual Attribute* createContainer(const std::string& namespaceURI,
|
||||
const std::string& localName,
|
||||
virtual Attribute* createContainer(const std::string& /* namespaceURI */,
|
||||
const std::string& /* localName */,
|
||||
const std::string& qName,
|
||||
const SAX::Attributes<std::string>& atts)
|
||||
{
|
||||
static const ValueRule rules[] = { { "name", true, 0 },
|
||||
{ "namespace", false, 0 },
|
||||
{ 0, false, 0} };
|
||||
static const ValueRule rules[] = { { "name", true, 0, 0 },
|
||||
{ "namespace", false, 0, 0 },
|
||||
{ 0, false, 0, 0 } };
|
||||
|
||||
std::map<std::string, std::string> attrs = gatherAttributes(qName, atts, rules);
|
||||
|
||||
|
|
|
@ -25,8 +25,8 @@ public:
|
|||
{
|
||||
if(callTemplate_ == 0)
|
||||
{
|
||||
static const ValueRule rules[] = { { "name", true, 0 },
|
||||
{ 0, false, 0} };
|
||||
static const ValueRule rules[] = { { "name", true, 0, 0 },
|
||||
{ 0, false, 0, 0 } };
|
||||
|
||||
std::map<std::string, std::string> attrs = gatherAttributes(qName, atts, rules);
|
||||
|
||||
|
@ -50,15 +50,15 @@ public:
|
|||
throw SAX::SAXException("xsl:apply-templates can only contain xsl:sort and xsl:with-param elements.");
|
||||
} // startElement
|
||||
|
||||
virtual void endElement(const std::string& namespaceURI,
|
||||
const std::string& localName,
|
||||
const std::string& qName)
|
||||
virtual void endElement(const std::string& /* namespaceURI */,
|
||||
const std::string& /* localName */,
|
||||
const std::string& /* qName */)
|
||||
{
|
||||
context_.parentContainer().add_item(callTemplate_);
|
||||
context_.pop();
|
||||
} // endElement
|
||||
|
||||
virtual void characters(const std::string& ch)
|
||||
virtual void characters(const std::string& /* ch */)
|
||||
{
|
||||
} // characters
|
||||
|
||||
|
|
|
@ -18,19 +18,21 @@ public:
|
|||
{
|
||||
} // WhenHandler
|
||||
|
||||
virtual When* createContainer(const std::string& namespaceURI,
|
||||
const std::string& localName,
|
||||
const std::string& qName,
|
||||
const SAX::Attributes<std::string>& atts)
|
||||
virtual When* createContainer(const std::string& /* namespaceURI */,
|
||||
const std::string& /* localName */,
|
||||
const std::string& qName,
|
||||
const SAX::Attributes<std::string>& atts)
|
||||
{
|
||||
static const ValueRule rules[] = { { "test", true, 0 },
|
||||
{ 0, false, 0} };
|
||||
static const ValueRule rules[] = { { "test", true, 0. 0 },
|
||||
{ 0, false, 0, 0 } };
|
||||
std::string test = gatherAttributes(qName, atts, rules)["test"];
|
||||
|
||||
return new When(ItemContainerHandler<When>::context().xpath_expression(test));
|
||||
} // startElement
|
||||
|
||||
virtual void endElement(const std::string& namespaceURI, const std::string& localName, const std::string& qName)
|
||||
virtual void endElement(const std::string& /* namespaceURI */,
|
||||
const std::string& /* localName */,
|
||||
const std::string& /* qName */)
|
||||
{
|
||||
choose_->add_when(ItemContainerHandler<When>::container());
|
||||
context().pop();
|
||||
|
@ -50,9 +52,9 @@ public:
|
|||
{
|
||||
} // OtherwiseHandler
|
||||
|
||||
virtual Otherwise* createContainer(const std::string& namespaceURI,
|
||||
const std::string& localName,
|
||||
const std::string& qName,
|
||||
virtual Otherwise* createContainer(const std::string& /* namespaceURI */,
|
||||
const std::string& /* localName */,
|
||||
const std::string& /* qName */,
|
||||
const SAX::Attributes<std::string>& atts)
|
||||
{
|
||||
if(atts.getLength())
|
||||
|
@ -61,9 +63,9 @@ public:
|
|||
return new Otherwise();
|
||||
} // createContainer
|
||||
|
||||
virtual void endElement(const std::string& namespaceURI,
|
||||
const std::string& localName,
|
||||
const std::string& qName)
|
||||
virtual void endElement(const std::string& /* namespaceURI */,
|
||||
const std::string& /* localName */,
|
||||
const std::string& /* qName */)
|
||||
{
|
||||
choose_->set_otherwise(container());
|
||||
context().pop();
|
||||
|
@ -132,9 +134,9 @@ public:
|
|||
throw SAX::SAXException("xsl:choose can not contain " + qName + ". Only xsl:when and xsl:otherwise are allowed");
|
||||
} // startElement
|
||||
|
||||
virtual void endElement(const std::string& namespaceURI,
|
||||
const std::string& localName,
|
||||
const std::string& qName)
|
||||
virtual void endElement(const std::string& /* namespaceURI */,
|
||||
const std::string& /* localName */,
|
||||
const std::string& /* qName */)
|
||||
{
|
||||
if(!seenWhere_)
|
||||
throw SAX::SAXException("xsl:choose must contain at least one xsl:where element");
|
||||
|
|
|
@ -17,9 +17,9 @@ public:
|
|||
{
|
||||
} // CommentHandler
|
||||
|
||||
virtual Comment* createContainer(const std::string& namespaceURI,
|
||||
const std::string& localName,
|
||||
const std::string& qName,
|
||||
virtual Comment* createContainer(const std::string& /* namespaceURI */,
|
||||
const std::string& /* localName */,
|
||||
const std::string& /* qName */,
|
||||
const SAX::Attributes<std::string>& atts)
|
||||
{
|
||||
if(atts.getLength() != 0)
|
||||
|
|
|
@ -16,13 +16,13 @@ public:
|
|||
{
|
||||
} // CopyHandler
|
||||
|
||||
virtual Copy* createContainer(const std::string& namespaceURI,
|
||||
const std::string& localName,
|
||||
virtual Copy* createContainer(const std::string& /* namespaceURI */,
|
||||
const std::string& /* localName */,
|
||||
const std::string& qName,
|
||||
const SAX::Attributes<std::string>& atts)
|
||||
{
|
||||
static const ValueRule rules[] = { { "use-attribute-sets", false, 0 },
|
||||
{ 0, false, 0} };
|
||||
static const ValueRule rules[] = { { "use-attribute-sets", false, 0, 0 },
|
||||
{ 0, false, 0, 0 } };
|
||||
std::string sets = gatherAttributes(qName, atts, rules)["use-attribute-sets"];
|
||||
|
||||
return new Copy(sets);
|
||||
|
@ -38,15 +38,15 @@ public:
|
|||
{
|
||||
} // CopyOfHandler
|
||||
|
||||
virtual void startElement(const std::string& namespaceURI,
|
||||
const std::string& localName,
|
||||
virtual void startElement(const std::string& /* namespaceURI */,
|
||||
const std::string& /* localName */,
|
||||
const std::string& qName,
|
||||
const SAX::Attributes<std::string>& atts)
|
||||
{
|
||||
if(copyOf_ == 0)
|
||||
{
|
||||
static const ValueRule rules[] = { { "select", true, 0 },
|
||||
{ 0, false, 0} };
|
||||
static const ValueRule rules[] = { { "select", true, 0, 0 },
|
||||
{ 0, false, 0, 0 } };
|
||||
std::string select = gatherAttributes(qName, atts, rules)["select"];
|
||||
|
||||
copyOf_ = new CopyOf(context_.xpath_expression(select));
|
||||
|
@ -57,9 +57,9 @@ public:
|
|||
throw SAX::SAXException(qName + " can not contain elements");
|
||||
} // startElement
|
||||
|
||||
virtual void endElement(const std::string& namespaceURI,
|
||||
const std::string& localName,
|
||||
const std::string& qName)
|
||||
virtual void endElement(const std::string& /* namespaceURI */,
|
||||
const std::string& /* localName */,
|
||||
const std::string& /* qName */)
|
||||
{
|
||||
context_.parentContainer().add_item(copyOf_);
|
||||
context_.pop();
|
||||
|
|
|
@ -23,12 +23,12 @@ SAX::DefaultHandler<std::string>* CreateHandler(CompilationContext& context)
|
|||
class NotImplementedYetHandler : public SAX::DefaultHandler<std::string>
|
||||
{
|
||||
public:
|
||||
NotImplementedYetHandler(CompilationContext& context) { }
|
||||
NotImplementedYetHandler(CompilationContext& /* context */) { }
|
||||
|
||||
virtual void startElement(const std::string& namespaceURI,
|
||||
const std::string& localName,
|
||||
virtual void startElement(const std::string& /* namespaceURI */,
|
||||
const std::string& /* localName */,
|
||||
const std::string& qName,
|
||||
const SAX::Attributes<std::string>& atts)
|
||||
const SAX::Attributes<std::string>& /* atts */)
|
||||
{
|
||||
throw SAX::SAXException("Haven't implemented " + qName + " yet");
|
||||
} // startElement
|
||||
|
|
|
@ -18,15 +18,15 @@ public:
|
|||
} // ElementHandler
|
||||
|
||||
protected:
|
||||
virtual Element* createContainer(const std::string& namespaceURI,
|
||||
const std::string& localName,
|
||||
virtual Element* createContainer(const std::string& /* namespaceURI */,
|
||||
const std::string& /* localName */,
|
||||
const std::string& qName,
|
||||
const SAX::Attributes<std::string>& atts)
|
||||
{
|
||||
static const ValueRule rules[] = { { "name", true, 0 },
|
||||
{ "namespace", false, 0 },
|
||||
{ "use-attribute-sets", false, 0 },
|
||||
{ 0, false, 0} };
|
||||
static const ValueRule rules[] = { { "name", true, 0, 0 },
|
||||
{ "namespace", false, 0, 0 },
|
||||
{ "use-attribute-sets", false, 0, 0 },
|
||||
{ 0, false, 0, 0 } };
|
||||
|
||||
std::map<std::string, std::string> attrs = gatherAttributes(qName, atts, rules);
|
||||
|
||||
|
|
|
@ -202,16 +202,16 @@ private:
|
|||
typedef std::pair<std::string, std::string> Namespace;
|
||||
|
||||
StylesheetParser& parser_;
|
||||
Arabica::XPath::XPath<std::string> xpath_;
|
||||
CompiledStylesheet& stylesheet_;
|
||||
mutable int autoNs_;
|
||||
mutable bool current_allowed_;
|
||||
Precedence precedence_;
|
||||
Arabica::XPath::XPath<std::string> xpath_;
|
||||
std::stack<SAX::DefaultHandler<std::string>*> handlerStack_;
|
||||
std::stack<ItemContainer*> parentStack_;
|
||||
std::map<std::string, Namespace> namespaceRemap_;
|
||||
Precedence precedence_;
|
||||
|
||||
CompilationContext(const CompilationContext&);
|
||||
mutable int autoNs_;
|
||||
mutable bool current_allowed_;
|
||||
|
||||
class DisallowCurrent
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue