Supported XML namespace decls as attributes of HTML content embedded in XML
git-svn-id: svn://10.0.0.236/trunk@21056 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -42,6 +42,7 @@
|
||||
#include "nsICSSParser.h"
|
||||
#include "nsICSSStyleSheet.h"
|
||||
#include "nsHTMLAtoms.h"
|
||||
#include "nsLayoutAtoms.h"
|
||||
#include "nsIScriptContext.h"
|
||||
#include "nsIScriptContextOwner.h"
|
||||
#include "nsINameSpace.h"
|
||||
@@ -430,7 +431,13 @@ nsXMLContentSink::AddAttributes(const nsIParserNode& aNode,
|
||||
nsIAtom* nameSpacePrefix = CutNameSpacePrefix(name);
|
||||
nsIAtom* nameAtom = NS_NewAtom(name);
|
||||
PRInt32 nameSpaceID = GetNameSpaceId(nameSpacePrefix);
|
||||
if ((kNameSpaceID_None == nameSpaceID) && aIsHTML) {
|
||||
if ((kNameSpaceID_XMLNS == nameSpaceID) && aIsHTML) {
|
||||
NS_RELEASE(nameAtom);
|
||||
name.Insert("xmlns:", 0);
|
||||
nameAtom = NS_NewAtom(name);
|
||||
nameSpaceID = kNameSpaceID_HTML;
|
||||
}
|
||||
else if ((kNameSpaceID_None == nameSpaceID) && aIsHTML) {
|
||||
nameSpaceID = kNameSpaceID_HTML;
|
||||
}
|
||||
|
||||
|
||||
@@ -6,6 +6,9 @@ Inc.</Title>
|
||||
<p xmlns="http://www.w3.org/TR/REC-html40" xmlns:h="http://www.w3.org/TR/REC-html40">
|
||||
<h:img src="flamer.gif"/>
|
||||
<img src="flamer.gif"/>
|
||||
<button>
|
||||
<h1>Some text</h1>
|
||||
</button>
|
||||
</p>
|
||||
<BookInfo> <BookBiblio> <Title>Demo Product Documentation</Title>
|
||||
<AuthorGroup><CorpAuthor>SoftQuad Inc.</CorpAuthor></AuthorGroup>
|
||||
|
||||
@@ -42,6 +42,7 @@
|
||||
#include "nsICSSParser.h"
|
||||
#include "nsICSSStyleSheet.h"
|
||||
#include "nsHTMLAtoms.h"
|
||||
#include "nsLayoutAtoms.h"
|
||||
#include "nsIScriptContext.h"
|
||||
#include "nsIScriptContextOwner.h"
|
||||
#include "nsINameSpace.h"
|
||||
@@ -430,7 +431,13 @@ nsXMLContentSink::AddAttributes(const nsIParserNode& aNode,
|
||||
nsIAtom* nameSpacePrefix = CutNameSpacePrefix(name);
|
||||
nsIAtom* nameAtom = NS_NewAtom(name);
|
||||
PRInt32 nameSpaceID = GetNameSpaceId(nameSpacePrefix);
|
||||
if ((kNameSpaceID_None == nameSpaceID) && aIsHTML) {
|
||||
if ((kNameSpaceID_XMLNS == nameSpaceID) && aIsHTML) {
|
||||
NS_RELEASE(nameAtom);
|
||||
name.Insert("xmlns:", 0);
|
||||
nameAtom = NS_NewAtom(name);
|
||||
nameSpaceID = kNameSpaceID_HTML;
|
||||
}
|
||||
else if ((kNameSpaceID_None == nameSpaceID) && aIsHTML) {
|
||||
nameSpaceID = kNameSpaceID_HTML;
|
||||
}
|
||||
|
||||
|
||||
@@ -6,6 +6,9 @@ Inc.</Title>
|
||||
<p xmlns="http://www.w3.org/TR/REC-html40" xmlns:h="http://www.w3.org/TR/REC-html40">
|
||||
<h:img src="flamer.gif"/>
|
||||
<img src="flamer.gif"/>
|
||||
<button>
|
||||
<h1>Some text</h1>
|
||||
</button>
|
||||
</p>
|
||||
<BookInfo> <BookBiblio> <Title>Demo Product Documentation</Title>
|
||||
<AuthorGroup><CorpAuthor>SoftQuad Inc.</CorpAuthor></AuthorGroup>
|
||||
|
||||
Reference in New Issue
Block a user