Subject:Removing xmls:od and xmls:xsi from output Author:Ethan Stein Date:24 May 2009 05:41 AM
I have the following xquery to take several files from a directory and combine them into a single XML file. When I run it, the files are combined properly, however, the node of each file added has the following declaration added to it:
<Iowa_x0020_Integrated_x0020_1-0_x0020_1 xmlns:od="urn:schemas-microsoft-com:officedata" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
Would someone be kind of enough to tell me how to make sure this does not occur?
My xQuery is as follows:
declare namespace ext = "ddtekjava:com.emc.wellmark.FileUtils";
declare function ext:listFiles($path as xs:string) as xs:string external;
declare variable $xPRSXMLInput as document-node(element(*, xs:untyped)) external;
declare option ddtek:serialize "indent=yes";
declare option ddtek:xml-streaming 'yes';
<CustomerData>
{
let $root := $xPRSXMLInput/dataroot/path/text()
return
for $file in fn:tokenize(ext:listFiles($root), ",")[fn:matches(., ".xml")]
return
<IOWA_INTEGRATED>
{
doc(fn:concat($root, "/", $file))/dataroot/*
}
</IOWA_INTEGRATED>
}
</CustomerData>