>From 8f3d5eeeaa497c8414010b7b8c86184733654a94 Mon Sep 17 00:00:00 2001
From: Nikolay Sivov <nsivov@codeweavers.com>
Date: Sat, 5 Nov 2011 13:42:41 +0300
Subject: [PATCH 1/1] Implement get_nodeTypeValue() for attributes without a type

---
 dlls/msxml3/attribute.c |   35 ++++++++++++++++++++++++++++++++---
 1 files changed, 32 insertions(+), 3 deletions(-)

diff --git a/dlls/msxml3/attribute.c b/dlls/msxml3/attribute.c
index b67a5b4..fc96658 100644
--- a/dlls/msxml3/attribute.c
+++ b/dlls/msxml3/attribute.c
@@ -448,11 +448,40 @@ static HRESULT WINAPI domattr_get_definition(
 
 static HRESULT WINAPI domattr_get_nodeTypedValue(
     IXMLDOMAttribute *iface,
-    VARIANT* var1)
+    VARIANT* value)
 {
     domattr *This = impl_from_IXMLDOMAttribute( iface );
-    FIXME("(%p)->(%p)\n", This, var1);
-    return return_null_var(var1);
+    IXMLDOMDocument *doc;
+    HRESULT hr;
+
+    TRACE("(%p)->(%p)\n", This, value);
+
+    hr = IXMLDOMAttribute_get_ownerDocument(iface, &doc);
+    if (hr == S_OK)
+    {
+        IXMLDOMDocument2 *doc2;
+
+        hr = IXMLDOMDocument_QueryInterface(doc, &IID_IXMLDOMDocument2, (void**)&doc2);
+        IXMLDOMDocument_Release(doc);
+
+        if (hr == S_OK)
+        {
+            VARIANT schemas;
+
+            hr = IXMLDOMDocument2_get_schemas(doc2, &schemas);
+            IXMLDOMDocument2_Release(doc2);
+
+            if (hr != S_OK)
+                return IXMLDOMAttribute_get_value(iface, value);
+            else
+            {
+                FIXME("need to query schema for attribute type\n");
+                VariantClear(&schemas);
+            }
+        }
+    }
+
+    return return_null_var(value);
 }
 
 static HRESULT WINAPI domattr_put_nodeTypedValue(
-- 
1.5.6.5

