Added new namespace/attribute parsing methods to nsIContent

This commit is contained in:
vidur%netscape.com 1999-01-12 16:38:28 +00:00
parent 274a4add3e
commit d63e315360
4 changed files with 112 additions and 6 deletions

View File

@ -435,7 +435,7 @@ nsRDFElement::GetTagName(nsString& aTagName)
NS_IMETHODIMP NS_IMETHODIMP
nsRDFElement::GetDOMAttribute(const nsString& aName, nsString& aReturn) nsRDFElement::GetAttribute(const nsString& aName, nsString& aReturn)
{ {
PR_ASSERT(0); PR_ASSERT(0);
return NS_ERROR_NOT_IMPLEMENTED; return NS_ERROR_NOT_IMPLEMENTED;
@ -443,7 +443,7 @@ nsRDFElement::GetDOMAttribute(const nsString& aName, nsString& aReturn)
NS_IMETHODIMP NS_IMETHODIMP
nsRDFElement::SetDOMAttribute(const nsString& aName, const nsString& aValue) nsRDFElement::SetAttribute(const nsString& aName, const nsString& aValue)
{ {
PR_ASSERT(0); PR_ASSERT(0);
return NS_ERROR_NOT_IMPLEMENTED; return NS_ERROR_NOT_IMPLEMENTED;
@ -844,6 +844,25 @@ nsRDFElement::GetTag(nsIAtom*& aResult) const
return NS_OK; return NS_OK;
} }
NS_IMETHODIMP
nsRDFElement::ParseAttributeString(const nsString& aStr,
nsIAtom*& aName,
PRInt32& aNameSpaceID)
{
// XXX Need to implement
aName = nsnull;
aNameSpaceID = kNameSpaceID_None;
return NS_OK;
}
NS_IMETHODIMP
nsRDFElement::GetNameSpacePrefix(PRInt32 aNameSpaceID,
nsIAtom*& aPrefix)
{
// XXX Need to implement
aPrefix = nsnull;
return NS_OK;
}
// XXX attribute code swiped from nsGenericContainerElement // XXX attribute code swiped from nsGenericContainerElement
// this class could probably just use nsGenericContainerElement // this class could probably just use nsGenericContainerElement
@ -1220,6 +1239,21 @@ nsRDFElement::GetRangeList(nsVoidArray*& aResult) const
//////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////
// nsIXMLContent // nsIXMLContent
NS_IMETHODIMP
nsRDFElement::SetContainingNameSpace(nsINameSpace* aNameSpace)
{
// XXX Need to implement
return NS_OK;
}
NS_IMETHODIMP
nsRDFElement::GetContainingNameSpace(nsINameSpace*& aNameSpace) const
{
// XXX Need to implement
aNameSpace = nsnull;
return NS_OK;
}
NS_IMETHODIMP NS_IMETHODIMP
nsRDFElement::SetNameSpacePrefix(nsIAtom* aNameSpacePrefix) nsRDFElement::SetNameSpacePrefix(nsIAtom* aNameSpacePrefix)
{ {

View File

@ -435,7 +435,7 @@ nsRDFElement::GetTagName(nsString& aTagName)
NS_IMETHODIMP NS_IMETHODIMP
nsRDFElement::GetDOMAttribute(const nsString& aName, nsString& aReturn) nsRDFElement::GetAttribute(const nsString& aName, nsString& aReturn)
{ {
PR_ASSERT(0); PR_ASSERT(0);
return NS_ERROR_NOT_IMPLEMENTED; return NS_ERROR_NOT_IMPLEMENTED;
@ -443,7 +443,7 @@ nsRDFElement::GetDOMAttribute(const nsString& aName, nsString& aReturn)
NS_IMETHODIMP NS_IMETHODIMP
nsRDFElement::SetDOMAttribute(const nsString& aName, const nsString& aValue) nsRDFElement::SetAttribute(const nsString& aName, const nsString& aValue)
{ {
PR_ASSERT(0); PR_ASSERT(0);
return NS_ERROR_NOT_IMPLEMENTED; return NS_ERROR_NOT_IMPLEMENTED;
@ -844,6 +844,25 @@ nsRDFElement::GetTag(nsIAtom*& aResult) const
return NS_OK; return NS_OK;
} }
NS_IMETHODIMP
nsRDFElement::ParseAttributeString(const nsString& aStr,
nsIAtom*& aName,
PRInt32& aNameSpaceID)
{
// XXX Need to implement
aName = nsnull;
aNameSpaceID = kNameSpaceID_None;
return NS_OK;
}
NS_IMETHODIMP
nsRDFElement::GetNameSpacePrefix(PRInt32 aNameSpaceID,
nsIAtom*& aPrefix)
{
// XXX Need to implement
aPrefix = nsnull;
return NS_OK;
}
// XXX attribute code swiped from nsGenericContainerElement // XXX attribute code swiped from nsGenericContainerElement
// this class could probably just use nsGenericContainerElement // this class could probably just use nsGenericContainerElement
@ -1220,6 +1239,21 @@ nsRDFElement::GetRangeList(nsVoidArray*& aResult) const
//////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////
// nsIXMLContent // nsIXMLContent
NS_IMETHODIMP
nsRDFElement::SetContainingNameSpace(nsINameSpace* aNameSpace)
{
// XXX Need to implement
return NS_OK;
}
NS_IMETHODIMP
nsRDFElement::GetContainingNameSpace(nsINameSpace*& aNameSpace) const
{
// XXX Need to implement
aNameSpace = nsnull;
return NS_OK;
}
NS_IMETHODIMP NS_IMETHODIMP
nsRDFElement::SetNameSpacePrefix(nsIAtom* aNameSpacePrefix) nsRDFElement::SetNameSpacePrefix(nsIAtom* aNameSpacePrefix)
{ {

View File

@ -87,6 +87,8 @@ public:
NS_IMETHOD RemoveChildAt(PRInt32 aIndex, PRBool aNotify); NS_IMETHOD RemoveChildAt(PRInt32 aIndex, PRBool aNotify);
NS_IMETHOD IsSynthetic(PRBool& aResult); NS_IMETHOD IsSynthetic(PRBool& aResult);
NS_IMETHOD GetTag(nsIAtom*& aResult) const; NS_IMETHOD GetTag(nsIAtom*& aResult) const;
NS_IMETHOD ParseAttributeString(const nsString& aStr, nsIAtom*& aName, PRInt32& aNameSpaceID);
NS_IMETHOD GetNameSpacePrefix(PRInt32 aNameSpaceID, nsIAtom*& aPrefix);
NS_IMETHOD SetAttribute(PRInt32 aNameSpaceID, nsIAtom* aName, const nsString& aValue, PRBool aNotify); NS_IMETHOD SetAttribute(PRInt32 aNameSpaceID, nsIAtom* aName, const nsString& aValue, PRBool aNotify);
NS_IMETHOD GetAttribute(PRInt32 aNameSpaceID, nsIAtom* aName, nsString& aResult) const; NS_IMETHOD GetAttribute(PRInt32 aNameSpaceID, nsIAtom* aName, nsString& aResult) const;
NS_IMETHOD UnsetAttribute(PRInt32 aNameSpaceID, nsIAtom* aName, PRBool aNotify); NS_IMETHOD UnsetAttribute(PRInt32 aNameSpaceID, nsIAtom* aName, PRBool aNotify);
@ -108,6 +110,8 @@ public:
NS_IMETHOD GetRangeList(nsVoidArray*& aResult) const; NS_IMETHOD GetRangeList(nsVoidArray*& aResult) const;
// nsIXMLContent (from nsIRDFContent) // nsIXMLContent (from nsIRDFContent)
NS_IMETHOD SetContainingNameSpace(nsINameSpace* aNameSpace);
NS_IMETHOD GetContainingNameSpace(nsINameSpace*& aNameSpace) const;
NS_IMETHOD SetNameSpacePrefix(nsIAtom* aNameSpace); NS_IMETHOD SetNameSpacePrefix(nsIAtom* aNameSpace);
NS_IMETHOD GetNameSpacePrefix(nsIAtom*& aNameSpace) const; NS_IMETHOD GetNameSpacePrefix(nsIAtom*& aNameSpace) const;
NS_IMETHOD SetNameSpaceID(PRInt32 aNameSpaceID); NS_IMETHOD SetNameSpaceID(PRInt32 aNameSpaceID);

View File

@ -435,7 +435,7 @@ nsRDFElement::GetTagName(nsString& aTagName)
NS_IMETHODIMP NS_IMETHODIMP
nsRDFElement::GetDOMAttribute(const nsString& aName, nsString& aReturn) nsRDFElement::GetAttribute(const nsString& aName, nsString& aReturn)
{ {
PR_ASSERT(0); PR_ASSERT(0);
return NS_ERROR_NOT_IMPLEMENTED; return NS_ERROR_NOT_IMPLEMENTED;
@ -443,7 +443,7 @@ nsRDFElement::GetDOMAttribute(const nsString& aName, nsString& aReturn)
NS_IMETHODIMP NS_IMETHODIMP
nsRDFElement::SetDOMAttribute(const nsString& aName, const nsString& aValue) nsRDFElement::SetAttribute(const nsString& aName, const nsString& aValue)
{ {
PR_ASSERT(0); PR_ASSERT(0);
return NS_ERROR_NOT_IMPLEMENTED; return NS_ERROR_NOT_IMPLEMENTED;
@ -844,6 +844,25 @@ nsRDFElement::GetTag(nsIAtom*& aResult) const
return NS_OK; return NS_OK;
} }
NS_IMETHODIMP
nsRDFElement::ParseAttributeString(const nsString& aStr,
nsIAtom*& aName,
PRInt32& aNameSpaceID)
{
// XXX Need to implement
aName = nsnull;
aNameSpaceID = kNameSpaceID_None;
return NS_OK;
}
NS_IMETHODIMP
nsRDFElement::GetNameSpacePrefix(PRInt32 aNameSpaceID,
nsIAtom*& aPrefix)
{
// XXX Need to implement
aPrefix = nsnull;
return NS_OK;
}
// XXX attribute code swiped from nsGenericContainerElement // XXX attribute code swiped from nsGenericContainerElement
// this class could probably just use nsGenericContainerElement // this class could probably just use nsGenericContainerElement
@ -1220,6 +1239,21 @@ nsRDFElement::GetRangeList(nsVoidArray*& aResult) const
//////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////
// nsIXMLContent // nsIXMLContent
NS_IMETHODIMP
nsRDFElement::SetContainingNameSpace(nsINameSpace* aNameSpace)
{
// XXX Need to implement
return NS_OK;
}
NS_IMETHODIMP
nsRDFElement::GetContainingNameSpace(nsINameSpace*& aNameSpace) const
{
// XXX Need to implement
aNameSpace = nsnull;
return NS_OK;
}
NS_IMETHODIMP NS_IMETHODIMP
nsRDFElement::SetNameSpacePrefix(nsIAtom* aNameSpacePrefix) nsRDFElement::SetNameSpacePrefix(nsIAtom* aNameSpacePrefix)
{ {