本文整理汇总了C++中QName::getLocal方法的典型用法代码示例。如果您正苦于以下问题:C++ QName::getLocal方法的具体用法?C++ QName::getLocal怎么用?C++ QName::getLocal使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类QName
的用法示例。
在下文中一共展示了QName::getLocal方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: cmpQNamesForeign
Bool Tree::cmpQNamesForeign(const QName &q, const HashTable& dictForeign, const QName &qForeign)
{
/*
printf("comparing names (%s,%s,%s) and (%s,%s,%s)\n",
(char*)(((Tree*)this)->expand(q.getPrefix())),
(char*)(((Tree*)this)->expand(q.getUri())),
(char*)(((Tree*)this)->expand(q.getLocal())),
(char*)(dictForeign.getKey(qForeign.getPrefix())),
(char*)(dictForeign.getKey(qForeign.getUri())),
(char*)(dictForeign.getKey(qForeign.getLocal()))
);
*/
if (q.getLocal() == stdPhrase(PHRASE_STAR))
{
return (Bool)(q.getPrefix() == UNDEF_PHRASE ||
(dict().getKey(q.getUri()) == dictForeign.getKey(qForeign.getUri())));
}
else
{
return (Bool)
(dict().getKey(q.getUri()) == dictForeign.getKey(qForeign.getUri()) &&
dict().getKey(q.getLocal()) == dictForeign.getKey(qForeign.getLocal()));
}
}
示例2: cmpQNameStrings
Bool Tree::cmpQNameStrings(const QName &q, const Str& uri, const Str& local)
{
if (q.getLocal() == stdPhrase(PHRASE_STAR))
return (Bool)(
q.getUri() == UNDEF_PHRASE || dict().getKey(q.getUri()) == uri);
else
{
return (Bool)
(dict().getKey(q.getUri()) == uri &&
dict().getKey(q.getLocal()) == local);
}
}
示例3: insertRule
eFlag Tree::insertRule(Sit S, XSLElement *tmpl)
{
double prio;
Attribute *a = tmpl -> atts.find(XSLA_PRIORITY);
if (!a)
prio = defaultPriority(tmpl);
else
{
if (a -> cont.toDouble(prio))
Err(S, ET_BAD_NUMBER);
};
QName q;
GP( QName ) mode = NULL;
if (!!(a = tmpl -> atts.find(XSLA_NAME)))
E( tmpl -> setLogical(S, q, a -> cont, FALSE) );
if (q.getLocal() != UNDEF_PHRASE &&
subtrees.getCurrent() -> getStructure() ->
rules().findByName(*this, q))
{
Str fullName;
expandQStr(q, fullName);
Err1(S, ET_DUPLICATE_RULE_NAME, fullName);
};
if (!!(a = tmpl -> atts.find(XSLA_MODE)))
E( tmpl -> setLogical(S, *(mode = new QName),
a -> cont, FALSE) );
subtrees.getCurrent() -> getStructure() ->
rules().insert(new RuleItem(tmpl,prio,q,mode.keep()));
return OK;
}
示例4: cmpQNames
Bool Tree::cmpQNames(const QName &first, const QName &second) const
{
/*
printf("comparing names (%s,%s,%s) and (%s,%s,%s)\n",
(char*)(((Tree*)this)->expand(first.getPrefix())),
(char*)(((Tree*)this)->expand(first.getUri())),
(char*)(((Tree*)this)->expand(first.getLocal())),
(char*)(((Tree*)this)->expand(second.getPrefix())),
(char*)(((Tree*)this)->expand(second.getUri())),
(char*)(((Tree*)this)->expand(second.getLocal()))
);
*/
if (first.getLocal() == stdPhrase(PHRASE_STAR))
return (Bool)(first.getPrefix() == UNDEF_PHRASE ||
first.getUri() == second.getUri());
else
return (Bool) (first.getUri() == second.getUri()
&& first.getLocal() == second.getLocal());
}
示例5: insertAttSet
eFlag Tree::insertAttSet(Sit S, XSLElement *tmpl)
{
QName q;
Attribute *a;
GP( QName ) sets = NULL;
if (!!(a = tmpl -> atts.find(XSLA_NAME)))
E( tmpl -> setLogical(S, q, a -> cont, FALSE) );
if (q.getLocal() != UNDEF_PHRASE &&
attSets().findByName(q))
{
Str fullName;
expandQStr(q, fullName);
Err1(S, ET_DUPLICATE_ASET_NAME, fullName);
};
attSets().append(new AttSet(q));
return OK;
}
示例6: set
void EQName::set(const QName& q, const HashTable& dict)
{
prefix = dict.getKey(q.getPrefix());
uri = dict.getKey(q.getUri());
local = dict.getKey(q.getLocal());
}
示例7: expandQ
void Tree::expandQ(const QName& q, EQName& expanded)
{
expanded.setLocal(expand(q.getLocal()));
expanded.setUri(expand(q.getUri()));
expanded.setPrefix(expand(q.getPrefix()));
}