Rank: Member
Joined: 3/18/2005 Posts: 6 Location: US
|
I've got a very simple Mapforce map that I'm using to generate c#. It's an xml-to-xml map. When I execute map.run() and save it to a file, it works fine. When I try using the OutputDocument object to return the document rather than saving it, it's empty. I stepped into the code, and the map works great, it just never sets the output document to the mapped result. I traced it to one of the included .cs files in the AltovaXML project included in the generated code. This copied straight out of the xmloperations.cs file in c:\program files\Altova\Mapforce2008\spl\cs\AltovaXML.
Code:public static void SaveDocument(XmlDocument doc, Altova.IO.Output output, System.Text.Encoding encoding, bool prettyPrint) { switch (output.Type) { case Altova.IO.Output.OutputType.Stream: SaveDocument(doc, output.Stream, encoding, prettyPrint); break;
case Altova.IO.Output.OutputType.Writer: SaveDocument(doc, output.Writer, prettyPrint); break;
case Altova.IO.Output.OutputType.XmlDocument: break; ;
default: throw new System.Exception("Unknown output type"); } }
Notice the double semi-colon in the Altova.IO.Output.OutputType.XmlDocument case. Should that include a statement that assigns the value of doc to output.document? Or am I missing something else?
Rob
|
Rank: Advanced Member
Joined: 9/9/2005 Posts: 483 Location: AT
|
Hello,
Sorry, yes - the missing statement is a bug in the current version which should be fixed for the next release. Please accept our apologies for the inconvenience...
|