瀏覽代碼

HPCC-8845 Changes based on code review

Signed-off-by: Anthony Fishbeck <anthony.fishbeck@lexisnexis.com>
Anthony Fishbeck 11 年之前
父節點
當前提交
df04a03b05

+ 4 - 4
common/fileview2/fileview.hpp

@@ -189,11 +189,11 @@ extern FILEVIEW_API IResultSetFactory * getSecRemoteResultSetFactory(const char
 extern FILEVIEW_API IResultSetFactory * getRemoteResultSetFactory(const char * remoteServer, const char * username, const char * password);
 extern FILEVIEW_API int findResultSetColumn(const INewResultSet * results, const char * columnName);
 
-extern FILEVIEW_API unsigned getResultCursorXml(IStringVal & ret, IResultSetCursor * cursor, const char * name, unsigned start=0, unsigned count=0, const char * schemaName=NULL, IProperties *xmlns=NULL);
-extern FILEVIEW_API unsigned getResultXml(IStringVal & ret, INewResultSet * cursor,  const char* name, unsigned start=0, unsigned count=0, const char * schemaName=NULL, IProperties *xmlns=NULL);
+extern FILEVIEW_API unsigned getResultCursorXml(IStringVal & ret, IResultSetCursor * cursor, const char * name, unsigned start=0, unsigned count=0, const char * schemaName=NULL, const IProperties *xmlns=NULL);
+extern FILEVIEW_API unsigned getResultXml(IStringVal & ret, INewResultSet * cursor,  const char* name, unsigned start=0, unsigned count=0, const char * schemaName=NULL, const IProperties *xmlns=NULL);
 extern FILEVIEW_API unsigned getResultJSON(IStringVal & ret, INewResultSet * cursor,  const char* name, unsigned start=0, unsigned count=0, const char * schemaName=NULL);
-extern FILEVIEW_API unsigned writeResultCursorXml(IXmlWriter & writer, IResultSetCursor * cursor, const char * name, unsigned start=0, unsigned count=0, const char * schemaName=NULL, IProperties *xmlns = NULL);
-extern FILEVIEW_API unsigned writeResultXml(IXmlWriter & writer, INewResultSet * cursor,  const char* name, unsigned start=0, unsigned count=0, const char * schemaName=NULL, IProperties *xmlns = NULL);
+extern FILEVIEW_API unsigned writeResultCursorXml(IXmlWriter & writer, IResultSetCursor * cursor, const char * name, unsigned start=0, unsigned count=0, const char * schemaName=NULL, const IProperties *xmlns = NULL);
+extern FILEVIEW_API unsigned writeResultXml(IXmlWriter & writer, INewResultSet * cursor,  const char* name, unsigned start=0, unsigned count=0, const char * schemaName=NULL, const IProperties *xmlns = NULL);
 
 extern FILEVIEW_API unsigned getResultCursorBin(MemoryBuffer & ret, IResultSetCursor * cursor, unsigned start=0, unsigned count=0);
 extern FILEVIEW_API unsigned getResultBin(MemoryBuffer & ret, INewResultSet * cursor, unsigned start=0, unsigned count=0);

+ 7 - 7
common/fileview2/fvresultset.cpp

@@ -3168,7 +3168,7 @@ int findResultSetColumn(const INewResultSet * results, const char * columnName)
 }
 
 
