diff --git a/GormCore/GormDocument.m b/GormCore/GormDocument.m index 2b4bcbc7..ad3ac19f 100644 --- a/GormCore/GormDocument.m +++ b/GormCore/GormDocument.m @@ -3317,11 +3317,6 @@ static void _real_close(GormDocument *self, } } -// Build the XML document from the objects in the mode3l... -- (void) _collectObjects: (NSXMLNode *)node withDocument: (NSXMLDocument *)document -{ -} - /** * Exports XLIFF file for CAT. This method starts the process and calls * another method that recurses through the objects in the model and pulls @@ -3331,13 +3326,22 @@ static void _real_close(GormDocument *self, withSourceLanguage: (NSString *)slang andTargetLanguage: (NSString *)tlang { - NSXMLDocument *xliffDocument = nil; BOOL result = NO; - + if (slang != nil) { + NSXMLDocument *xliffDocument = nil; + NSXMLElement *rootElement = AUTORELEASE([[NSXMLElement alloc] initWithName: @"xliff"]); + NSXMLElement *header = AUTORELEASE([[NSXMLElement alloc] initWithName: @"header"]); NSXMLNode *node = nil; - [self _collectObjects: node withDocument: xliffDocument]; + id obj = nil; + + // Set up document... + xliffDocument = AUTORELEASE([[NSXMLDocument alloc] initWithRootElement: rootElement]); + + [xliffDocument addChild: header]; + buildXLIFFDocument(obj, &node); + [xliffDocument addChild: node]; } return result; diff --git a/GormCore/GormFunctions.h b/GormCore/GormFunctions.h index 11f20912..30d3b692 100644 --- a/GormCore/GormFunctions.h +++ b/GormCore/GormFunctions.h @@ -25,8 +25,11 @@ #ifndef INCLUDED_GormFunctions_h #define INCLUDED_GormFunctions_h -#include -#include +#import +#import + +// collect all objects in document for XIFF export +void buildXLIFFDocument(id object, NSXMLNode **node); // find all subitems for the given items... void findAllWithArray(id item, NSMutableArray *array); diff --git a/GormCore/GormFunctions.m b/GormCore/GormFunctions.m index 3306ce53..64f31bef 100644 --- a/GormCore/GormFunctions.m +++ b/GormCore/GormFunctions.m @@ -29,6 +29,11 @@ #include "GormViewEditor.h" #include "GormClassPanelController.h" +// collect all objects in document for XIFF export +void buildXLIFFDocument(id object, NSXMLNode **node) +{ +} + // find all subitems for the given items... void findAllWithArray(id item, NSMutableArray *array) {