summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/xmlpatterns/functions/qgenerateidfn.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/xmlpatterns/functions/qgenerateidfn.cpp b/src/xmlpatterns/functions/qgenerateidfn.cpp
index b4264ae..f85381e 100644
--- a/src/xmlpatterns/functions/qgenerateidfn.cpp
+++ b/src/xmlpatterns/functions/qgenerateidfn.cpp
@@ -47,11 +47,12 @@ using namespace QPatternist;
Item GenerateIDFN::evaluateSingleton(const DynamicContext::Ptr &context) const
{
- const QXmlNodeModelIndex &node = m_operands.first()->evaluateSingleton(context).asNode();
-
- if(node.isNull())
+ const Item item = m_operands.first()->evaluateSingleton(context);
+ if (item.isNull())
return AtomicString::fromValue(QString());
+ const QXmlNodeModelIndex &node = item.asNode();
+
return AtomicString::fromValue(QLatin1Char('T')
+ QString::number(qptrdiff(node.model()))
+ QString::number(qptrdiff(node.internalPointer()))