Nikolay Sivov : msxml3: Set namespace-prefixes on by default.

Alexandre Julliard julliard at winehq.org
Tue Apr 17 13:31:49 CDT 2012


Module: wine
Branch: master
Commit: 9a5da56f561ad5ad476009a778c385bf58f2e6d6
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=9a5da56f561ad5ad476009a778c385bf58f2e6d6

Author: Nikolay Sivov <nsivov at codeweavers.com>
Date:   Tue Apr 17 09:44:44 2012 +0400

msxml3: Set namespace-prefixes on by default.

---

 dlls/msxml3/saxreader.c       |   10 +++++++++-
 dlls/msxml3/tests/saxreader.c |    4 ++++
 2 files changed, 13 insertions(+), 1 deletions(-)

diff --git a/dlls/msxml3/saxreader.c b/dlls/msxml3/saxreader.c
index e15f3e6..d95550f 100644
--- a/dlls/msxml3/saxreader.c
+++ b/dlls/msxml3/saxreader.c
@@ -241,6 +241,11 @@ static const WCHAR FeatureNamespacesW[] = {
     '/','n','a','m','e','s','p','a','c','e','s',0
 };
 
+static const WCHAR FeatureNamespacePrefixesW[] = {
+    'h','t','t','p',':','/','/','x','m','l','.','o','r','g','/','s','a','x','/','f','e','a','t','u','r','e','s',
+    '/','n','a','m','e','s','p','a','c','e','-','p','r','e','f','i','x','e','s',0
+};
+
 static inline HRESULT set_feature_value(saxreader *reader, saxreader_features feature, VARIANT_BOOL value)
 {
     if (value == VARIANT_TRUE)
@@ -2752,6 +2757,9 @@ static HRESULT WINAPI saxxmlreader_getFeature(
     if (!strcmpW(FeatureNamespacesW, feature))
         return get_feature_value(This, Namespaces, value);
 
+    if (!strcmpW(FeatureNamespacePrefixesW, feature))
+        return get_feature_value(This, NamespacePrefixes, value);
+
     FIXME("(%p)->(%s %p) stub\n", This, debugstr_w(feature), value);
     return E_NOTIMPL;
 }
@@ -3188,7 +3196,7 @@ HRESULT SAXXMLReader_create(MSXML_VERSION version, IUnknown *outer, LPVOID *ppOb
     reader->pool.pool = NULL;
     reader->pool.index = 0;
     reader->pool.len = 0;
-    reader->features = Namespaces;
+    reader->features = Namespaces | NamespacePrefixes;
     reader->version = version;
 
     init_dispex(&reader->dispex, (IUnknown*)&reader->IVBSAXXMLReader_iface, &saxreader_dispex);
diff --git a/dlls/msxml3/tests/saxreader.c b/dlls/msxml3/tests/saxreader.c
index 41e3775..aa3b2a5 100644
--- a/dlls/msxml3/tests/saxreader.c
+++ b/dlls/msxml3/tests/saxreader.c
@@ -2109,7 +2109,11 @@ static void test_saxreader_features(void)
         value = 0xc;
         hr = ISAXXMLReader_getFeature(reader, _bstr_("http://xml.org/sax/features/namespaces"), &value);
         EXPECT_HR(hr, S_OK);
+        ok(entry->value == value, "%s: got wrong default value %x, expected %x\n", entry->clsid, value, entry->value);
 
+        value = 0xc;
+        hr = ISAXXMLReader_getFeature(reader, _bstr_("http://xml.org/sax/features/namespace-prefixes"), &value);
+        EXPECT_HR(hr, S_OK);
         ok(entry->value == value, "%s: got wrong default value %x, expected %x\n", entry->clsid, value, entry->value);
 
         ISAXXMLReader_Release(reader);




More information about the wine-cvs mailing list