-extern FILEVIEW_API unsigned getResultCursorXml(IStringVal & ret, IResultSetCursor * cursor, const char * name, unsigned start, unsigned count, const char * schemaName, IProperties *xmlns)
+extern FILEVIEW_API unsigned getResultCursorXml(IStringVal & ret, IResultSetCursor * cursor, const char * name, unsigned start, unsigned count, const char * schemaName, const IProperties *xmlns)
 {
     Owned<CommonXmlWriter> writer = CreateCommonXmlWriter(XWFexpandempty);
     unsigned rc = writeResultCursorXml(*writer, cursor, name, start, count, schemaName, xmlns);
@@ -3177,7 +3177,7 @@ extern FILEVIEW_API unsigned getResultCursorXml(IStringVal & ret, IResultSetCurs
 
 }
 
-extern FILEVIEW_API unsigned getResultXml(IStringVal & ret, INewResultSet * result, const char* name,unsigned start, unsigned count, const char * schemaName, IProperties *xmlns)
+extern FILEVIEW_API unsigned getResultXml(IStringVal & ret, INewResultSet * result, const char* name,unsigned start, unsigned count, const char * schemaName, const IProperties *xmlns)
 {
     Owned<IResultSetCursor> cursor = result->createCursor();
     return getResultCursorXml(ret, cursor, name, start, count, schemaName, xmlns);
@@ -3194,7 +3194,7 @@ extern FILEVIEW_API unsigned getResultJSON(IStringVal & ret, INewResultSet * res
     return rc;
 }
 
-extern FILEVIEW_API unsigned writeResultCursorXml(IXmlWriter & writer, IResultSetCursor * cursor, const char * name, unsigned start, unsigned count, const char * schemaName, IProperties *xmlns)
+extern FILEVIEW_API unsigned writeResultCursorXml(IXmlWriter & writer, IResultSetCursor * cursor, const char * name, unsigned start, unsigned count, const char * schemaName, const IProperties *xmlns)
 {
     if (schemaName)
     {
@@ -3212,11 +3212,11 @@ extern FILEVIEW_API unsigned writeResultCursorXml(IXmlWriter & writer, IResultSe
         writer.outputCString(schemaName, "@xmlSchema");
     if (xmlns)
     {
-        Owned<IPropertyIterator> it = xmlns->getIterator();
+        Owned<IPropertyIterator> it = const_cast<IProperties*>(xmlns)->getIterator();
         ForEach(*it)
         {
             const char *name = it->getPropKey();
-            writer.outputXmlns(name,xmlns->queryProp(name));
+            writer.outputXmlns(name,const_cast<IProperties*>(xmlns)->queryProp(name));
         }
     }
     cursor->beginWriteXmlRows(writer);
@@ -3234,7 +3234,7 @@ extern FILEVIEW_API unsigned writeResultCursorXml(IXmlWriter & writer, IResultSe
     return c;
 }
 
-extern FILEVIEW_API unsigned writeResultXml(IXmlWriter & writer, INewResultSet * result, const char* name,unsigned start, unsigned count, const char * schemaName, IProperties *xmlns)
+extern FILEVIEW_API unsigned writeResultXml(IXmlWriter & writer, INewResultSet * result, const char* name,unsigned start, unsigned count, const char * schemaName, const IProperties *xmlns)
 {
     Owned<IResultSetCursor> cursor = result->createCursor();
     return writeResultCursorXml(writer, cursor, name, start, count, schemaName, xmlns);
@@ -3321,7 +3321,7 @@ extern FILEVIEW_API void writeFullWorkUnitResults(const char *username, const ch
                     SCMStringBuffer name;
                     ds.getResultName(name);
                     Owned<INewResultSet> nr = factory->createNewResultSet(&ds, wuid.str());
-                    IProperties *xmlns = ds.queryXmlns();
+                    const IProperties *xmlns = ds.queryXmlns();
                     writeResultXml(writer, nr.get(), name.str(), 0, 0, (flags & WorkUnitXML_InclSchema) ? name.str() : NULL, xmlns);
                 }
             }

+ 8 - 3
common/thorhelper/roxiehelper.cpp

@@ -996,7 +996,7 @@ void *FlushingStringBuffer::getPayload(size32_t &length)
     return length ? s.detach() : NULL;
 }
 
-void FlushingStringBuffer::startDataset(const char *elementName, const char *resultName, unsigned sequence, bool _extend, IProperties *xmlns)
+void FlushingStringBuffer::startDataset(const char *elementName, const char *resultName, unsigned sequence, bool _extend, const IProperties *xmlns)
 {
     CriticalBlock b(crit);
     extend = _extend;
@@ -1019,11 +1019,16 @@ void FlushingStringBuffer::startDataset(const char *elementName, const char *res
                         s.append("result_").append(sequence+1).append('\'');
                     if (xmlns)
                     {
-                        Owned<IPropertyIterator> it = xmlns->getIterator();
+                        Owned<IPropertyIterator> it = const_cast<IProperties*>(xmlns)->getIterator(); //should fix IProperties to be const friendly
                         ForEach(*it)
                         {
                             const char *name = it->getPropKey();
-                            s.append(" xmlns:").append(name).append("='").append(xmlns->queryProp(name)).append("'");
+                            s.append(' ');
+                            if (!streq(name, "xmlns"))
+                                s.append("xmlns:");
+                            s.append(name).append("='");
+                            encodeUtf8XML(const_cast<IProperties*>(xmlns)->queryProp(name), s);
+                            s.append("'");
                         }
                     }
                 }

+ 1 - 1
common/thorhelper/roxiehelper.hpp

@@ -160,7 +160,7 @@ public:
     virtual void flush(bool closing) ;
     virtual void addPayload(StringBuffer &s, unsigned int reserve=0);
     virtual void *getPayload(size32_t &length);
-    virtual void startDataset(const char *elementName, const char *resultName, unsigned sequence, bool _extend = false, IProperties *xmlns=NULL);
+    virtual void startDataset(const char *elementName, const char *resultName, unsigned sequence, bool _extend = false, const IProperties *xmlns=NULL);
     virtual void startScalar(const char *resultName, unsigned sequence);
     virtual void incrementRowCount();
 };

+ 4 - 2
common/thorhelper/thorxmlwrite.cpp

@@ -243,8 +243,10 @@ void CommonXmlWriter::outputUtf8(unsigned len, const char *field, const char *fi
 
 void CommonXmlWriter::outputXmlns(const char *name, const char *uri)
 {
-    StringBuffer fieldname("xmlns:");
-    outputXmlAttrString(strlen(uri), uri, fieldname.append(name), out);
+    StringBuffer fieldname;
+    if (!streq(name, "xmlns"))
+        fieldname.append("xmlns:");
+    outputXmlAttrUtf8(strlen(uri), uri, fieldname.append(name), out);
 }
 
 void CommonXmlWriter::outputBeginDataset(const char *dsname, bool nestChildren)

+ 8 - 6
common/workunit/workunit.cpp

@@ -1569,6 +1569,7 @@ class CLocalWUResult : public CInterface, implements IWUResult
 {
     friend class CLocalWorkUnit;
 
+    mutable CriticalSection crit;
     Owned<IPropertyTree> p;
     Owned<IProperties> xmlns;
     void getSchema(TypeInfoArray &types, StringAttrArray &names, IStringVal * ecl=NULL) const;
@@ -3504,7 +3505,6 @@ void CLocalWorkUnit::loadXML(const char *xml)
 {
     CriticalBlock block(crit);
     init();
-    DBGLOG("%s",xml);
     assertex(xml);
     p.setown(createPTreeFromXMLString(xml));
 }
@@ -6038,8 +6038,6 @@ void CLocalWorkUnit::loadResults() const
         for (r->first(); r->isValid(); r->next())
         {
             IPropertyTree *rp = &r->query();
-            const char *xmlns = rp->queryProp("@xmlns:yyy");
-
             rp->Link();
             results.append(*new CLocalWUResult(rp));
         }
@@ -7809,17 +7807,21 @@ IStringVal& CLocalWUResult::getResultXml(IStringVal &str) const
 
 IProperties *CLocalWUResult::queryXmlns()
 {
+    CriticalBlock block(crit);
     if (xmlns)
         return xmlns;
     xmlns.setown(createProperties());
     Owned<IAttributeIterator> it = p->getAttributes();
-    unsigned prefixLen = strlen("@xmlns:");
+    unsigned prefixLen = strlen("@xmlns");
     ForEach(*it)
     {
         const char *name = it->queryName();
-        if (!strncmp("@xmlns:", name, prefixLen))
+        if (!strncmp("@xmlns", name, prefixLen))
         {
-            xmlns->setProp(name+prefixLen, it->queryValue());
+            if (name[prefixLen]==':') //normal case
+                xmlns->setProp(name+prefixLen+1, it->queryValue());
+            else if (!name[prefixLen]) //special case, unprefixed namespace
+                xmlns->setProp("xmlns", it->queryValue());
         }
     }
     return xmlns;

+ 1 - 1
common/workunit/workunit.hpp

@@ -301,7 +301,7 @@ interface IConstWUResult : extends IInterface
     virtual unsigned getResultHash() const = 0;
     virtual void getResultDecimal(void * val, unsigned length, unsigned precision, bool isSigned) const = 0;
     virtual bool getResultIsAll() const = 0;
-    virtual IProperties *queryXmlns() = 0;
+    virtual const IProperties *queryXmlns() = 0;
 };
 
 

+ 1 - 2
ecl/hql/hqlexpr.cpp

@@ -591,8 +591,7 @@ extern HQL_API void gatherMetaAttributes(HqlExprArray & matches, IAtom * search,
 
 extern HQL_API void gatherAttributes(HqlExprArray & matches, IAtom * search, IHqlExpression * expr)
 {
-    unsigned kids = expr->numChildren();
-    for (unsigned i = 0; i < kids; i++)
+    ForEachChild(i, expr)
     {
         IHqlExpression *kid = expr->queryChild(i);
         if (kid->isAttribute() && kid->queryName()==search)

+ 4 - 4
ecl/hql/hqlgram.y

@@ -3470,9 +3470,9 @@ outputWuFlag
                         }
     | XMLNS '(' expression ',' expression ')'
                         {
-                            parser->normalizeExpression($3, type_string, true);
-                            parser->normalizeExpression($5, type_string, true);
-                            $$.setExpr(createAttribute(xmlnsAtom, $3.getExpr(), $5.getExpr()));
+                            parser->normalizeExpression($3, type_stringorunicode, true);
+                            parser->normalizeExpression($5, type_stringorunicode, true);
+                            $$.setExpr(createExprAttribute(xmlnsAtom, $3.getExpr(), $5.getExpr()));
                             $$.setPosition($1);
                         }
     | FIRST '(' constExpression ')'
@@ -3480,7 +3480,7 @@ outputWuFlag
                             parser->normalizeExpression($3, type_int, true);
                             $$.setExpr(createAttribute(firstAtom, $3.getExpr()));
                             $$.setPosition($1);
-                2        }
+                        }
     | THOR              {
                             $$.setExpr(createAttribute(diskAtom));
                             $$.setPosition($1);

+ 15 - 2
ecl/hql/hqlutil.cpp

@@ -3003,7 +3003,7 @@ __int64 getIntValue(IHqlExpression * expr, __int64 dft)
     return dft;
 }
 
-StringBuffer & getStringValue(StringBuffer & out, IHqlExpression * expr, const char * dft)
+StringBuffer & getStringValue(StringBuffer & out, IHqlExpression * expr, const char * dft, bool utf8)
 {
     if (expr)
     {
@@ -3012,7 +3012,10 @@ StringBuffer & getStringValue(StringBuffer & out, IHqlExpression * expr, const c
         IValue * value = expr->queryValue();
         if (value)
         {
-            value->getStringValue(out);
+            if (utf8)
+                value->getUTF8Value(out);
+            else
+                value->getStringValue(out);
             return out;
         }
     }
@@ -3021,6 +3024,16 @@ StringBuffer & getStringValue(StringBuffer & out, IHqlExpression * expr, const c
     return out;
 }
 
+StringBuffer & getStringValue(StringBuffer & out, IHqlExpression * expr, const char * dft)
+{
+    return getStringValue(out, expr, dft, false);
+}
+
+StringBuffer & getUTF8Value(StringBuffer & out, IHqlExpression * expr, const char * dft)
+{
+    return getStringValue(out, expr, dft, true);
+}
+
 bool matchesConstantValue(IHqlExpression * expr, __int64 test)
 {
     if (!expr) return false;

+ 1 - 0
ecl/hql/hqlutil.hpp

@@ -113,6 +113,7 @@ extern HQL_API bool matchesConstantString(IHqlExpression * expr, const char * te
 extern HQL_API bool getBoolValue(IHqlExpression * expr, bool dft);
 extern HQL_API __int64 getIntValue(IHqlExpression * expr, __int64 dft = 0);
 extern HQL_API StringBuffer & getStringValue(StringBuffer & out, IHqlExpression * expr, const char * dft = NULL);
+extern HQL_API StringBuffer & getUTF8Value(StringBuffer & out, IHqlExpression * expr, const char * dft = NULL);
 extern HQL_API bool isEmptyList(IHqlExpression * expr);
 extern HQL_API IHqlExpression * queryNextMultiLevelDataset(IHqlExpression * expr, bool followActiveSelectors);
 extern HQL_API bool isMultiLevelDatasetSelector(IHqlExpression * expr, bool followActiveSelectors);

+ 20 - 27
ecl/hqlcpp/hqlhtcpp.cpp

@@ -5028,27 +5028,19 @@ IWUResult * HqlCppTranslator::createWorkunitResult(int sequence, IHqlExpression
     return result.getClear();
 }
 
-void getXpathAttrPrefixes(StringArray &prefixes, IHqlExpression *xpathAttr)
+void checkAppendXpathNamePrefix(StringArray &prefixes, const char *xpathName)
 {
-    if (!xpathAttr)
+    if (!xpathName || !*xpathName || *xpathName==':')
         return;
-    StringBuffer xpathtext;
-    if (xpathAttr->queryChild(0)->queryValue())
-        xpathAttr->queryChild(0)->queryValue()->getStringValue(xpathtext);
-    if (!xpathtext.length())
+    if (*xpathName=='@')
+        xpathName++;
+    const char *colon = strchr(xpathName, ':');
+    if (!colon)
         return;
-    const char *xpath=xpathtext.str();
-    const char *colon = strchr(xpath, ':');
-    while (colon)
-    {
-        const char *finger=colon-1;
-        while (finger>xpath && !strchr("/[ ", *(finger-1)))
-            finger--;
-        StringAttr prefix(finger, colon - finger);
-        if (prefix.length() && prefixes.find(prefix.get())==NotFound)
-            prefixes.append(prefix);
-        colon = strchr(colon+1, ':');
-    }
+    StringAttr prefix;
+    prefix.set(xpathName, colon-xpathName);
+    if (prefixes.find(prefix.get())==NotFound)
+        prefixes.append(prefix);
 }
 
 void gatherXpathPrefixes(StringArray &prefixes, IHqlExpression * record)
@@ -5060,7 +5052,11 @@ void gatherXpathPrefixes(StringArray &prefixes, IHqlExpression * record)
         {
         case no_field:
         {
-            getXpathAttrPrefixes(prefixes, cur->queryAttribute(xpathAtom));
+            //don't need to be too picky about xpath field types, worst case if an xpath is too long, we end up with an extra prefix
+            StringBuffer xpathName, xpathItem;
+            extractXmlName(xpathName, &xpathItem, NULL, cur, NULL, false);
+            checkAppendXpathNamePrefix(prefixes, xpathName);
+            checkAppendXpathNamePrefix(prefixes, xpathItem);
 
             ITypeInfo * type = cur->queryType();
             switch (type->getTypeCode())
@@ -5075,9 +5071,11 @@ void gatherXpathPrefixes(StringArray &prefixes, IHqlExpression * record)
             break;
         }
         case no_ifblock:
-        case no_record:
             gatherXpathPrefixes(prefixes, cur->queryChild(1));
             break;
+        case no_record:
+            gatherXpathPrefixes(prefixes, cur);
+            break;
         }
     }
 }
@@ -5090,10 +5088,8 @@ void addDatasetResultXmlNamespaces(IWUResult &result, HqlExprArray &xmlnsAttrs,
         IHqlExpression & xmlns = xmlnsAttrs.item(idx);
         StringBuffer xmlnsPrefix;
         StringBuffer xmlnsURI;
-        if (xmlns.queryChild(0)->queryValue())
-            xmlns.queryChild(0)->queryValue()->getStringValue(xmlnsPrefix);
-        if (xmlns.queryChild(1)->queryValue())
-            xmlns.queryChild(1)->queryValue()->getStringValue(xmlnsURI);
+        getUTF8Value(xmlnsPrefix, xmlns.queryChild(0));
+        getUTF8Value(xmlnsURI, xmlns.queryChild(1));
         if (xmlnsURI.length())
         {
             result.setXmlns(xmlnsPrefix, xmlnsURI);
@@ -11133,10 +11129,7 @@ ABoundActivity * HqlCppTranslator::doBuildActivityOutputWorkunit(BuildCtx & ctx,
         Owned<IWUResult> result = createDatasetResultSchema(seq, name, outputRecord, xmlnsAttrs, true, false);
         if (result)
         {
-            SCMStringBuffer debugName;
-            result->getResultName((IStringVal &)debugName);
             result->setResultRowLimit(-1);
-
             if (sequence >= 0)
             {
                 OwnedHqlExpr outputDs = createDataset(no_null, LINK(outputRecord));

+ 3 - 7
esp/services/ws_workunits/ws_workunitsService.cpp

@@ -2189,7 +2189,7 @@ bool CWsWorkunitsEx::onWUQuery(IEspContext &context, IEspWUQueryRequest & req, I
     return true;
 }
 
-void appendResultSet(MemoryBuffer& mb, INewResultSet* result, const char *name, __int64 start, unsigned& count, __int64& total, bool bin, bool xsd, ESPSerializationFormat fmt, IProperties *xmlns)
+void appendResultSet(MemoryBuffer& mb, INewResultSet* result, const char *name, __int64 start, unsigned& count, __int64& total, bool bin, bool xsd, ESPSerializationFormat fmt, const IProperties *xmlns)
 {
     if (!result)
         return;
@@ -2672,17 +2672,13 @@ void getFileResults(IEspContext &context, const char* logicalName, const char* c
 {
     Owned<IResultSetFactory> resultSetFactory = getSecResultSetFactory(context.querySecManager(), context.queryUser(), context.queryUserId(), context.queryPassword());
     Owned<INewResultSet> result(resultSetFactory->createNewFileResultSet(logicalName, cluster));
-<<<<<<< HEAD
     if (!filterBy || !filterBy->length())
-        appendResultSet(buf, result, resname.str(), start, count, total, bin, xsd, context.getResponseFormat());
+        appendResultSet(buf, result, resname.str(), start, count, total, bin, xsd, context.getResponseFormat(), NULL);
     else
     {
         Owned<INewResultSet> filteredResult = createFilteredResultSet(result, filterBy);
-        appendResultSet(buf, filteredResult, resname.str(), start, count, total, bin, xsd, context.getResponseFormat());
+        appendResultSet(buf, filteredResult, resname.str(), start, count, total, bin, xsd, context.getResponseFormat(), NULL);
     }
-=======
-    appendResultSet(buf, result, resname.str(), start, count, total, bin, xsd, context.getResponseFormat(), NULL);
->>>>>>> HPCC-8845 Support XMLNS for workunit and roxie xml outputs
 }
 
 void getWorkunitCluster(IEspContext &context, const char* wuid, SCMStringBuffer& cluster, bool checkArchiveWUs)

+ 1 - 1
roxie/ccd/ccdcontext.cpp

@@ -2825,7 +2825,7 @@ public:
         return trim ? XWFtrim|XWFopt : XWFexpandempty;
     }
 
-    virtual IProperties *queryXmlns(unsigned seqNo)
+    virtual const IProperties *queryXmlns(unsigned seqNo)
     {
         IConstWorkUnit *cw = serverQueryFactory->queryWorkUnit();
         if (cw)

+ 1 - 1
roxie/ccd/ccdcontext.hpp

@@ -97,7 +97,7 @@ interface IRoxieServerContext : extends IInterface
     virtual bool outputResultsToSocket() const = 0;
 
     virtual IRoxieDaliHelper *checkDaliConnection() = 0;
-    virtual IProperties *queryXmlns(unsigned seqNo) = 0;
+    virtual const IProperties *queryXmlns(unsigned seqNo) = 0;
 };
 
 interface IDeserializedResultStore : public IInterface

+ 1 - 1
roxie/ccd/ccdserver.cpp

@@ -19746,7 +19746,7 @@ public:
             response = serverContext->queryResult(sequence);
             if (response)
             {
-                Owned<IProperties> xmlns = serverContext->queryXmlns(sequence);
+                const IProperties *xmlns = serverContext->queryXmlns(sequence);
                 response->startDataset("Dataset", helper.queryName(), sequence, (helper.getFlags() & POFextend) != 0, xmlns);
                 if (response->mlFmt==MarkupFmt_XML || response->mlFmt==MarkupFmt_JSON)
                 {

+ 1 - 1
rtl/eclrtl/rtlxml.cpp

@@ -152,7 +152,7 @@ void outputXmlUtf8(unsigned len, const char *field, const char *fieldname, Strin
 {
     if (fieldname && *fieldname)
         out.append('<').append(fieldname).append('>');
-    encodeXML(field, out, 0, rtlUtf8Size(len, field), true); // output as UTF-8
+    encodeXML(field, out, 0, len, true); // output as UTF-8, encodeXml uses strlen and compensates for utf8 character size
     if (fieldname && *fieldname)
         out.append("</").append(fieldname).append('>');
 }

+ 1 - 1
testing/regress/ecl/key/xmlns.xml

@@ -1,3 +1,3 @@
-<Dataset name='Result 1' xmlns:star="urn:hpccsystems:ecl:unknown:star" xmlns:bk="urn:booklist:book" xmlns:bks="urn:booklist:books">
+<Dataset name='Result 1' xmlns:star="urn:hpccsystems:ecl:unknown:star" xmlns:bk="urn:booklist:book" xmlns:bks="urn:booklist:books" xmlns="urn:noprefix:namespace">
  <Row><bks:books><bk:book><bk:title>The Emperors New Mind</bk:title><bk:author>Sir Roger Penrose</bk:author><star:rating>*****</star:rating></bk:book><bk:book><bk:title>The Elegant Universe</bk:title><bk:author>Brian Greene</bk:author><star:rating>*****</star:rating></bk:book><bk:book><bk:title>A Brief History of Time</bk:title><bk:author>Stephen Hawking</bk:author><star:rating>*****</star:rating></bk:book></bks:books></Row>
 </Dataset>

+ 1 - 1
testing/regress/ecl/xmlns.ecl

@@ -29,5 +29,5 @@ xmlinfo := u8'<Row><bks:books><bk:book><bk:author>Sir Roger Penrose</bk:author><
 
 books := FROMXML(collectionRec, xmlinfo, TRIM);
 
-output(books, XMLNS('bks','urn:booklist:books'), XMLNS('bk','urn:booklist:book'));
+output(books, XMLNS(u8'bks',u8'urn:booklist:books'), XMLNS(U'bk',U'urn:booklist:book'), XMLNS('', 'urn:noprefix:namespace'));