Made default namespaces work.

git-svn-id: svn://10.0.0.236/trunk@21700 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
waterson%netscape.com
1999-02-24 04:47:19 +00:00
parent 1462190b0e
commit 52325e43b2

View File

@@ -1417,10 +1417,15 @@ XULContentSinkImpl::PushNameSpacesFrom(const nsIParserNode& aNode)
if (0 == offset) {
prefix.Truncate();
PRUnichar next = k.CharAt(sizeof(kNameSpaceDef)-1);
// If the next character is a :, there is a namespace prefix
if (':' == next) {
k.Right(prefix, k.Length()-sizeof(kNameSpaceDef));
if (k.Length() >= sizeof(kNameSpaceDef)) {
// If the next character is a :, there is a namespace prefix
PRUnichar next = k.CharAt(sizeof(kNameSpaceDef)-1);
if (':' == next) {
k.Right(prefix, k.Length()-sizeof(kNameSpaceDef));
}
else {
continue; // it's not "xmlns:"
}
}
// Get the attribute value (the URI for the namespace)