--- parser3/src/classes/xnode.C 2003/07/24 11:31:20 1.56 +++ parser3/src/classes/xnode.C 2003/09/25 09:15:02 1.59 @@ -7,7 +7,7 @@ #include "classes.h" #ifdef XML -static const char* IDENT_XNODE_C="$Date: 2003/07/24 11:31:20 $"; +static const char* IDENT_XNODE_C="$Date: 2003/09/25 09:15:02 $"; #include "pa_vmethod_frame.h" @@ -327,7 +327,7 @@ static void _getElementsByTagName(Reques gulong length=gdome_nl_length(nodes, &exc); for(gulong i=0; inodesetval->nodeTab[i]))); @@ -605,6 +717,23 @@ MXnode::MXnode(const char* aname, VState // void normalize(); add_native_method("normalize", Method::CT_DYNAMIC, _normalize, 0, 0); + /// DOM2 element + + // DOMString getAttributeNS(in DOMString namespaceURI, in DOMString localName); + add_native_method("getAttributeNS", Method::CT_DYNAMIC, _getAttributeNS, 2, 2); + // void setAttributeNS(in DOMString namespaceURI, in DOMString qualifiedName, in DOMString value) raises(DOMException); + add_native_method("setAttributeNS", Method::CT_DYNAMIC, _setAttributeNS, 3, 3); + // void removeAttributeNS(in DOMString namespaceURI, in DOMString localName) raises(DOMException); + add_native_method("removeAttributeNS", Method::CT_DYNAMIC, _removeAttributeNS, 2, 2); + // Attr getAttributeNodeNS(in DOMString namespaceURI, in DOMString localName); + add_native_method("getAttributeNodeNS", Method::CT_DYNAMIC, _getAttributeNodeNS, 2, 2); + // Attr setAttributeNodeNS(in Attr newAttr) raises(DOMException); + add_native_method("setAttributeNodeNS", Method::CT_DYNAMIC, _setAttributeNodeNS, 1, 1); + // boolean hasAttribute(in DOMString name) raises(DOMException); + add_native_method("hasAttribute", Method::CT_DYNAMIC, _hasAttribute, 1, 1); + // boolean hasAttributeNS(in DOMString namespaceURI, in DOMString localName) raises(DOMException); + add_native_method("hasAttributeNS", Method::CT_DYNAMIC, _hasAttributeNS, 2, 2); + /// parser // ^node.select[/some/xpath/query] = hash $.#[dnode] add_native_method("select", Method::CT_DYNAMIC, _select, 1, 1); @@ -621,7 +750,7 @@ MXnode::MXnode(const char* aname, VState // consts #define CONST(name) \ - consts.put(StringBody(#name), new VInt(GDOME_##name)) + consts.put(String::Body(#name), new VInt(GDOME_##name)) CONST(ELEMENT_NODE); CONST(ATTRIBUTE_NODE);