# ofx format to n3 1i\ @prefix ofx: .\ @prefix ofxh: .\ \ <> ofxh:headers [ # Generated by $Id: qfx2n3.sed,v 1.8 2010/03/30 20:29:21 timbl Exp $ # Below is for "Content- type" /:/s/- /-/g s?^\([A-Za-z0-9-]*\):\(.*\)$? ofxh:\1 "\2";? s??]; ofx:OFX [? s??]. # OFX? s?^<\([A-Z][A-Z0-9]*\)>$? ofx:\1[? # # End tag: s?^[ \t]*? ]; # \1? # # Special case remove . s?\(..*\)? ofx:INTU_BID "\1"? # # Start with data and explicit end tag s?<\([A-Z][A-Z0-9]*\)>\(.[^<]*\)? ofx:\1 "\2";? # # Start with data is assumed implcit end tag s?<\([A-Z][A-Z0-9]*\)>\(..*\)? ofx:\1 "\2";? # # Start tag without data is assumed to be closed later s?<\([A-Z][A-Z0-9]*\)>$? ofx:\1 [? # # Strip trailing spaces at ends of values: s? *";?";? # # Convert datetime format to W3C standard (date times) /ofx:DT/s?"\([0-9][0-9][0-9][0-9]\)\([0-9][0-9]\)\([0-9][0-9]\)\([0-9][0-9]\)\([0-9][0-9]\)\([0-9][0-9]\)"?"\1-\2-\3T\4:\5:\6"? # Convert datetime format to W3C standard (date only) /ofx:DT/s?"\([0-9][0-9][0-9][0-9]\)\([0-9][0-9]\)\([0-9][0-9]\)"?"\1-\2-\3"? # Convert datetime format to W3C standard with timezone /ofx:DT/s?"\([0-9][0-9][0-9][0-9]\)\([0-9][0-9]\)\([0-9][0-9]\)\([0-9][0-9]\)\([0-9][0-9]\)\([0-9][0-9]\)\[\([-+]\)\([0-9]\):[A-Z]*\]"?"\1-\2-\3T\4:\5:\6\70\800"? s/&/\&/g /ofx:FITID/s?\([0-9]\) \([0-9]\)?\1_\2?