Bug 39305. Do not add 'xmlns=' and 'xmlns:foo=' as properties to the RDF graph.
git-svn-id: svn://10.0.0.236/trunk@69816 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -202,6 +202,7 @@ public:
|
||||
static nsIAtom* kSeqAtom;
|
||||
static nsIAtom* kAltAtom;
|
||||
static nsIAtom* kLiAtom;
|
||||
static nsIAtom* kXMLNSAtom;
|
||||
|
||||
protected:
|
||||
// Text management
|
||||
@@ -290,6 +291,7 @@ nsIAtom* RDFContentSinkImpl::kBagAtom;
|
||||
nsIAtom* RDFContentSinkImpl::kSeqAtom;
|
||||
nsIAtom* RDFContentSinkImpl::kAltAtom;
|
||||
nsIAtom* RDFContentSinkImpl::kLiAtom;
|
||||
nsIAtom* RDFContentSinkImpl::kXMLNSAtom;
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -339,6 +341,7 @@ RDFContentSinkImpl::RDFContentSinkImpl()
|
||||
kSeqAtom = NS_NewAtom("Seq");
|
||||
kAltAtom = NS_NewAtom("Alt");
|
||||
kLiAtom = NS_NewAtom("li");
|
||||
kXMLNSAtom = NS_NewAtom("xmlns");
|
||||
}
|
||||
|
||||
#ifdef PR_LOGGING
|
||||
@@ -429,6 +432,7 @@ RDFContentSinkImpl::~RDFContentSinkImpl()
|
||||
NS_IF_RELEASE(kSeqAtom);
|
||||
NS_IF_RELEASE(kAltAtom);
|
||||
NS_IF_RELEASE(kLiAtom);
|
||||
NS_IF_RELEASE(kXMLNSAtom);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1140,6 +1144,11 @@ RDFContentSinkImpl::AddProperties(const nsIParserNode& aNode,
|
||||
attr.get() == kResourceAtom))
|
||||
continue;
|
||||
|
||||
// skip 'xmlns' directives, these are "meta" information
|
||||
if ((nameSpaceID == kNameSpaceID_XMLNS) ||
|
||||
(attr.get() == kXMLNSAtom))
|
||||
continue;
|
||||
|
||||
nsAutoString v(aNode.GetValueAt(i));
|
||||
nsRDFParserUtils::StripAndConvert(v);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user