summaryrefslogtreecommitdiffstats
path: root/src/xmlpatterns/utils/qpatternistlocale_p.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/xmlpatterns/utils/qpatternistlocale_p.h')
-rw-r--r--src/xmlpatterns/utils/qpatternistlocale_p.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/xmlpatterns/utils/qpatternistlocale_p.h b/src/xmlpatterns/utils/qpatternistlocale_p.h
index 5dcd917..d8288c7 100644
--- a/src/xmlpatterns/utils/qpatternistlocale_p.h
+++ b/src/xmlpatterns/utils/qpatternistlocale_p.h
@@ -93,7 +93,8 @@ namespace QPatternist
Q_DISABLE_COPY(QtXmlPatterns)
};
- static inline QString formatKeyword(const QString &keyword)
+ // don't make this function static, otherwise xlC 7 cannot find it
+ inline QString formatKeyword(const QString &keyword)
{
return QLatin1String("<span class='XQuery-keyword'>") +
escape(keyword) +
@@ -168,6 +169,16 @@ namespace QPatternist
}
/**
+ * @short Formats name of any type.
+ */
+ static inline QString formatType(const NamePool::Ptr &np, const QXmlName &name)
+ {
+ return QLatin1String("<span class='XQuery-type'>") +
+ escape(np->displayName(name)) +
+ QLatin1String("</span>");
+ }
+
+ /**
* @short Formats Cardinality.
*/
static inline QString formatType(const Cardinality &type)