protected override bool HandleMarkElement(SegmentedContentBuilder builder, XElement mrk, bool allow_segmentation) { if ((string)mrk.Attribute("mtype") == "x-mq-tc") { // mrk[@mtype = 'x-mq-tc'] is a tracked change in memoQ. var tctype = (string)mrk.Attribute(MQ + "tctype"); switch (tctype) { case "del": builder.PushProp(InlineProperty.Del); SegmentInlineContent(builder, mrk, false); builder.PopProp(); return(true); case "ins": builder.PushProp(InlineProperty.Ins); SegmentInlineContent(builder, mrk, false); builder.PopProp(); return(true); default: // Unknown mq:tctype attribute value. Just pass it to the default mrk processing. break; } } return(base.HandleMarkElement(builder, mrk, false)); }
protected override bool HandleMarkElement(SegmentedContentBuilder builder, XElement mrk, bool allow_segmentation) { switch ((string)mrk.Attribute("mtype")) { case "x-sdl-deleted": // This is a deleted section in change tracking. // Can a mrk[@mtype='seg'] occur inside mrk[@mtype='x-sdl-deleted']? FIXME. builder.PushProp(InlineProperty.Del); SegmentInlineContent(builder, mrk, allow_segmentation); builder.PopProp(); return(true); case "x-sdl-added": // This is an added (inserted) section in change tracking. // Can a mrk[@mtype='seg'] occur inside mrk[@mtype='x-sdl-added']? FIXME. builder.PushProp(InlineProperty.Ins); SegmentInlineContent(builder, mrk, allow_segmentation); builder.PopProp(); return(true); default: break; } return(base.HandleMarkElement(builder, mrk, allow_segmentation)); }