本文整理汇总了C++中dom::DOMString::isEmpty方法的典型用法代码示例。如果您正苦于以下问题:C++ DOMString::isEmpty方法的具体用法?C++ DOMString::isEmpty怎么用?C++ DOMString::isEmpty使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类dom::DOMString
的用法示例。
在下文中一共展示了DOMString::isEmpty方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: addNamespace
void CSSStyleSheetImpl::addNamespace(CSSParser* p, const DOM::DOMString& prefix, const DOM::DOMString& uri)
{
if (uri.isEmpty())
return;
m_namespaces = new CSSNamespace(prefix, uri, m_namespaces);
if (prefix.isEmpty())
// Set the default namespace on the parser so that selectors that omit namespace info will
// be able to pick it up easily.
p->defaultNamespace = XmlNamespaceTable::getNamespaceID(uri, false);
}
示例2: addNamespace
void CSSStyleSheetImpl::addNamespace(CSSParser* p, const DOM::DOMString& prefix, const DOM::DOMString& uri)
{
int exceptioncode = 0;
if (uri.isEmpty())
return;
m_namespaces = new CSSNamespace(prefix, uri, m_namespaces);
if (prefix.isEmpty()) {
Q_ASSERT(m_doc != 0);
m_defaultNamespace = m_doc->getId(NodeImpl::NamespaceId, uri.implementation(), false, false, &exceptioncode);
}
}
示例3: determineNamespace
void CSSStyleSheetImpl::determineNamespace(Q_UINT32& id, const DOM::DOMString& prefix)
{
// If the stylesheet has no namespaces we can just return. There won't be any need to ever check
// namespace values in selectors.
if (!m_namespaces)
return;
if (prefix.isEmpty())
id = makeId(noNamespace, localNamePart(id)); // No namespace. If an element/attribute has a namespace, we won't match it.
else if (prefix == "*")
id = makeId(anyNamespace, localNamePart(id)); // We'll match any namespace.
else {
CSSNamespace* ns = m_namespaces->namespaceForPrefix(prefix);
if (ns)
// Look up the id for this namespace URI.
id = makeId(XmlNamespaceTable::getNamespaceID(ns->uri(), false), localNamePart(id));
}
}
示例4: determineNamespace
void CSSStyleSheetImpl::determineNamespace(NamespaceName &namespacename, const DOM::DOMString &prefix)
{
if (prefix.isEmpty()) {
namespacename = NamespaceName::fromId(emptyNamespace); // No namespace. If an element/attribute has a namespace, we won't match it.
} else if (prefix == "*") {
namespacename = NamespaceName::fromId(anyNamespace); // We'll match any namespace.
} else {
if (!m_namespaces) {
recomputeNamespaceInfo();
}
// To lookup the name, we go backwards, so the latest one wins
for (int p = m_namespaces->count() - 1; p >= 0; --p) {
CSSNamespaceRuleImpl *ns = m_namespaces->at(p);
if (ns->prefix() == prefix) {
namespacename = NamespaceName::fromString(ns->namespaceURI());
return;
}
}
}
}
示例5: determineNamespace
void CSSStyleSheetImpl::determineNamespace(Q_UINT32& id, const DOM::DOMString& prefix)
{
// If the stylesheet has no namespaces we can just return. There won't be any need to ever check
// namespace values in selectors.
if (!m_namespaces)
return;
if (prefix.isEmpty())
id = makeId(emptyNamespace, localNamePart(id)); // No namespace. If an element/attribute has a namespace, we won't match it.
else if (prefix == "*")
id = makeId(anyNamespace, localNamePart(id)); // We'll match any namespace.
else {
int exceptioncode = 0;
CSSNamespace* ns = m_namespaces->namespaceForPrefix(prefix);
if (ns) {
Q_ASSERT(m_doc != 0);
// Look up the id for this namespace URI.
Q_UINT16 nsid = m_doc->getId(NodeImpl::NamespaceId, 0, 0, ns->uri().implementation(), false, false, &exceptioncode);
id = makeId(nsid, localNamePart(id));
}
}
}