mirror of
https://github.com/jezhiggins/arabica
synced 2024-11-17 07:48:50 +01:00
check xsl:for-each selects a node-set, I suspect it should be able to diagnose this at compile time but it at least it fails :)
This commit is contained in:
parent
ccbdeeaa41
commit
4ed4928695
1 changed files with 4 additions and 0 deletions
|
@ -25,6 +25,10 @@ public:
|
|||
|
||||
virtual void execute(const DOM::Node<std::string>& node, ExecutionContext& context) const
|
||||
{
|
||||
Arabica::XPath::XPathValue<std::string> sel = select_->evaluate(node, context.xpathContext());
|
||||
if(sel.type() != Arabica::XPath::NODE_SET)
|
||||
throw SAX::SAXException("xsl:for-each must select a node set");
|
||||
|
||||
Arabica::XPath::NodeSet<std::string> nodes = select_->evaluateAsNodeSet(node, context.xpathContext());
|
||||
sort(node, nodes, context);
|
||||
|
||||
|
|
Loading…
Reference in a new issue