mirror of
https://github.com/jezhiggins/arabica
synced 2025-01-13 08:01:17 +01:00
This commit is contained in:
parent
51e4cad4a0
commit
261f589f47
1 changed files with 8 additions and 9 deletions
|
@ -219,17 +219,16 @@ public:
|
||||||
Axis axis,
|
Axis axis,
|
||||||
bool is_attr = false)
|
bool is_attr = false)
|
||||||
{
|
{
|
||||||
NodeTest<string_type, string_adaptor>* test = getTest(node, end, !is_attr ? axis : ATTRIBUTE, context.namespaceContext());
|
std::auto_ptr<NodeTest<string_type, string_adaptor> > test(getTest(node, end, !is_attr ? axis : ATTRIBUTE, context.namespaceContext()));
|
||||||
XPathExpression_impl<string_type, string_adaptor>* thing = 0;
|
std::auto_ptr<XPathExpression_impl<string_type, string_adaptor> > thing;
|
||||||
if(!test)
|
if(test.get() == 0)
|
||||||
thing = XPath<string_type, string_adaptor>::compile_expression(node++, end, context);
|
thing.reset(XPath<string_type, string_adaptor>::compile_expression(node++, end, context));
|
||||||
|
|
||||||
std::vector<XPathExpression_impl<string_type, string_adaptor>*> preds =
|
std::vector<XPathExpression_impl<string_type, string_adaptor>*> preds = createPredicates(node, end, context);
|
||||||
createPredicates(node, end, context);
|
|
||||||
|
|
||||||
if(!test)
|
if(test.get() == 0)
|
||||||
return new ExprStepExpression<string_type, string_adaptor>(thing, preds);
|
return new ExprStepExpression<string_type, string_adaptor>(thing.release(), preds);
|
||||||
return new TestStepExpression<string_type, string_adaptor>(axis, test, preds);
|
return new TestStepExpression<string_type, string_adaptor>(axis, test.release(), preds);
|
||||||
} // createStep
|
} // createStep
|
||||||
|
|
||||||
static StepExpression<string_type, string_adaptor>* createFilter(const typename types<string_adaptor>::node_iter_t& node,
|
static StepExpression<string_type, string_adaptor>* createFilter(const typename types<string_adaptor>::node_iter_t& node,
|
||||||
|
|
Loading…
Reference in a new issue