dbertoni 01/08/05 19:15:03
Modified: c/src/DOMSupport DOMServices.hpp
Log:
New function.
Revision Changes Path
1.25 +16 -2 xml-xalan/c/src/DOMSupport/DOMServices.hpp
Index: DOMServices.hpp
===================================================================
RCS file: /home/cvs/xml-xalan/c/src/DOMSupport/DOMServices.hpp,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -r1.24 -r1.25
--- DOMServices.hpp 2001/07/23 01:37:56 1.24
+++ DOMServices.hpp 2001/08/06 02:15:03 1.25
@@ -534,8 +534,6 @@
}
else
{
- assert(length(n.getNodeName()) != 0);
-
return n.getNodeName();
}
}
@@ -550,6 +548,22 @@
*/
static const XalanDOMString&
getNamespaceOfNode(const XalanNode& n);
+
+ /**
+ * Determine whether or not an attribute node
+ * is declaring a namespace.
+ *
+ * @param node DOM node to check
+ * @return true if the attribute is declaring a namespace, false if not.
+ */
+ static bool
+ isNamespaceDeclaration(const XalanAttr& n)
+ {
+ const XalanDOMString& theName = n.getNodeName();
+
+ return startsWith(theName,
DOMServices::s_XMLNamespaceWithSeparator) == true ||
+ equals(theName, DOMServices::s_XMLNamespace) ==
true;
+ }
/**
* Retrieve the parent of a node. This function has to be implemented,
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]