本文整理汇总了C++中QName::setLocal方法的典型用法代码示例。如果您正苦于以下问题:C++ QName::setLocal方法的具体用法?C++ QName::setLocal怎么用?C++ QName::setLocal使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类QName
的用法示例。
在下文中一共展示了QName::setLocal方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: processVertexAfterParse
eFlag Tree::processVertexAfterParse(Sit S, Vertex *v, TreeConstructer* tc)
{
//be careful with this test, it might be moved deeper inside this
//function if needed
if (v -> vt & VT_TOP_FOREIGN)
{
popVertex();
return OK;
}
XSL_OP theOp;
if (isXSLElement(v))
{
XSLElement *x = toX(v);
theOp = x -> op;
if (theOp != XSL_IMPORT) updateImportStatus();
switch(theOp)
{
//catch xsl:use-attribute-sets
case XSL_ELEMENT:
case XSL_COPY:
{
E( extractUsedSets(S, toE(v)) );
popVertex();
}; break;
case XSL_IMPORT:
{
if (subtrees.getCurrent() -> getStructure() -> getTopLevelFound())
{
Err2(S, E_ELEM_CONTAINS_ELEM,
xslOpNames[XSL_STYLESHEET],
xslOpNames[XSL_IMPORT]);
}
}; // no break
case XSL_INCLUDE:
{
Attribute *a = NZ( x -> atts.find(XSLA_HREF) );
GP( Tree ) srcTree;
const Str& base = S.findBaseURI(a -> getSubtreeInfo() ->
getBaseURI());
Str absolute;
makeAbsoluteURI(S, a -> cont, base, absolute);
if (S.getProcessor())
{
E( S.getProcessor() -> readTreeFromURI(S, srcTree,
a -> cont, base,
FALSE) );
srcTree.keep();
}
else
{
//Str absolute;
//makeAbsoluteURI(a -> cont, base, absolute);
srcTree = new Tree(absolute, FALSE);
DataLine d;
E( d.open(S, absolute, DLMODE_READ, /* argList = */ NULL) );
E( (*srcTree).parse(S, &d) );
E( d.close(S) );
}
Element *theSheet=(*srcTree).findStylesheet((*srcTree).getRoot());
if (!theSheet)
Warn1(S, W_NO_STYLESHEET, (char*)(a -> cont));
dropCurrentElement(v);
if (!theSheet) // to prevent segfault after include/import failure
break;
OutputterObj source;
//we start a subtree to record where the nodes come from
//when including, we use the old structure
//when importing, Tree creates a new one
E( startSubtree(S, (*srcTree).getURI(), theOp) );
//set extension namespaces for subtree
//(*srcTree).speakDebug();
//merge it into the current tree
E( tc -> parseUsingSAXForAWhile(S, source, absolute,
TRUE,
(Tree*)srcTree,
theSheet -> namespaces) );
//first we have to deal with ext. and excl. namespaces
Attribute *attr;
QName q;
//exclusions
q.setLocal((*srcTree).unexpand("exclude-result-prefixes"));
attr = theSheet->atts.find(q);
if (attr)
E(pushNamespacePrefixes(S, attr->cont, XSLA_EXCL_RES_PREFIXES));
//extensions
q.setLocal((*srcTree).unexpand("extension-element-prefixes"));
attr = theSheet->atts.find(q);
if (attr)
E(pushNamespacePrefixes(S, attr->cont, XSLA_EXT_ELEM_PREFIXES));
//.........这里部分代码省略.........