Corrected spelling of precedence. I have no idea why I had it wrong in the first place, it just seems to be what comes out of my fingers

This commit is contained in:
jez 2008-08-06 12:07:59 +01:00
parent b187cc1667
commit fc2a67619b
3 changed files with 13 additions and 13 deletions

View file

@ -40,7 +40,7 @@ public:
stylesheet_(stylesheet),
sink_(output.asOutput()),
message_sink_(error_output),
variable_precendence_(0),
variable_precedence_(0),
to_msg_(0)
{
xpathContext_.setVariableResolver(stack_);
@ -52,7 +52,7 @@ public:
stack_(rhs.stack_),
sink_(output.asOutput()),
message_sink_(rhs.message_sink_),
variable_precendence_(rhs.variable_precendence_),
variable_precedence_(rhs.variable_precedence_),
to_msg_(false)
{
xpathContext_.setVariableResolver(stack_);
@ -77,8 +77,8 @@ public:
void unpassParam(const std::string& name);
void declareParam(const DOM::Node<std::string>& node, const Variable_declaration& param);
void declareVariable(const DOM::Node<std::string>& node, const Variable_declaration& variable);
void pushVariablePrecendence() { ++variable_precendence_; }
int variablePrecendence() { return variable_precendence_; }
void pushVariablePrecedence() { ++variable_precedence_; }
int variablePrecedence() { return variable_precedence_; }
void freezeTopLevel();
void injectGlobalScope(const Scope& scope);
@ -104,7 +104,7 @@ private:
private:
const Stylesheet& stylesheet_;
VariableStack stack_;
int variable_precendence_;
int variable_precedence_;
Arabica::XPath::ExecutionContext<std::string> xpathContext_;
Output& sink_;
StreamSink message_sink_;
@ -127,7 +127,7 @@ public:
virtual const std::string& namespace_uri() const { return var_.namespace_uri(); }
virtual const std::string& name() const { return var_.name(); }
virtual int precendence() const { return context_.variablePrecendence(); }
virtual int precedence() const { return context_.variablePrecedence(); }
virtual Arabica::XPath::XPathValue<std::string> value() const
{
@ -193,7 +193,7 @@ void ExecutionContext::declareVariable(const DOM::Node<std::string>& node, const
void ExecutionContext::freezeTopLevel()
{
stack_.freezeTopLevel();
variable_precendence_ = 0;
variable_precedence_ = -1;
} // freezeTopLevel
void ExecutionContext::injectGlobalScope(const Scope& scope)

View file

@ -85,7 +85,7 @@ public:
{
for(ItemList::const_iterator ci = isi->begin(), ce = isi->end(); ci != ce; ++ci)
(*ci)->execute(initialNode, context);
context.pushVariablePrecendence();
context.pushVariablePrecedence();
} // for ...
context.freezeTopLevel();

View file

@ -22,7 +22,7 @@ public:
virtual const std::string& namespace_uri() const = 0;
virtual const std::string& name() const = 0;
virtual int precendence() const = 0;
virtual int precedence() const = 0;
virtual Arabica::XPath::XPathValue<std::string> value() const = 0;
virtual void injectGlobalScope(const Scope& scope) const = 0;
@ -32,7 +32,7 @@ private:
Variable_instance& operator=(const Variable_instance&);
bool operator==(const Variable_instance&) const;
int precendence_;
int precedence_;
}; // Variable_instance
class VariableStack : public Arabica::XPath::VariableResolver<std::string>
@ -108,10 +108,10 @@ public:
if(stack.find(name) != stack.end())
{
int current_p = stack[name]->precendence();
if(var->precendence() == current_p)
int current_p = stack[name]->precedence();
if(var->precedence() == current_p)
throw std::runtime_error("Duplicate variable name : " + clarkName(var));
if(var->precendence() > current_p)
if(var->precedence() > current_p)
return;
} // if ...