File tree Expand file tree Collapse file tree 3 files changed +35
-1
lines changed
main/java/com/marklogic/contentpump
java/com/marklogic/contentpump Expand file tree Collapse file tree 3 files changed +35
-1
lines changed Original file line number Diff line number Diff line change @@ -304,7 +304,7 @@ private void processStartElement() throws XMLStreamException {
304304 if (LOG .isTraceEnabled ()) {
305305 LOG .trace (nsDeclPrefix + ":" + nsDeclUri );
306306 }
307- if (DEFAULT_NS == nsDeclPrefix ) {
307+ if (DEFAULT_NS == nsDeclPrefix || ( "" . equals ( nsDeclPrefix )) ) {
308308 sb .append (" xmlns=\" " + nsDeclUri + "\" " );
309309 } else {
310310 sb .append (" xmlns:" + nsDeclPrefix + "=\" " + nsDeclUri
Original file line number Diff line number Diff line change @@ -601,4 +601,28 @@ public void testImportMedlineAutoID() throws Exception {
601601 assertEquals ("2" , result .next ().asString ());
602602 Utils .closeSession ();
603603 }
604+
605+ @ Test
606+ public void testBug20182 () throws Exception {
607+ String cmd = "IMPORT -host localhost -username admin -password"
608+ + " admin -input_file_path " + Constants .TEST_PATH .toUri ()
609+ + "/agg/20182.xml"
610+ + " -thread_count 1"
611+ + " -input_file_type aggregates"
612+ + " -port " + Constants .port + " -database " + Constants .testDb ;
613+ String [] args = cmd .split (" " );
614+ assertFalse (args .length == 0 );
615+
616+ Utils .clearDB (Utils .getTestDbXccUri (), Constants .testDb );
617+
618+ String [] expandedArgs = null ;
619+ expandedArgs = OptionsFileUtil .expandArguments (args );
620+ ContentPump .runCommand (expandedArgs );
621+
622+ ResultSequence result = Utils .runQuery (
623+ Utils .getTestDbXccUri (), "fn:count(fn:collection())" );
624+ assertTrue (result .hasNext ());
625+ assertEquals ("2" , result .next ().asString ());
626+ Utils .closeSession ();
627+ }
604628}
Original file line number Diff line number Diff line change 1+ <people >
2+ <person >
3+ <first xmlns =" http://marklogic.com/examples" >George</first >
4+ <last >Washington</last >
5+ </person >
6+ <person >
7+ <first xmlns =" http://marklogic.com/examples" >Betsy</first >
8+ <last >Ross</last >
9+ </person >
10+ </people >
You can’t perform that action at this time.
0 commit comments