mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Move raw to src/experimental
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@2441 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
b6c20c50ee
commit
6166c5eae1
@ -1,5 +1,5 @@
|
|||||||
|
|
||||||
SUBDIRS = debian doc intl lib po raw rpm src
|
SUBDIRS = debian doc intl lib po rpm src
|
||||||
|
|
||||||
docdir = ${GNC_DOC_INSTALL_DIR}
|
docdir = ${GNC_DOC_INSTALL_DIR}
|
||||||
|
|
||||||
@ -30,6 +30,8 @@ EXTRA_DIST = \
|
|||||||
gnucash.lsm \
|
gnucash.lsm \
|
||||||
intl/.cvsignore \
|
intl/.cvsignore \
|
||||||
make-gnucash-patch.in \
|
make-gnucash-patch.in \
|
||||||
|
old/country.sql \
|
||||||
|
old/currencynames \
|
||||||
old/Gnucash.app-defaults \
|
old/Gnucash.app-defaults \
|
||||||
old/gnome/graph/Makefile \
|
old/gnome/graph/Makefile \
|
||||||
old/gnome/graph/colors.c \
|
old/gnome/graph/colors.c \
|
||||||
|
@ -116,7 +116,7 @@ USE_NLS = @USE_NLS@
|
|||||||
VERSION = @VERSION@
|
VERSION = @VERSION@
|
||||||
l = @l@
|
l = @l@
|
||||||
|
|
||||||
SUBDIRS = debian doc intl lib po raw rpm src
|
SUBDIRS = debian doc intl lib po rpm src
|
||||||
|
|
||||||
docdir = ${GNC_DOC_INSTALL_DIR}
|
docdir = ${GNC_DOC_INSTALL_DIR}
|
||||||
|
|
||||||
@ -137,7 +137,7 @@ doc_DATA = AUTHORS COPYING ChangeLog INSTALL NEWS README
|
|||||||
# Don't list any directories or you'll get *everything*, including the
|
# Don't list any directories or you'll get *everything*, including the
|
||||||
# CVS dirs.
|
# CVS dirs.
|
||||||
|
|
||||||
EXTRA_DIST = .cvsignore gnucash.lsm intl/.cvsignore make-gnucash-patch.in old/Gnucash.app-defaults old/gnome/graph/Makefile old/gnome/graph/colors.c old/gnome/graph/design.txt old/gnome/graph/plot-test.c old/perl-reports/report-baln.phtml old/perl-reports/report-folio.phtml old/perl-reports/report-formtest.html old/perl-reports/report-main.html old/perl-reports/report-menu.html old/perl-reports/report-null.html old/perl-reports/report-pnl.phtml old/xacc-shell.c po/.cvsignore po/extract-macros.perl.in po/guile_strings.txt
|
EXTRA_DIST = .cvsignore gnucash.lsm intl/.cvsignore make-gnucash-patch.in old/country.sql old/currencynames old/Gnucash.app-defaults old/gnome/graph/Makefile old/gnome/graph/colors.c old/gnome/graph/design.txt old/gnome/graph/plot-test.c old/perl-reports/report-baln.phtml old/perl-reports/report-folio.phtml old/perl-reports/report-formtest.html old/perl-reports/report-main.html old/perl-reports/report-menu.html old/perl-reports/report-null.html old/perl-reports/report-pnl.phtml old/xacc-shell.c po/.cvsignore po/extract-macros.perl.in po/guile_strings.txt
|
||||||
|
|
||||||
|
|
||||||
CLEANFILES = make-gnucash-patch
|
CLEANFILES = make-gnucash-patch
|
||||||
|
18
configure
vendored
18
configure
vendored
@ -6035,11 +6035,6 @@ trap 'rm -fr `echo " Makefile
|
|||||||
intl/Makefile
|
intl/Makefile
|
||||||
lib/Makefile
|
lib/Makefile
|
||||||
po/Makefile.in
|
po/Makefile.in
|
||||||
raw/Makefile
|
|
||||||
raw/ofx/Makefile
|
|
||||||
raw/ofx/dtd/Makefile
|
|
||||||
raw/ofx/explore/Makefile
|
|
||||||
raw/ofx/parser/Makefile
|
|
||||||
rpm/Makefile
|
rpm/Makefile
|
||||||
src/Makefile
|
src/Makefile
|
||||||
src/doc/Makefile
|
src/doc/Makefile
|
||||||
@ -6049,6 +6044,10 @@ trap 'rm -fr `echo " Makefile
|
|||||||
src/experimental/cbb/Makefile
|
src/experimental/cbb/Makefile
|
||||||
src/experimental/cbb/cbb-engine/Makefile
|
src/experimental/cbb/cbb-engine/Makefile
|
||||||
src/experimental/gg/Makefile
|
src/experimental/gg/Makefile
|
||||||
|
src/experimental/ofx/Makefile
|
||||||
|
src/experimental/ofx/dtd/Makefile
|
||||||
|
src/experimental/ofx/explore/Makefile
|
||||||
|
src/experimental/ofx/parser/Makefile
|
||||||
src/gnome/Makefile
|
src/gnome/Makefile
|
||||||
src/guile/Makefile
|
src/guile/Makefile
|
||||||
src/optional/Makefile
|
src/optional/Makefile
|
||||||
@ -6226,11 +6225,6 @@ CONFIG_FILES=\${CONFIG_FILES-"Makefile
|
|||||||
intl/Makefile
|
intl/Makefile
|
||||||
lib/Makefile
|
lib/Makefile
|
||||||
po/Makefile.in
|
po/Makefile.in
|
||||||
raw/Makefile
|
|
||||||
raw/ofx/Makefile
|
|
||||||
raw/ofx/dtd/Makefile
|
|
||||||
raw/ofx/explore/Makefile
|
|
||||||
raw/ofx/parser/Makefile
|
|
||||||
rpm/Makefile
|
rpm/Makefile
|
||||||
src/Makefile
|
src/Makefile
|
||||||
src/doc/Makefile
|
src/doc/Makefile
|
||||||
@ -6240,6 +6234,10 @@ CONFIG_FILES=\${CONFIG_FILES-"Makefile
|
|||||||
src/experimental/cbb/Makefile
|
src/experimental/cbb/Makefile
|
||||||
src/experimental/cbb/cbb-engine/Makefile
|
src/experimental/cbb/cbb-engine/Makefile
|
||||||
src/experimental/gg/Makefile
|
src/experimental/gg/Makefile
|
||||||
|
src/experimental/ofx/Makefile
|
||||||
|
src/experimental/ofx/dtd/Makefile
|
||||||
|
src/experimental/ofx/explore/Makefile
|
||||||
|
src/experimental/ofx/parser/Makefile
|
||||||
src/gnome/Makefile
|
src/gnome/Makefile
|
||||||
src/guile/Makefile
|
src/guile/Makefile
|
||||||
src/optional/Makefile
|
src/optional/Makefile
|
||||||
|
@ -456,11 +456,6 @@ AC_OUTPUT(
|
|||||||
intl/Makefile
|
intl/Makefile
|
||||||
lib/Makefile
|
lib/Makefile
|
||||||
po/Makefile.in
|
po/Makefile.in
|
||||||
raw/Makefile
|
|
||||||
raw/ofx/Makefile
|
|
||||||
raw/ofx/dtd/Makefile
|
|
||||||
raw/ofx/explore/Makefile
|
|
||||||
raw/ofx/parser/Makefile
|
|
||||||
rpm/Makefile
|
rpm/Makefile
|
||||||
src/Makefile
|
src/Makefile
|
||||||
src/doc/Makefile
|
src/doc/Makefile
|
||||||
@ -470,6 +465,10 @@ AC_OUTPUT(
|
|||||||
src/experimental/cbb/Makefile
|
src/experimental/cbb/Makefile
|
||||||
src/experimental/cbb/cbb-engine/Makefile
|
src/experimental/cbb/cbb-engine/Makefile
|
||||||
src/experimental/gg/Makefile
|
src/experimental/gg/Makefile
|
||||||
|
src/experimental/ofx/Makefile
|
||||||
|
src/experimental/ofx/dtd/Makefile
|
||||||
|
src/experimental/ofx/explore/Makefile
|
||||||
|
src/experimental/ofx/parser/Makefile
|
||||||
src/gnome/Makefile
|
src/gnome/Makefile
|
||||||
src/guile/Makefile
|
src/guile/Makefile
|
||||||
src/optional/Makefile
|
src/optional/Makefile
|
||||||
|
@ -1,2 +1,6 @@
|
|||||||
|
|
||||||
SUBDIRS = cbb gg
|
SUBDIRS = cbb gg ofx
|
||||||
|
|
||||||
|
EXTRA_DIST = \
|
||||||
|
.cvsignore \
|
||||||
|
README
|
||||||
|
@ -116,11 +116,14 @@ USE_NLS = @USE_NLS@
|
|||||||
VERSION = @VERSION@
|
VERSION = @VERSION@
|
||||||
l = @l@
|
l = @l@
|
||||||
|
|
||||||
SUBDIRS = cbb gg
|
SUBDIRS = cbb gg ofx
|
||||||
|
|
||||||
|
EXTRA_DIST = .cvsignore README
|
||||||
|
|
||||||
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
|
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
|
||||||
CONFIG_HEADER = ../../config.h
|
CONFIG_HEADER = ../../config.h
|
||||||
CONFIG_CLEAN_FILES =
|
CONFIG_CLEAN_FILES =
|
||||||
DIST_COMMON = Makefile.am Makefile.in
|
DIST_COMMON = README Makefile.am Makefile.in
|
||||||
|
|
||||||
|
|
||||||
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
|
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
|
||||||
|
3
src/experimental/README
Normal file
3
src/experimental/README
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
This directory contains misc experimental/unfinished/unmaintained/unsupported
|
||||||
|
code. The stuff in here is waiting for someone to take it over and do something
|
||||||
|
useful with it.
|
1
src/experimental/ofx/.cvsignore
Normal file
1
src/experimental/ofx/.cvsignore
Normal file
@ -0,0 +1 @@
|
|||||||
|
Makefile
|
9
src/experimental/ofx/Makefile.am
Normal file
9
src/experimental/ofx/Makefile.am
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
|
||||||
|
SUBDIRS = dtd explore parser
|
||||||
|
|
||||||
|
EXTRA_DIST = \
|
||||||
|
.cvsignore \
|
||||||
|
README \
|
||||||
|
basic.ofx \
|
||||||
|
ofx-dtd-idl.txt \
|
||||||
|
ofx1.5.0.10.dtd
|
334
src/experimental/ofx/Makefile.in
Normal file
334
src/experimental/ofx/Makefile.in
Normal file
@ -0,0 +1,334 @@
|
|||||||
|
# Makefile.in generated automatically by automake 1.4 from Makefile.am
|
||||||
|
|
||||||
|
# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
|
||||||
|
# This Makefile.in is free software; the Free Software Foundation
|
||||||
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
|
# with or without modifications, as long as this notice is preserved.
|
||||||
|
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||||
|
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||||
|
# PARTICULAR PURPOSE.
|
||||||
|
|
||||||
|
|
||||||
|
SHELL = @SHELL@
|
||||||
|
|
||||||
|
srcdir = @srcdir@
|
||||||
|
top_srcdir = @top_srcdir@
|
||||||
|
VPATH = @srcdir@
|
||||||
|
prefix = @prefix@
|
||||||
|
exec_prefix = @exec_prefix@
|
||||||
|
|
||||||
|
bindir = @bindir@
|
||||||
|
sbindir = @sbindir@
|
||||||
|
libexecdir = @libexecdir@
|
||||||
|
datadir = @datadir@
|
||||||
|
sysconfdir = @sysconfdir@
|
||||||
|
sharedstatedir = @sharedstatedir@
|
||||||
|
localstatedir = @localstatedir@
|
||||||
|
libdir = @libdir@
|
||||||
|
infodir = @infodir@
|
||||||
|
mandir = @mandir@
|
||||||
|
includedir = @includedir@
|
||||||
|
oldincludedir = /usr/include
|
||||||
|
|
||||||
|
DESTDIR =
|
||||||
|
|
||||||
|
pkgdatadir = $(datadir)/@PACKAGE@
|
||||||
|
pkglibdir = $(libdir)/@PACKAGE@
|
||||||
|
pkgincludedir = $(includedir)/@PACKAGE@
|
||||||
|
|
||||||
|
top_builddir = ../../..
|
||||||
|
|
||||||
|
ACLOCAL = @ACLOCAL@
|
||||||
|
AUTOCONF = @AUTOCONF@
|
||||||
|
AUTOMAKE = @AUTOMAKE@
|
||||||
|
AUTOHEADER = @AUTOHEADER@
|
||||||
|
|
||||||
|
INSTALL = @INSTALL@
|
||||||
|
INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
|
||||||
|
INSTALL_DATA = @INSTALL_DATA@
|
||||||
|
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||||
|
transform = @program_transform_name@
|
||||||
|
|
||||||
|
NORMAL_INSTALL = :
|
||||||
|
PRE_INSTALL = :
|
||||||
|
POST_INSTALL = :
|
||||||
|
NORMAL_UNINSTALL = :
|
||||||
|
PRE_UNINSTALL = :
|
||||||
|
POST_UNINSTALL = :
|
||||||
|
host_alias = @host_alias@
|
||||||
|
host_triplet = @host@
|
||||||
|
AS = @AS@
|
||||||
|
CATALOGS = @CATALOGS@
|
||||||
|
CATOBJEXT = @CATOBJEXT@
|
||||||
|
CC = @CC@
|
||||||
|
DATADIRNAME = @DATADIRNAME@
|
||||||
|
DLLTOOL = @DLLTOOL@
|
||||||
|
GENCAT = @GENCAT@
|
||||||
|
GLIB_CFLAGS = @GLIB_CFLAGS@
|
||||||
|
GLIB_CONFIG_BIN = @GLIB_CONFIG_BIN@
|
||||||
|
GLIB_LIBS = @GLIB_LIBS@
|
||||||
|
GMOFILES = @GMOFILES@
|
||||||
|
GMSGFMT = @GMSGFMT@
|
||||||
|
GNC_CONFIGDIR = @GNC_CONFIGDIR@
|
||||||
|
GNC_DOC_INSTALL_DIR = @GNC_DOC_INSTALL_DIR@
|
||||||
|
GNC_LIBDIR = @GNC_LIBDIR@
|
||||||
|
GNC_SCM_INSTALL_DIR = @GNC_SCM_INSTALL_DIR@
|
||||||
|
GNC_SHAREDIR = @GNC_SHAREDIR@
|
||||||
|
GNOME_CFLAGS = @GNOME_CFLAGS@
|
||||||
|
GNOME_CONFIG_BIN = @GNOME_CONFIG_BIN@
|
||||||
|
GNOME_LIBS = @GNOME_LIBS@
|
||||||
|
GNOME_STATIC_TARGET = @GNOME_STATIC_TARGET@
|
||||||
|
GNOME_TARGET = @GNOME_TARGET@
|
||||||
|
GTK_XMHTML = @GTK_XMHTML@
|
||||||
|
GT_NO = @GT_NO@
|
||||||
|
GT_YES = @GT_YES@
|
||||||
|
GUILE = @GUILE@
|
||||||
|
GUILE_COMPILE_ARGS = @GUILE_COMPILE_ARGS@
|
||||||
|
GUILE_CONFIG = @GUILE_CONFIG@
|
||||||
|
GUILE_LINK_ARGS = @GUILE_LINK_ARGS@
|
||||||
|
G_WRAP = @G_WRAP@
|
||||||
|
G_WRAP_COMPILE_ARGS = @G_WRAP_COMPILE_ARGS@
|
||||||
|
G_WRAP_CONFIG = @G_WRAP_CONFIG@
|
||||||
|
G_WRAP_LINK_ARGS = @G_WRAP_LINK_ARGS@
|
||||||
|
INCLUDE_LOCALE_H = @INCLUDE_LOCALE_H@
|
||||||
|
INSTOBJEXT = @INSTOBJEXT@
|
||||||
|
INTLDEPS = @INTLDEPS@
|
||||||
|
INTLLIBS = @INTLLIBS@
|
||||||
|
INTLOBJS = @INTLOBJS@
|
||||||
|
LIBTOOL = @LIBTOOL@
|
||||||
|
LN_S = @LN_S@
|
||||||
|
LOCALE_DIR = @LOCALE_DIR@
|
||||||
|
MAKEINFO = @MAKEINFO@
|
||||||
|
MKINSTALLDIRS = @MKINSTALLDIRS@
|
||||||
|
MSGFMT = @MSGFMT@
|
||||||
|
OBJDUMP = @OBJDUMP@
|
||||||
|
PACKAGE = @PACKAGE@
|
||||||
|
PERL = @PERL@
|
||||||
|
PERLINCL = @PERLINCL@
|
||||||
|
POFILES = @POFILES@
|
||||||
|
POSUB = @POSUB@
|
||||||
|
RANLIB = @RANLIB@
|
||||||
|
SWIG = @SWIG@
|
||||||
|
USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
|
||||||
|
USE_NLS = @USE_NLS@
|
||||||
|
VERSION = @VERSION@
|
||||||
|
l = @l@
|
||||||
|
|
||||||
|
SUBDIRS = dtd explore parser
|
||||||
|
|
||||||
|
EXTRA_DIST = .cvsignore README basic.ofx ofx-dtd-idl.txt ofx1.5.0.10.dtd
|
||||||
|
|
||||||
|
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
|
||||||
|
CONFIG_HEADER = ../../../config.h
|
||||||
|
CONFIG_CLEAN_FILES =
|
||||||
|
DIST_COMMON = README Makefile.am Makefile.in
|
||||||
|
|
||||||
|
|
||||||
|
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
|
||||||
|
|
||||||
|
TAR = gtar
|
||||||
|
GZIP_ENV = --best
|
||||||
|
all: all-redirect
|
||||||
|
.SUFFIXES:
|
||||||
|
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
|
||||||
|
cd $(top_srcdir) && $(AUTOMAKE) --gnu src/experimental/ofx/Makefile
|
||||||
|
|
||||||
|
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES)
|
||||||
|
cd $(top_builddir) \
|
||||||
|
&& CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
|
||||||
|
|
||||||
|
|
||||||
|
# This directory's subdirectories are mostly independent; you can cd
|
||||||
|
# into them and run `make' without going through this Makefile.
|
||||||
|
# To change the values of `make' variables: instead of editing Makefiles,
|
||||||
|
# (1) if the variable is set in `config.status', edit `config.status'
|
||||||
|
# (which will cause the Makefiles to be regenerated when you run `make');
|
||||||
|
# (2) otherwise, pass the desired values on the `make' command line.
|
||||||
|
|
||||||
|
@SET_MAKE@
|
||||||
|
|
||||||
|
all-recursive install-data-recursive install-exec-recursive \
|
||||||
|
installdirs-recursive install-recursive uninstall-recursive \
|
||||||
|
check-recursive installcheck-recursive info-recursive dvi-recursive:
|
||||||
|
@set fnord $(MAKEFLAGS); amf=$$2; \
|
||||||
|
dot_seen=no; \
|
||||||
|
target=`echo $@ | sed s/-recursive//`; \
|
||||||
|
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||||
|
echo "Making $$target in $$subdir"; \
|
||||||
|
if test "$$subdir" = "."; then \
|
||||||
|
dot_seen=yes; \
|
||||||
|
local_target="$$target-am"; \
|
||||||
|
else \
|
||||||
|
local_target="$$target"; \
|
||||||
|
fi; \
|
||||||
|
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|
||||||
|
|| case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
|
||||||
|
done; \
|
||||||
|
if test "$$dot_seen" = "no"; then \
|
||||||
|
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
|
||||||
|
fi; test -z "$$fail"
|
||||||
|
|
||||||
|
mostlyclean-recursive clean-recursive distclean-recursive \
|
||||||
|
maintainer-clean-recursive:
|
||||||
|
@set fnord $(MAKEFLAGS); amf=$$2; \
|
||||||
|
dot_seen=no; \
|
||||||
|
rev=''; list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||||
|
rev="$$subdir $$rev"; \
|
||||||
|
test "$$subdir" = "." && dot_seen=yes; \
|
||||||
|
done; \
|
||||||
|
test "$$dot_seen" = "no" && rev=". $$rev"; \
|
||||||
|
target=`echo $@ | sed s/-recursive//`; \
|
||||||
|
for subdir in $$rev; do \
|
||||||
|
echo "Making $$target in $$subdir"; \
|
||||||
|
if test "$$subdir" = "."; then \
|
||||||
|
local_target="$$target-am"; \
|
||||||
|
else \
|
||||||
|
local_target="$$target"; \
|
||||||
|
fi; \
|
||||||
|
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|
||||||
|
|| case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
|
||||||
|
done && test -z "$$fail"
|
||||||
|
tags-recursive:
|
||||||
|
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||||
|
test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
|
||||||
|
done
|
||||||
|
|
||||||
|
tags: TAGS
|
||||||
|
|
||||||
|
ID: $(HEADERS) $(SOURCES) $(LISP)
|
||||||
|
list='$(SOURCES) $(HEADERS)'; \
|
||||||
|
unique=`for i in $$list; do echo $$i; done | \
|
||||||
|
awk ' { files[$$0] = 1; } \
|
||||||
|
END { for (i in files) print i; }'`; \
|
||||||
|
here=`pwd` && cd $(srcdir) \
|
||||||
|
&& mkid -f$$here/ID $$unique $(LISP)
|
||||||
|
|
||||||
|
TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP)
|
||||||
|
tags=; \
|
||||||
|
here=`pwd`; \
|
||||||
|
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||||
|
if test "$$subdir" = .; then :; else \
|
||||||
|
test -f $$subdir/TAGS && tags="$$tags -i $$here/$$subdir/TAGS"; \
|
||||||
|
fi; \
|
||||||
|
done; \
|
||||||
|
list='$(SOURCES) $(HEADERS)'; \
|
||||||
|
unique=`for i in $$list; do echo $$i; done | \
|
||||||
|
awk ' { files[$$0] = 1; } \
|
||||||
|
END { for (i in files) print i; }'`; \
|
||||||
|
test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
|
||||||
|
|| (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags $$unique $(LISP) -o $$here/TAGS)
|
||||||
|
|
||||||
|
mostlyclean-tags:
|
||||||
|
|
||||||
|
clean-tags:
|
||||||
|
|
||||||
|
distclean-tags:
|
||||||
|
-rm -f TAGS ID
|
||||||
|
|
||||||
|
maintainer-clean-tags:
|
||||||
|
|
||||||
|
distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
|
||||||
|
|
||||||
|
subdir = src/experimental/ofx
|
||||||
|
|
||||||
|
distdir: $(DISTFILES)
|
||||||
|
here=`cd $(top_builddir) && pwd`; \
|
||||||
|
top_distdir=`cd $(top_distdir) && pwd`; \
|
||||||
|
distdir=`cd $(distdir) && pwd`; \
|
||||||
|
cd $(top_srcdir) \
|
||||||
|
&& $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnu src/experimental/ofx/Makefile
|
||||||
|
@for file in $(DISTFILES); do \
|
||||||
|
d=$(srcdir); \
|
||||||
|
if test -d $$d/$$file; then \
|
||||||
|
cp -pr $$d/$$file $(distdir)/$$file; \
|
||||||
|
else \
|
||||||
|
test -f $(distdir)/$$file \
|
||||||
|
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \
|
||||||
|
|| cp -p $$d/$$file $(distdir)/$$file || :; \
|
||||||
|
fi; \
|
||||||
|
done
|
||||||
|
for subdir in $(SUBDIRS); do \
|
||||||
|
if test "$$subdir" = .; then :; else \
|
||||||
|
test -d $(distdir)/$$subdir \
|
||||||
|
|| mkdir $(distdir)/$$subdir \
|
||||||
|
|| exit 1; \
|
||||||
|
chmod 777 $(distdir)/$$subdir; \
|
||||||
|
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir=../$(top_distdir) distdir=../$(distdir)/$$subdir distdir) \
|
||||||
|
|| exit 1; \
|
||||||
|
fi; \
|
||||||
|
done
|
||||||
|
info-am:
|
||||||
|
info: info-recursive
|
||||||
|
dvi-am:
|
||||||
|
dvi: dvi-recursive
|
||||||
|
check-am: all-am
|
||||||
|
check: check-recursive
|
||||||
|
installcheck-am:
|
||||||
|
installcheck: installcheck-recursive
|
||||||
|
install-exec-am:
|
||||||
|
install-exec: install-exec-recursive
|
||||||
|
|
||||||
|
install-data-am:
|
||||||
|
install-data: install-data-recursive
|
||||||
|
|
||||||
|
install-am: all-am
|
||||||
|
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||||
|
install: install-recursive
|
||||||
|
uninstall-am:
|
||||||
|
uninstall: uninstall-recursive
|
||||||
|
all-am: Makefile
|
||||||
|
all-redirect: all-recursive
|
||||||
|
install-strip:
|
||||||
|
$(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
|
||||||
|
installdirs: installdirs-recursive
|
||||||
|
installdirs-am:
|
||||||
|
|
||||||
|
|
||||||
|
mostlyclean-generic:
|
||||||
|
|
||||||
|
clean-generic:
|
||||||
|
|
||||||
|
distclean-generic:
|
||||||
|
-rm -f Makefile $(CONFIG_CLEAN_FILES)
|
||||||
|
-rm -f config.cache config.log stamp-h stamp-h[0-9]*
|
||||||
|
|
||||||
|
maintainer-clean-generic:
|
||||||
|
mostlyclean-am: mostlyclean-tags mostlyclean-generic
|
||||||
|
|
||||||
|
mostlyclean: mostlyclean-recursive
|
||||||
|
|
||||||
|
clean-am: clean-tags clean-generic mostlyclean-am
|
||||||
|
|
||||||
|
clean: clean-recursive
|
||||||
|
|
||||||
|
distclean-am: distclean-tags distclean-generic clean-am
|
||||||
|
-rm -f libtool
|
||||||
|
|
||||||
|
distclean: distclean-recursive
|
||||||
|
|
||||||
|
maintainer-clean-am: maintainer-clean-tags maintainer-clean-generic \
|
||||||
|
distclean-am
|
||||||
|
@echo "This command is intended for maintainers to use;"
|
||||||
|
@echo "it deletes files that may require special tools to rebuild."
|
||||||
|
|
||||||
|
maintainer-clean: maintainer-clean-recursive
|
||||||
|
|
||||||
|
.PHONY: install-data-recursive uninstall-data-recursive \
|
||||||
|
install-exec-recursive uninstall-exec-recursive installdirs-recursive \
|
||||||
|
uninstalldirs-recursive all-recursive check-recursive \
|
||||||
|
installcheck-recursive info-recursive dvi-recursive \
|
||||||
|
mostlyclean-recursive distclean-recursive clean-recursive \
|
||||||
|
maintainer-clean-recursive tags tags-recursive mostlyclean-tags \
|
||||||
|
distclean-tags clean-tags maintainer-clean-tags distdir info-am info \
|
||||||
|
dvi-am dvi check check-am installcheck-am installcheck install-exec-am \
|
||||||
|
install-exec install-data-am install-data install-am install \
|
||||||
|
uninstall-am uninstall all-redirect all-am all installdirs-am \
|
||||||
|
installdirs mostlyclean-generic distclean-generic clean-generic \
|
||||||
|
maintainer-clean-generic clean mostlyclean distclean maintainer-clean
|
||||||
|
|
||||||
|
|
||||||
|
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||||
|
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||||
|
.NOEXPORT:
|
45
src/experimental/ofx/README
Normal file
45
src/experimental/ofx/README
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
|
||||||
|
This directory contains some experimental code to handle
|
||||||
|
OFX (Open Financial Exchange) messages.
|
||||||
|
|
||||||
|
The most interesting thing here is the DTD parser "parseOfx"
|
||||||
|
which attempts to build a C++ interface that models the
|
||||||
|
structure of the OFX DTD's. It *almost* works.
|
||||||
|
Its in the parser directory.
|
||||||
|
|
||||||
|
--------------------------------------------------------------
|
||||||
|
Ueli has some exploratory scripts in "explore"
|
||||||
|
|
||||||
|
--------------------------------------------------------------
|
||||||
|
|
||||||
|
OFX Specs:
|
||||||
|
http://www.ofx.net
|
||||||
|
http://www.ofx.net/ofx/de_spec.asp
|
||||||
|
|
||||||
|
HTTP tool:
|
||||||
|
http://www.inf.ufrgs.br/~sagula/urlget.html
|
||||||
|
can be found in this tree, at xacc/src/lib/urlget
|
||||||
|
|
||||||
|
OFX financicial institution list:
|
||||||
|
https://ofx-prod-filist.intuit.com/qw0700/filist.asp
|
||||||
|
|
||||||
|
SSLeay rpm's:
|
||||||
|
http://www.sabotage.net/redhat/ssl.html
|
||||||
|
http://ftp.tu-clausthal.de/pub/TEXT/EXPERT/linux/redhat-security/i386
|
||||||
|
http://ftp.tu-clausthal.de/pub/TEXT/EXPERT/linux/redhat-security/SRPMS
|
||||||
|
|
||||||
|
SGML tutorials:
|
||||||
|
http://www.hex.net/~cbbrowne/sgml.html
|
||||||
|
|
||||||
|
--------------------------------------------------------------
|
||||||
|
|
||||||
|
dtd/ofxmain.dtd: a hacked version of the original dtd, with
|
||||||
|
the intent of exposing the base types.
|
||||||
|
|
||||||
|
|
||||||
|
TBD:
|
||||||
|
get new version 1.5 ofx dtd's from www.ofx.org
|
||||||
|
|
||||||
|
|
||||||
|
--linas
|
||||||
|
March 1998
|
16
src/experimental/ofx/basic.ofx
Normal file
16
src/experimental/ofx/basic.ofx
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
<ofx>
|
||||||
|
<!-- this is a simple, basic ofx document. -->
|
||||||
|
<!-- its is a request to log in -->
|
||||||
|
<signonmsgsrqv1>
|
||||||
|
<sonrq>
|
||||||
|
<dtclient> 19980311233000.000 </dtclient>
|
||||||
|
<userid>linas</userid>
|
||||||
|
<userpass>r00tsh3ll</userpass>
|
||||||
|
<language>en</language>
|
||||||
|
<appid>xacc</appid>
|
||||||
|
<appver>0116</appver>
|
||||||
|
|
||||||
|
</sonrq>
|
||||||
|
</signonmsgsrqv1>
|
||||||
|
|
||||||
|
</ofx>
|
1
src/experimental/ofx/dtd/.cvsignore
Normal file
1
src/experimental/ofx/dtd/.cvsignore
Normal file
@ -0,0 +1 @@
|
|||||||
|
Makefile
|
13
src/experimental/ofx/dtd/Makefile.am
Normal file
13
src/experimental/ofx/dtd/Makefile.am
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
|
||||||
|
EXTRA_DIST = \
|
||||||
|
.cvsignore \
|
||||||
|
README \
|
||||||
|
ofxact.dtd \
|
||||||
|
ofxbank.dtd \
|
||||||
|
ofxbill.dtd \
|
||||||
|
ofxinv.dtd \
|
||||||
|
ofxmail.dtd \
|
||||||
|
ofxmain.dtd \
|
||||||
|
ofxmain.dtd.original \
|
||||||
|
ofxprof.dtd \
|
||||||
|
ofxsign.dtd
|
228
src/experimental/ofx/dtd/Makefile.in
Normal file
228
src/experimental/ofx/dtd/Makefile.in
Normal file
@ -0,0 +1,228 @@
|
|||||||
|
# Makefile.in generated automatically by automake 1.4 from Makefile.am
|
||||||
|
|
||||||
|
# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
|
||||||
|
# This Makefile.in is free software; the Free Software Foundation
|
||||||
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
|
# with or without modifications, as long as this notice is preserved.
|
||||||
|
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||||
|
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||||
|
# PARTICULAR PURPOSE.
|
||||||
|
|
||||||
|
|
||||||
|
SHELL = @SHELL@
|
||||||
|
|
||||||
|
srcdir = @srcdir@
|
||||||
|
top_srcdir = @top_srcdir@
|
||||||
|
VPATH = @srcdir@
|
||||||
|
prefix = @prefix@
|
||||||
|
exec_prefix = @exec_prefix@
|
||||||
|
|
||||||
|
bindir = @bindir@
|
||||||
|
sbindir = @sbindir@
|
||||||
|
libexecdir = @libexecdir@
|
||||||
|
datadir = @datadir@
|
||||||
|
sysconfdir = @sysconfdir@
|
||||||
|
sharedstatedir = @sharedstatedir@
|
||||||
|
localstatedir = @localstatedir@
|
||||||
|
libdir = @libdir@
|
||||||
|
infodir = @infodir@
|
||||||
|
mandir = @mandir@
|
||||||
|
includedir = @includedir@
|
||||||
|
oldincludedir = /usr/include
|
||||||
|
|
||||||
|
DESTDIR =
|
||||||
|
|
||||||
|
pkgdatadir = $(datadir)/@PACKAGE@
|
||||||
|
pkglibdir = $(libdir)/@PACKAGE@
|
||||||
|
pkgincludedir = $(includedir)/@PACKAGE@
|
||||||
|
|
||||||
|
top_builddir = ../../../..
|
||||||
|
|
||||||
|
ACLOCAL = @ACLOCAL@
|
||||||
|
AUTOCONF = @AUTOCONF@
|
||||||
|
AUTOMAKE = @AUTOMAKE@
|
||||||
|
AUTOHEADER = @AUTOHEADER@
|
||||||
|
|
||||||
|
INSTALL = @INSTALL@
|
||||||
|
INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
|
||||||
|
INSTALL_DATA = @INSTALL_DATA@
|
||||||
|
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||||
|
transform = @program_transform_name@
|
||||||
|
|
||||||
|
NORMAL_INSTALL = :
|
||||||
|
PRE_INSTALL = :
|
||||||
|
POST_INSTALL = :
|
||||||
|
NORMAL_UNINSTALL = :
|
||||||
|
PRE_UNINSTALL = :
|
||||||
|
POST_UNINSTALL = :
|
||||||
|
host_alias = @host_alias@
|
||||||
|
host_triplet = @host@
|
||||||
|
AS = @AS@
|
||||||
|
CATALOGS = @CATALOGS@
|
||||||
|
CATOBJEXT = @CATOBJEXT@
|
||||||
|
CC = @CC@
|
||||||
|
DATADIRNAME = @DATADIRNAME@
|
||||||
|
DLLTOOL = @DLLTOOL@
|
||||||
|
GENCAT = @GENCAT@
|
||||||
|
GLIB_CFLAGS = @GLIB_CFLAGS@
|
||||||
|
GLIB_CONFIG_BIN = @GLIB_CONFIG_BIN@
|
||||||
|
GLIB_LIBS = @GLIB_LIBS@
|
||||||
|
GMOFILES = @GMOFILES@
|
||||||
|
GMSGFMT = @GMSGFMT@
|
||||||
|
GNC_CONFIGDIR = @GNC_CONFIGDIR@
|
||||||
|
GNC_DOC_INSTALL_DIR = @GNC_DOC_INSTALL_DIR@
|
||||||
|
GNC_LIBDIR = @GNC_LIBDIR@
|
||||||
|
GNC_SCM_INSTALL_DIR = @GNC_SCM_INSTALL_DIR@
|
||||||
|
GNC_SHAREDIR = @GNC_SHAREDIR@
|
||||||
|
GNOME_CFLAGS = @GNOME_CFLAGS@
|
||||||
|
GNOME_CONFIG_BIN = @GNOME_CONFIG_BIN@
|
||||||
|
GNOME_LIBS = @GNOME_LIBS@
|
||||||
|
GNOME_STATIC_TARGET = @GNOME_STATIC_TARGET@
|
||||||
|
GNOME_TARGET = @GNOME_TARGET@
|
||||||
|
GTK_XMHTML = @GTK_XMHTML@
|
||||||
|
GT_NO = @GT_NO@
|
||||||
|
GT_YES = @GT_YES@
|
||||||
|
GUILE = @GUILE@
|
||||||
|
GUILE_COMPILE_ARGS = @GUILE_COMPILE_ARGS@
|
||||||
|
GUILE_CONFIG = @GUILE_CONFIG@
|
||||||
|
GUILE_LINK_ARGS = @GUILE_LINK_ARGS@
|
||||||
|
G_WRAP = @G_WRAP@
|
||||||
|
G_WRAP_COMPILE_ARGS = @G_WRAP_COMPILE_ARGS@
|
||||||
|
G_WRAP_CONFIG = @G_WRAP_CONFIG@
|
||||||
|
G_WRAP_LINK_ARGS = @G_WRAP_LINK_ARGS@
|
||||||
|
INCLUDE_LOCALE_H = @INCLUDE_LOCALE_H@
|
||||||
|
INSTOBJEXT = @INSTOBJEXT@
|
||||||
|
INTLDEPS = @INTLDEPS@
|
||||||
|
INTLLIBS = @INTLLIBS@
|
||||||
|
INTLOBJS = @INTLOBJS@
|
||||||
|
LIBTOOL = @LIBTOOL@
|
||||||
|
LN_S = @LN_S@
|
||||||
|
LOCALE_DIR = @LOCALE_DIR@
|
||||||
|
MAKEINFO = @MAKEINFO@
|
||||||
|
MKINSTALLDIRS = @MKINSTALLDIRS@
|
||||||
|
MSGFMT = @MSGFMT@
|
||||||
|
OBJDUMP = @OBJDUMP@
|
||||||
|
PACKAGE = @PACKAGE@
|
||||||
|
PERL = @PERL@
|
||||||
|
PERLINCL = @PERLINCL@
|
||||||
|
POFILES = @POFILES@
|
||||||
|
POSUB = @POSUB@
|
||||||
|
RANLIB = @RANLIB@
|
||||||
|
SWIG = @SWIG@
|
||||||
|
USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
|
||||||
|
USE_NLS = @USE_NLS@
|
||||||
|
VERSION = @VERSION@
|
||||||
|
l = @l@
|
||||||
|
|
||||||
|
EXTRA_DIST = .cvsignore README ofxact.dtd ofxbank.dtd ofxbill.dtd ofxinv.dtd ofxmail.dtd ofxmain.dtd ofxmain.dtd.original ofxprof.dtd ofxsign.dtd
|
||||||
|
|
||||||
|
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
|
||||||
|
CONFIG_HEADER = ../../../../config.h
|
||||||
|
CONFIG_CLEAN_FILES =
|
||||||
|
DIST_COMMON = README Makefile.am Makefile.in
|
||||||
|
|
||||||
|
|
||||||
|
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
|
||||||
|
|
||||||
|
TAR = gtar
|
||||||
|
GZIP_ENV = --best
|
||||||
|
all: all-redirect
|
||||||
|
.SUFFIXES:
|
||||||
|
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
|
||||||
|
cd $(top_srcdir) && $(AUTOMAKE) --gnu src/experimental/ofx/dtd/Makefile
|
||||||
|
|
||||||
|
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES)
|
||||||
|
cd $(top_builddir) \
|
||||||
|
&& CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
|
||||||
|
|
||||||
|
tags: TAGS
|
||||||
|
TAGS:
|
||||||
|
|
||||||
|
|
||||||
|
distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
|
||||||
|
|
||||||
|
subdir = src/experimental/ofx/dtd
|
||||||
|
|
||||||
|
distdir: $(DISTFILES)
|
||||||
|
here=`cd $(top_builddir) && pwd`; \
|
||||||
|
top_distdir=`cd $(top_distdir) && pwd`; \
|
||||||
|
distdir=`cd $(distdir) && pwd`; \
|
||||||
|
cd $(top_srcdir) \
|
||||||
|
&& $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnu src/experimental/ofx/dtd/Makefile
|
||||||
|
@for file in $(DISTFILES); do \
|
||||||
|
d=$(srcdir); \
|
||||||
|
if test -d $$d/$$file; then \
|
||||||
|
cp -pr $$d/$$file $(distdir)/$$file; \
|
||||||
|
else \
|
||||||
|
test -f $(distdir)/$$file \
|
||||||
|
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \
|
||||||
|
|| cp -p $$d/$$file $(distdir)/$$file || :; \
|
||||||
|
fi; \
|
||||||
|
done
|
||||||
|
info-am:
|
||||||
|
info: info-am
|
||||||
|
dvi-am:
|
||||||
|
dvi: dvi-am
|
||||||
|
check-am: all-am
|
||||||
|
check: check-am
|
||||||
|
installcheck-am:
|
||||||
|
installcheck: installcheck-am
|
||||||
|
install-exec-am:
|
||||||
|
install-exec: install-exec-am
|
||||||
|
|
||||||
|
install-data-am:
|
||||||
|
install-data: install-data-am
|
||||||
|
|
||||||
|
install-am: all-am
|
||||||
|
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||||
|
install: install-am
|
||||||
|
uninstall-am:
|
||||||
|
uninstall: uninstall-am
|
||||||
|
all-am: Makefile
|
||||||
|
all-redirect: all-am
|
||||||
|
install-strip:
|
||||||
|
$(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
|
||||||
|
installdirs:
|
||||||
|
|
||||||
|
|
||||||
|
mostlyclean-generic:
|
||||||
|
|
||||||
|
clean-generic:
|
||||||
|
|
||||||
|
distclean-generic:
|
||||||
|
-rm -f Makefile $(CONFIG_CLEAN_FILES)
|
||||||
|
-rm -f config.cache config.log stamp-h stamp-h[0-9]*
|
||||||
|
|
||||||
|
maintainer-clean-generic:
|
||||||
|
mostlyclean-am: mostlyclean-generic
|
||||||
|
|
||||||
|
mostlyclean: mostlyclean-am
|
||||||
|
|
||||||
|
clean-am: clean-generic mostlyclean-am
|
||||||
|
|
||||||
|
clean: clean-am
|
||||||
|
|
||||||
|
distclean-am: distclean-generic clean-am
|
||||||
|
-rm -f libtool
|
||||||
|
|
||||||
|
distclean: distclean-am
|
||||||
|
|
||||||
|
maintainer-clean-am: maintainer-clean-generic distclean-am
|
||||||
|
@echo "This command is intended for maintainers to use;"
|
||||||
|
@echo "it deletes files that may require special tools to rebuild."
|
||||||
|
|
||||||
|
maintainer-clean: maintainer-clean-am
|
||||||
|
|
||||||
|
.PHONY: tags distdir info-am info dvi-am dvi check check-am \
|
||||||
|
installcheck-am installcheck install-exec-am install-exec \
|
||||||
|
install-data-am install-data install-am install uninstall-am uninstall \
|
||||||
|
all-redirect all-am all installdirs mostlyclean-generic \
|
||||||
|
distclean-generic clean-generic maintainer-clean-generic clean \
|
||||||
|
mostlyclean distclean maintainer-clean
|
||||||
|
|
||||||
|
|
||||||
|
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||||
|
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||||
|
.NOEXPORT:
|
8
src/experimental/ofx/dtd/README
Normal file
8
src/experimental/ofx/dtd/README
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
|
||||||
|
These are the Open Financial Exchange (OFX) DTD's
|
||||||
|
|
||||||
|
They are *not* the original dtd's; they have been slightly
|
||||||
|
hacked to fix a few bugs, and to simplify parsing ever so slightly.
|
||||||
|
Hopefully the changes do not affect the correctness.
|
||||||
|
|
||||||
|
|
118
src/experimental/ofx/dtd/ofxact.dtd
Normal file
118
src/experimental/ofx/dtd/ofxact.dtd
Normal file
@ -0,0 +1,118 @@
|
|||||||
|
<!--
|
||||||
|
$Revision$
|
||||||
|
$Date$
|
||||||
|
|
||||||
|
Open Financial Exchange DTD - activation module
|
||||||
|
Copyright 1997 CheckFree Corp., Intuit Inc., Microsoft Corp. All rights reserved
|
||||||
|
-->
|
||||||
|
|
||||||
|
<!-- Message Sets -->
|
||||||
|
|
||||||
|
<!ELEMENT SIGNUPMSGSRQV1 - - ((ENROLLTRNRQ | ACCTINFOTRNRQ |
|
||||||
|
CHGUSERINFOTRNRQ | CHGUSERINFOSYNCRQ |
|
||||||
|
ACCTTRNRQ | ACCTSYNCRQ)+ )>
|
||||||
|
<!ELEMENT SIGNUPMSGSRSV1 - - ((ENROLLTRNRS | ACCTINFOTRNRS |
|
||||||
|
CHGUSERINFOTRNRS | CHGUSERINFOSYNCRS |
|
||||||
|
ACCTTRNRS | ACCTSYNCRS)+ )>
|
||||||
|
|
||||||
|
<!-- Profile entry for message set -->
|
||||||
|
<!ELEMENT SIGNUPMSGSET - - (SIGNUPMSGSETV1)>
|
||||||
|
<!ELEMENT SIGNUPMSGSETV1 - - (MSGSETCORE ,
|
||||||
|
(CLIENTENROLL | WEBENROLL | OTHERENROLL),
|
||||||
|
CHGUSERINFO, AVAILACCTS, CLIENTACTREQ)>
|
||||||
|
|
||||||
|
<!ELEMENT CLIENTENROLL - - (ACCTREQUIRED)>
|
||||||
|
<!ELEMENT WEBENROLL - - (URL)>
|
||||||
|
<!ELEMENT OTHERENROLL - - (MESSAGE)>
|
||||||
|
|
||||||
|
<!ELEMENT ACCTREQUIRED - o %BOOLTYPE>
|
||||||
|
<!ELEMENT CHGUSERINFO - o %BOOLTYPE>
|
||||||
|
<!ELEMENT AVAILACCTS - o %BOOLTYPE>
|
||||||
|
<!ELEMENT CLIENTACTREQ - o %BOOLTYPE>
|
||||||
|
|
||||||
|
<!-- Transactions -->
|
||||||
|
|
||||||
|
<!ELEMENT ENROLLTRNRQ - - (%TRNRQMACRO , ENROLLRQ)>
|
||||||
|
<!ELEMENT ENROLLTRNRS - - (%TRNRSMACRO , ENROLLRS?)>
|
||||||
|
<!ELEMENT ACCTINFOTRNRQ - - (%TRNRQMACRO , ACCTINFORQ)>
|
||||||
|
<!ELEMENT ACCTTRNRQ - - (%TRNRQMACRO , ACCTRQ)>
|
||||||
|
<!ELEMENT ACCTINFOTRNRS - - (%TRNRSMACRO , ACCTINFORS?)>
|
||||||
|
<!ELEMENT ACCTTRNRS - - (%TRNRSMACRO , ACCTRS?)>
|
||||||
|
<!ELEMENT CHGUSERINFOTRNRQ - - (%TRNRQMACRO, CHGUSERINFORQ)>
|
||||||
|
<!ELEMENT CHGUSERINFOTRNRS - - (%TRNRSMACRO, CHGUSERINFORS?)>
|
||||||
|
|
||||||
|
<!-- ================== -->
|
||||||
|
<!-- Enrollment -->
|
||||||
|
<!-- ================== -->
|
||||||
|
|
||||||
|
<!ELEMENT ENROLLRQ - - (FIRSTNAME , MIDDLENAME ,
|
||||||
|
LASTNAME , ADDR1,ADDR2?,ADDR3? ,
|
||||||
|
CITY , STATE , POSTALCODE ,
|
||||||
|
COUNTRY , DAYPHONE , EVEPHONE ,
|
||||||
|
EMAIL , USERID? , TAXID ,
|
||||||
|
SECURITYNAME , DATEBIRTH ,
|
||||||
|
(%ACCTFROMMACRO)? )>
|
||||||
|
|
||||||
|
<!-- most above name / addr elements in ofxmain.dtd -->
|
||||||
|
|
||||||
|
<!ELEMENT TAXID - o %STRTYPE>
|
||||||
|
<!ELEMENT SECURITYNAME - o %STRTYPE>
|
||||||
|
<!ELEMENT DATEBIRTH - o %DTTMTYPE>
|
||||||
|
|
||||||
|
<!ELEMENT ENROLLRS - - (TEMPPASS? , USERID? , DTEXPIRE?)>
|
||||||
|
<!-- NOTE: could constrain DTEXPIRE -->
|
||||||
|
|
||||||
|
<!ELEMENT TEMPPASS - o %STRTYPE>
|
||||||
|
<!ELEMENT DTEXPIRE - o %DTTMTYPE>
|
||||||
|
|
||||||
|
<!-- Change User Info -->
|
||||||
|
|
||||||
|
<!ELEMENT CHGUSERINFORQ - - (FIRSTNAME?, MIDDLENAME?, LASTNAME?,
|
||||||
|
ADDR1?,ADDR2?,ADDR3?,
|
||||||
|
CITY?, STATE?, POSTALCODE?, COUNTRY?,
|
||||||
|
DAYPHONE?, EVEPHONE?, EMAIL?)>
|
||||||
|
|
||||||
|
<!ELEMENT CHGUSERINFORS - - (FIRSTNAME?, MIDDLENAME?, LASTNAME?,
|
||||||
|
ADDR1?,ADDR2?,ADDR3?,
|
||||||
|
CITY?, STATE?, POSTALCODE?, COUNTRY?,
|
||||||
|
DAYPHONE?, EVEPHONE?, EMAIL?,
|
||||||
|
DTINFOCHG)>
|
||||||
|
|
||||||
|
<!ELEMENT DTINFOCHG - o %DTTMTYPE>
|
||||||
|
|
||||||
|
<!ELEMENT CHGUSERINFOSYNCRQ - - (%SYNCRQMACRO , CHGUSERINFOTRNRQ*)>
|
||||||
|
<!ELEMENT CHGUSERINFOSYNCRS - - (%SYNCRSMACRO , CHGUSERINFOTRNRS*)>
|
||||||
|
|
||||||
|
<!-- Top level request and response -->
|
||||||
|
<!ELEMENT ACCTINFORQ - - (DTACCTUP)>
|
||||||
|
<!ELEMENT ACCTINFORS - - (DTACCTUP , ACCTINFO*)>
|
||||||
|
|
||||||
|
<!-- Account Info aggregate
|
||||||
|
Note: this refers to a macro in ofxmain that
|
||||||
|
list all of the account info aggregates
|
||||||
|
-->
|
||||||
|
<!ELEMENT ACCTINFO - - (DESC? , PHONE? ,
|
||||||
|
(%ACCTINFOMACRO)+ )>
|
||||||
|
|
||||||
|
<!-- Service status - should be included as part of
|
||||||
|
the ACCTINFOMACRO aggregates. Values
|
||||||
|
are AVAIL, PEND, ACTIVE -->
|
||||||
|
<!ELEMENT SVCSTATUS - o %STRTYPE>
|
||||||
|
<!-- -----------------
|
||||||
|
Service Activation
|
||||||
|
----------------- -->
|
||||||
|
|
||||||
|
<!ELEMENT ACCTRQ - - ((SVCADD | SVCCHG | SVCDEL) ,
|
||||||
|
SVC)>
|
||||||
|
<!ELEMENT ACCTRS - - ((SVCADD | SVCCHG | SVCDEL) ,
|
||||||
|
SVC, SVCSTATUS)>
|
||||||
|
<!ELEMENT SVCADD - - (%ACCTTOMACRO)>
|
||||||
|
<!ELEMENT SVCDEL - - (%ACCTFROMMACRO)>
|
||||||
|
<!ELEMENT SVCCHG - - (%ACCTFROMMACRO , %ACCTTOMACRO)>
|
||||||
|
|
||||||
|
<!ELEMENT SVC - o %STRTYPE>
|
||||||
|
|
||||||
|
<!-- Synchronization -->
|
||||||
|
|
||||||
|
<!ELEMENT ACCTSYNCRQ - - (%SYNCRQMACRO , ACCTTRNRQ*)>
|
||||||
|
<!ELEMENT ACCTSYNCRS - - (%SYNCRSMACRO , ACCTTRNRS*)>
|
601
src/experimental/ofx/dtd/ofxbank.dtd
Normal file
601
src/experimental/ofx/dtd/ofxbank.dtd
Normal file
@ -0,0 +1,601 @@
|
|||||||
|
<!--
|
||||||
|
$Revision$
|
||||||
|
$Date$
|
||||||
|
|
||||||
|
Open Financial Exchange DTD - banking module
|
||||||
|
Copyright 1997 CheckFree Corp., Intuit Inc., Microsoft Corp. All rights reserved
|
||||||
|
|
||||||
|
-->
|
||||||
|
|
||||||
|
<!-- ============================================================================= -->
|
||||||
|
<!-- Message Entrys for Message Sets -->
|
||||||
|
<!-- ============================================================================= -->
|
||||||
|
|
||||||
|
<!ELEMENT BANKMSGSET - - (BANKMSGSETV1)>
|
||||||
|
<!ELEMENT CREDITCARDMSGSET - - (CREDITCARDMSGSETV1)>
|
||||||
|
<!ELEMENT INTERXFERMSGSET - - (INTERXFERMSGSETV1)>
|
||||||
|
<!ELEMENT WIREXFERMSGSET - - (WIREXFERMSGSETV1)>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- ============================================================================= -->
|
||||||
|
<!-- Message Set Profile Data -->
|
||||||
|
<!-- ============================================================================= -->
|
||||||
|
|
||||||
|
<!-- Banking Message Set -->
|
||||||
|
<!ELEMENT BANKMSGSETV1 - - (MSGSETCORE , INVALIDACCTTYPE* , CLOSINGAVAIL , XFERPROF? ,
|
||||||
|
STPCHKPROF? , EMAILPROF)>
|
||||||
|
|
||||||
|
<!-- Credit Card Message Set -->
|
||||||
|
<!ELEMENT CREDITCARDMSGSETV1 - - (MSGSETCORE , CLOSINGAVAIL)>
|
||||||
|
|
||||||
|
<!-- Interbank Transfer Message Set -->
|
||||||
|
<!ELEMENT INTERXFERMSGSETV1 - - (MSGSETCORE , XFERPROF , CANBILLPAY, CANCELWND , DOMXFERFEE ,
|
||||||
|
INTLXFERFEE)>
|
||||||
|
|
||||||
|
<!-- Wire Transfer Message Set -->
|
||||||
|
<!ELEMENT WIREXFERMSGSETV1 - - (MSGSETCORE , PROCDAYSOFF* , PROCENDTM , CANSCHED , DOMXFERFEE ,
|
||||||
|
INTLXFERFEE)>
|
||||||
|
|
||||||
|
|
||||||
|
<!ELEMENT XFERPROF - - (PROCDAYSOFF* , PROCENDTM , CANSCHED , CANRECUR , CANMODXFERS ,
|
||||||
|
CANMODMDLS , MODELWND, DAYSWITH, DFLTDAYSTOPAY)>
|
||||||
|
|
||||||
|
<!ELEMENT STPCHKPROF - - (PROCDAYSOFF* , PROCENDTM , CANUSERANGE , CANUSEDESC, STPCHKFEE)>
|
||||||
|
|
||||||
|
<!ELEMENT EMAILPROF - - (CANEMAIL , CANNOTIFY)>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Can schedule transfers -->
|
||||||
|
<!ELEMENT CANSCHED - o %BOOLTYPE>
|
||||||
|
|
||||||
|
<!-- Can modify pending transfers -->
|
||||||
|
<!ELEMENT CANMODXFERS - o %BOOLTYPE>
|
||||||
|
|
||||||
|
<!-- Can use description to stop a check -->
|
||||||
|
<!ELEMENT CANUSEDESC - o %BOOLTYPE>
|
||||||
|
|
||||||
|
<!-- Can use range to stop checks -->
|
||||||
|
<!ELEMENT CANUSERANGE - o %BOOLTYPE>
|
||||||
|
|
||||||
|
<!-- Default stop check fee -->
|
||||||
|
<!ELEMENT STPCHKFEE - o %AMTTYPE>
|
||||||
|
|
||||||
|
<!-- Can handle email -->
|
||||||
|
<!ELEMENT CANEMAIL - o %BOOLTYPE>
|
||||||
|
|
||||||
|
<!-- Can send notifications -->
|
||||||
|
<!ELEMENT CANNOTIFY - o %BOOLTYPE>
|
||||||
|
|
||||||
|
<!-- Unsupported account types -->
|
||||||
|
<!ELEMENT INVALIDACCTTYPE - o %STRTYPE>
|
||||||
|
|
||||||
|
<!-- Can return closing statement info -->
|
||||||
|
<!ELEMENT CLOSINGAVAIL - o %BOOLTYPE>
|
||||||
|
|
||||||
|
<!-- Can use interbank transfers for bill pay -->
|
||||||
|
<!ELEMENT CANBILLPAY - o %BOOLTYPE>
|
||||||
|
|
||||||
|
<!-- Number of days after which a transfer is processed that it can be canceled -->
|
||||||
|
<!ELEMENT CANCELWND - o %INTTYPE>
|
||||||
|
|
||||||
|
<!-- Fee for sending a domestic transfer transfer -->
|
||||||
|
<!ELEMENT DOMXFERFEE - o %INTTYPE>
|
||||||
|
|
||||||
|
<!-- Fee for sending an international transfer -->
|
||||||
|
<!ELEMENT INTLXFERFEE - o %INTTYPE>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- ============================================================================= -->
|
||||||
|
<!-- Message Sets -->
|
||||||
|
<!-- ============================================================================= -->
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Banking Messages Request Sets and their contained TRN requests -->
|
||||||
|
<!ELEMENT BANKMSGSRQV1 - - ((STMTTRNRQ | STMTENDTRNRQ | INTRATRNRQ | RECINTRATRNRQ |
|
||||||
|
STPCHKTRNRQ | BANKMAILTRNRQ | BANKMAILSYNCRQ |
|
||||||
|
STPCHKSYNCRQ | INTRASYNCRQ | RECINTRASYNCRQ)+) >
|
||||||
|
<!ELEMENT CREDITCARDMSGSRQV1 - - ((CCSTMTTRNRQ | CCSTMTENDTRNRQ)+)>
|
||||||
|
<!ELEMENT INTERXFERMSGSRQV1 - - ((INTERTRNRQ | RECINTERTRNRQ | INTERSYNCRQ | RECINTERSYNCRQ)+)>
|
||||||
|
<!ELEMENT WIREXFERMSGSRQV1 - - ((WIRETRNRQ | WIRESYNCRQ)+)>
|
||||||
|
|
||||||
|
<!-- Banking Message Set -->
|
||||||
|
<!ELEMENT STMTTRNRQ - - (%TRNRQMACRO , STMTRQ)>
|
||||||
|
<!ELEMENT STMTENDTRNRQ - - (%TRNRQMACRO , STMTENDRQ)>
|
||||||
|
<!ELEMENT STPCHKTRNRQ - - (%TRNRQMACRO , STPCHKRQ)>
|
||||||
|
<!ELEMENT INTRATRNRQ - - (%TRNRQMACRO , (INTRARQ | INTRAMODRQ | INTRACANRQ))>
|
||||||
|
<!ELEMENT RECINTRATRNRQ - - (%TRNRQMACRO , (RECINTRARQ | RECINTRAMODRQ | RECINTRACANRQ))>
|
||||||
|
<!ELEMENT BANKMAILTRNRQ - - (%TRNRQMACRO , BANKMAILRQ)>
|
||||||
|
|
||||||
|
<!-- Credit Card Message Set -->
|
||||||
|
<!ELEMENT CCSTMTTRNRQ - - (%TRNRQMACRO , CCSTMTRQ)>
|
||||||
|
<!ELEMENT CCSTMTENDTRNRQ - - (%TRNRQMACRO , CCSTMTENDRQ)>
|
||||||
|
|
||||||
|
<!-- Interbank Transfer Message Set -->
|
||||||
|
<!ELEMENT INTERTRNRQ - - (%TRNRQMACRO , (INTERRQ | INTERMODRQ | INTERCANRQ))>
|
||||||
|
<!ELEMENT RECINTERTRNRQ - - (%TRNRQMACRO , (RECINTERRQ | RECINTERMODRQ | RECINTERCANRQ))>
|
||||||
|
|
||||||
|
<!-- Wire Transfer Message Set -->
|
||||||
|
<!ELEMENT WIRETRNRQ - - (%TRNRQMACRO , (WIRERQ | WIRECANRQ))>
|
||||||
|
|
||||||
|
<!-- Banking Messages Response Sets and their contained TRN responses -->
|
||||||
|
<!ELEMENT BANKMSGSRSV1 - - ((STMTTRNRS | STMTENDTRNRS | INTRATRNRS | RECINTRATRNRS |
|
||||||
|
STPCHKTRNRS | BANKMAILTRNRS | BANKMAILSYNCRS |
|
||||||
|
STPCHKSYNCRS | INTRASYNCRS | RECINTRASYNCRS)+)>
|
||||||
|
<!ELEMENT CREDITCARDMSGSRSV1 - - ((CCSTMTTRNRS | CCSTMTENDTRNRS)+)>
|
||||||
|
<!ELEMENT INTERXFERMSGSRSV1 - - ((INTERTRNRS | RECINTERTRNRS | INTERSYNCRS | RECINTERSYNCRS)+)>
|
||||||
|
<!ELEMENT WIREXFERMSGSRSV1 - - ((WIRETRNRS | WIRESYNCRS)+)>
|
||||||
|
|
||||||
|
<!-- Banking TRN responses -->
|
||||||
|
|
||||||
|
<!-- Banking Message Set -->
|
||||||
|
<!ELEMENT STMTTRNRS - - (%TRNRSMACRO , STMTRS?)>
|
||||||
|
<!ELEMENT STMTENDTRNRS - - (%TRNRSMACRO , STMTENDRS?)>
|
||||||
|
<!ELEMENT STPCHKTRNRS - - (%TRNRSMACRO , STPCHKRS?)>
|
||||||
|
<!ELEMENT INTRATRNRS - - (%TRNRSMACRO , (INTRARS | INTRAMODRS | INTRACANRS)?)>
|
||||||
|
<!ELEMENT RECINTRATRNRS - - (%TRNRSMACRO , (RECINTRARS | RECINTRAMODRS | RECINTRACANRS)?)>
|
||||||
|
<!ELEMENT BANKMAILTRNRS - - (%TRNRSMACRO , (BANKMAILRS | CHKMAILRS | DEPMAILRS)?)>
|
||||||
|
|
||||||
|
<!-- Credit Card Message Set -->
|
||||||
|
<!ELEMENT CCSTMTTRNRS - - (%TRNRSMACRO , CCSTMTRS?)>
|
||||||
|
<!ELEMENT CCSTMTENDTRNRS - - (%TRNRSMACRO , CCSTMTENDRS?)>
|
||||||
|
|
||||||
|
<!-- Interbank Transfer Message Set -->
|
||||||
|
|
||||||
|
<!ELEMENT INTERTRNRS - - (%TRNRSMACRO , (INTERRS | INTERMODRS | INTERCANRS)?)>
|
||||||
|
<!ELEMENT RECINTERTRNRS - - (%TRNRSMACRO , (RECINTERRS | RECINTERMODRS | RECINTERCANRS)?)>
|
||||||
|
|
||||||
|
<!-- Wire Transfer Message Set -->
|
||||||
|
<!ELEMENT WIRETRNRS - - (%TRNRSMACRO , (WIRERS | WIRECANRS)?)>
|
||||||
|
|
||||||
|
<!-- ============================================================================= -->
|
||||||
|
<!-- Requests -->
|
||||||
|
<!-- ============================================================================= -->
|
||||||
|
|
||||||
|
<!-- statement request -->
|
||||||
|
<!ELEMENT STMTRQ - - (BANKACCTFROM , INCTRAN?)>
|
||||||
|
|
||||||
|
<!-- credit card statement request -->
|
||||||
|
<!ELEMENT CCSTMTRQ - - (CCACCTFROM , INCTRAN?)>
|
||||||
|
|
||||||
|
<!-- closing statement request request -->
|
||||||
|
<!ELEMENT STMTENDRQ - - (BANKACCTFROM , DTSTART? , DTEND?)>
|
||||||
|
|
||||||
|
<!-- credit card closing statement request -->
|
||||||
|
<!ELEMENT CCSTMTENDRQ - - (CCACCTFROM , DTSTART? , DTEND?)>
|
||||||
|
|
||||||
|
<!-- stop check request -->
|
||||||
|
<!ELEMENT STPCHKRQ - - (BANKACCTFROM , (CHKRANGE|CHKDESC))>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- intrabank transfer request -->
|
||||||
|
<!ELEMENT INTRARQ - - (XFERINFO)>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- intrabank transfer modification request -->
|
||||||
|
<!ELEMENT INTRAMODRQ - - (SRVRTID , XFERINFO)>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- intrabank transfer cancellation request -->
|
||||||
|
<!ELEMENT INTRACANRQ - - (SRVRTID)>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- interbank transfer request -->
|
||||||
|
<!ELEMENT INTERRQ - - (XFERINFO)>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- interbank transfer modification request -->
|
||||||
|
<!ELEMENT INTERMODRQ - - (SRVRTID , XFERINFO )>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- interbank transfer cancellation request -->
|
||||||
|
<!ELEMENT INTERCANRQ - - (SRVRTID)>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- wire transfer request -->
|
||||||
|
<!ELEMENT WIRERQ - - (BANKACCTFROM , WIREBENEFICIARY , WIREDESTBANK? , TRNAMT , DTDUE? , PAYINSTRUCT?)>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- wire transfer cancellation request -->
|
||||||
|
<!ELEMENT WIRECANRQ - - (SRVRTID)>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- recurring intra transfer request -->
|
||||||
|
<!ELEMENT RECINTRARQ - - (RECURRINST , INTRARQ)>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- recurring intra transfer modification request -->
|
||||||
|
<!ELEMENT RECINTRAMODRQ - - (RECSRVRTID , RECURRINST , INTRARQ , MODPENDING)>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- recurring intra transfer cancellation request -->
|
||||||
|
<!ELEMENT RECINTRACANRQ - - (RECSRVRTID , CANPENDING)>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- recurring inter transfer request -->
|
||||||
|
<!ELEMENT RECINTERRQ - - (RECURRINST , INTERRQ)>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- recurring inter transfer modification request -->
|
||||||
|
<!ELEMENT RECINTERMODRQ - - (RECSRVRTID , RECURRINST , INTERRQ , MODPENDING)>
|
||||||
|
|
||||||
|
<!-- recurring inter transfer cancellation request -->
|
||||||
|
<!ELEMENT RECINTERCANRQ - - (RECSRVRTID , CANPENDING)>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<!-- bank mail request -->
|
||||||
|
<!ELEMENT BANKMAILRQ - - ((BANKACCTFROM | CCACCTFROM) , MAIL)>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<!-- ============================================================================= -->
|
||||||
|
<!-- Synchronization -->
|
||||||
|
<!-- ============================================================================= -->
|
||||||
|
|
||||||
|
<!-- stop check synchronization request -->
|
||||||
|
<!ELEMENT STPCHKSYNCRQ - - (%SYNCRQMACRO , BANKACCTFROM, STPCHKTRNRQ*)>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- intrabank transfer sychronization request -->
|
||||||
|
<!ELEMENT INTRASYNCRQ - - (%SYNCRQMACRO , BANKACCTFROM, INTRATRNRQ*)>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- interbank transfer synchronization request -->
|
||||||
|
<!ELEMENT INTERSYNCRQ - - (%SYNCRQMACRO , BANKACCTFROM, INTERTRNRQ*)>
|
||||||
|
|
||||||
|
<!-- wire transfer synchronization request -->
|
||||||
|
<!ELEMENT WIRESYNCRQ - - (%SYNCRQMACRO , BANKACCTFROM, WIRETRNRQ*)>
|
||||||
|
|
||||||
|
|
||||||
|
<!--
|
||||||
|
recurring intra transfer synchronization request,
|
||||||
|
for transactions <RECINTRARQ>,<RECINTRAMODRQ>, and/or <RECINTRACANRQ>
|
||||||
|
-->
|
||||||
|
<!ELEMENT RECINTRASYNCRQ - - (%SYNCRQMACRO, BANKACCTFROM, RECINTRATRNRQ*)>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
recurring inter transfer synchronization request,
|
||||||
|
for transactions <RECINTERRQ>,<RECINTERMODRQ>, and/or <RECINTERCANRQ>
|
||||||
|
-->
|
||||||
|
<!ELEMENT RECINTERSYNCRQ - - (%SYNCRQMACRO, BANKACCTFROM, RECINTERTRNRQ*)>
|
||||||
|
|
||||||
|
<!-- bank mail synchronization request -->
|
||||||
|
<!ELEMENT BANKMAILSYNCRQ - - (%SYNCRQMACRO , INCIMAGES, USEHTML, (BANKACCTFROM | CCACCTFROM), BANKMAILTRNRQ*)>
|
||||||
|
|
||||||
|
<!-- ============================================================================= -->
|
||||||
|
<!-- Responses -->
|
||||||
|
<!-- ============================================================================= -->
|
||||||
|
|
||||||
|
<!-- statement response -->
|
||||||
|
<!ELEMENT STMTRS - - (CURDEF , BANKACCTFROM , BANKTRANLIST? , LEDGERBAL , AVAILBAL? , MKTGINFO?)>
|
||||||
|
|
||||||
|
<!-- credit card statement response -->
|
||||||
|
<!ELEMENT CCSTMTRS - - (CURDEF , CCACCTFROM , BANKTRANLIST? , LEDGERBAL , AVAILBAL? , MKTGINFO?)>
|
||||||
|
|
||||||
|
<!-- closing info response -->
|
||||||
|
<!ELEMENT STMTENDRS - - (CURDEF , BANKACCTFROM , CLOSING*)>
|
||||||
|
|
||||||
|
<!-- credit card closing info response -->
|
||||||
|
<!ELEMENT CCSTMTENDRS - - (CURDEF , CCACCTFROM , CCCLOSING*)>
|
||||||
|
|
||||||
|
<!-- stop check response -->
|
||||||
|
<!ELEMENT STPCHKRS - - (CURDEF , BANKACCTFROM , STPCHKNUM+,
|
||||||
|
FEE, FEEMSG)>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- intrabank transfer response -->
|
||||||
|
<!ELEMENT INTRARS - - (CURDEF , SRVRTID , XFERINFO , (DTXFERPRJ|DTPOSTED)? , RECSRVRTID?, XFERPRCSTS?)>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- intrabank transfer modification response -->
|
||||||
|
<!ELEMENT INTRAMODRS - - (SRVRTID , XFERINFO , XFERPRCSTS?)>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- intrabank transfer transfer cancellation response -->
|
||||||
|
<!ELEMENT INTRACANRS - - (SRVRTID)>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- interbank transfer response -->
|
||||||
|
<!ELEMENT INTERRS - - (CURDEF , SRVRTID , XFERINFO,
|
||||||
|
(DTXFERPRJ|DTPOSTED)? , REFNUM? , RECSRVRTID?, XFERPRCSTS?)>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- interbank transfer modification response -->
|
||||||
|
<!ELEMENT INTERMODRS - - (SRVRTID , XFERINFO, XFERPRCSTS?)>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- interbank transfer cancellation request -->
|
||||||
|
<!ELEMENT INTERCANRS - - (SRVRTID)>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- wire transfer response -->
|
||||||
|
<!ELEMENT WIRERS - - (CURDEF , SRVRTID , BANKACCTFROM , WIREBENEFICIARY ,
|
||||||
|
WIREDESTBANK? , TRNAMT , DTDUE? , PAYINSTRUCT? , (DTXFERPRJ|DTPOSTED)? , FEE? , CONFMSG?)>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- wire transfer cancellation request -->
|
||||||
|
<!ELEMENT WIRECANRS - - (SRVRTID)>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- recurring intra transfer response -->
|
||||||
|
<!ELEMENT RECINTRARS - - (RECSRVRTID , RECURRINST , INTRARS)>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- recurring intra transfer modification request -->
|
||||||
|
<!ELEMENT RECINTRAMODRS - - (RECSRVRTID , RECURRINST , INTRARS , MODPENDING)>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- recurring intra transfer cancellation response -->
|
||||||
|
<!ELEMENT RECINTRACANRS - - (RECSRVRTID , CANPENDING)>
|
||||||
|
|
||||||
|
<!-- recurring inter transfer response -->
|
||||||
|
<!ELEMENT RECINTERRS - - (RECSRVRTID , RECURRINST , INTERRS)>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- recurring inter transfer modification request -->
|
||||||
|
<!ELEMENT RECINTERMODRS - - (RECSRVRTID , RECURRINST , INTERRS , MODPENDING)>
|
||||||
|
|
||||||
|
<!-- recurring inter transfer cancellation response -->
|
||||||
|
<!ELEMENT RECINTERCANRS - - (RECSRVRTID , CANPENDING)>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- bank mail response -->
|
||||||
|
<!ELEMENT BANKMAILRS - - ((BANKACCTFROM | CCACCTFROM) , MAIL)>
|
||||||
|
|
||||||
|
<!-- returned check mail response -->
|
||||||
|
<!ELEMENT CHKMAILRS - - (BANKACCTFROM , MAIL , CHECKNUM , TRNAMT? , DTUSER? , FEE?)>
|
||||||
|
|
||||||
|
<!-- returned deposit mail response -->
|
||||||
|
<!ELEMENT DEPMAILRS - - (BANKACCTFROM , MAIL , TRNAMT , DTUSER? , FEE?)>
|
||||||
|
|
||||||
|
<!-- stop check synchronization request -->
|
||||||
|
<!ELEMENT STPCHKSYNCRS - - (%SYNCRSMACRO , BANKACCTFROM, STPCHKTRNRS*)>
|
||||||
|
|
||||||
|
<!-- intrabank transfer synchronization request -->
|
||||||
|
<!ELEMENT INTRASYNCRS - - (%SYNCRSMACRO , BANKACCTFROM, INTRATRNRS*)>
|
||||||
|
|
||||||
|
<!-- interbank transfer synchronization request -->
|
||||||
|
<!ELEMENT INTERSYNCRS - - (%SYNCRSMACRO , BANKACCTFROM, INTERTRNRS*)>
|
||||||
|
|
||||||
|
<!-- wire transfer synchronization request -->
|
||||||
|
<!ELEMENT WIRESYNCRS - - (%SYNCRSMACRO , BANKACCTFROM, WIRETRNRS*)>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
recurring intra transfer synchronization request,
|
||||||
|
for transactions <RECINTRARS>,<RECINTRARS>, and/or <RECINTRACANRS>
|
||||||
|
-->
|
||||||
|
<!ELEMENT RECINTRASYNCRS - - (%SYNCRSMACRO , BANKACCTFROM, RECINTRATRNRS*)>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
recurring inter transfer synchronization request,
|
||||||
|
for transactions <RECINTERRS>,<RECINTERRS>, and/or <RECINTERCANRS>
|
||||||
|
-->
|
||||||
|
<!ELEMENT RECINTERSYNCRS - - (%SYNCRSMACRO , BANKACCTFROM, RECINTERTRNRS*)>
|
||||||
|
|
||||||
|
<!-- wire transfer synchronization request -->
|
||||||
|
<!ELEMENT BANKMAILSYNCRS - - (%SYNCRSMACRO , (BANKACCTFROM | CCACCTFROM), BANKMAILTRNRS*)>
|
||||||
|
|
||||||
|
<!-- ============================================================================= -->
|
||||||
|
<!-- Aggregates -->
|
||||||
|
<!-- ============================================================================= -->
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<!-- BANKACCTINFO CCACCTINFO -->
|
||||||
|
<!ELEMENT BANKACCTINFO - - (BANKACCTFROM ,
|
||||||
|
SUPTXDL, XFERSRC, XFERDEST, SVCSTATUS)>
|
||||||
|
<!ELEMENT CCACCTINFO - - (CCACCTFROM ,
|
||||||
|
SUPTXDL, XFERSRC, XFERDEST, SVCSTATUS)>
|
||||||
|
|
||||||
|
<!ELEMENT SUPTXDL - o %BOOLTYPE>
|
||||||
|
<!ELEMENT XFERSRC - o %BOOLTYPE>
|
||||||
|
<!ELEMENT XFERDEST - o %BOOLTYPE>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
statement transaction data
|
||||||
|
-->
|
||||||
|
<!ELEMENT BANKTRANLIST - - (DTSTART , DTEND , STMTTRN*)>
|
||||||
|
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Ledger balance
|
||||||
|
-->
|
||||||
|
<!ELEMENT LEDGERBAL - - (BALAMT , DTASOF)>
|
||||||
|
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Available balance
|
||||||
|
-->
|
||||||
|
<!ELEMENT AVAILBAL - - (BALAMT , DTASOF)>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<!--
|
||||||
|
credit card statement information
|
||||||
|
-->
|
||||||
|
<!ELEMENT CCCLOSING - - (FITID , DTOPEN? , DTCLOSE , DTNEXT? ,
|
||||||
|
BALOPEN? , BALCLOSE ,
|
||||||
|
DTPMTDUE? , MINPMTDUE? ,
|
||||||
|
FINCHG? , PAYANDCREDIT? , PURANDADV? , DEBADJ? , CREDITLIMIT? ,
|
||||||
|
DTPOSTSTART , DTPOSTEND , MKTGINFO? ,
|
||||||
|
(CURRENCY | ORIGCURRENCY)? )>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
non-Credit Card account types
|
||||||
|
-->
|
||||||
|
<!ELEMENT CLOSING - - (FITID , DTOPEN? , DTCLOSE , DTNEXT? ,
|
||||||
|
BALOPEN? , BALCLOSE , BALMIN? ,
|
||||||
|
DEPANDCREDIT? , CHKANDDEB? , TOTALFEES? , TOTALINT? ,
|
||||||
|
DTPOSTSTART , DTPOSTEND , MKTGINFO? ,
|
||||||
|
(CURRENCY | ORIGCURRENCY)? )>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Opening statement date -->
|
||||||
|
<!ELEMENT DTOPEN - o %DTTMTYPE>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Closing statement date -->
|
||||||
|
<!ELEMENT DTCLOSE - o %DTTMTYPE>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Closing date of next statement -->
|
||||||
|
<!ELEMENT DTNEXT - o %DTTMTYPE>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Opening statement balance -->
|
||||||
|
<!ELEMENT BALOPEN - o %AMTTYPE>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Closing statement balance -->
|
||||||
|
<!ELEMENT BALCLOSE - o %AMTTYPE>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Payment due date -->
|
||||||
|
<!ELEMENT DTPMTDUE - o %DTTMTYPE>
|
||||||
|
|
||||||
|
<!-- Minimum amount due -->
|
||||||
|
<!ELEMENT MINPMTDUE - o %AMTTYPE>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Finance charges -->
|
||||||
|
<!ELEMENT FINCHG - o %AMTTYPE>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Total of payments and credits -->
|
||||||
|
<!ELEMENT PAYANDCREDIT - o %AMTTYPE>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Total of purchases and cash advance -->
|
||||||
|
<!ELEMENT PURANDADV - o %AMTTYPE>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Debit adjustments -->
|
||||||
|
<!ELEMENT DEBADJ - o %AMTTYPE>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Current credit limit -->
|
||||||
|
<!ELEMENT CREDITLIMIT - o %AMTTYPE>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Minimum balance in statement period -->
|
||||||
|
<!ELEMENT BALMIN - o %AMTTYPE>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Total of deposits and credits -->
|
||||||
|
<!ELEMENT DEPANDCREDIT - o %AMTTYPE>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Total of checks and debits -->
|
||||||
|
<!ELEMENT CHKANDDEB - o %AMTTYPE>
|
||||||
|
|
||||||
|
<!-- Total fees -->
|
||||||
|
<!ELEMENT TOTALFEES - o %AMTTYPE>
|
||||||
|
|
||||||
|
<!-- Total interest -->
|
||||||
|
<!ELEMENT TOTALINT - o %AMTTYPE>
|
||||||
|
|
||||||
|
<!-- Start date for posted transactions -->
|
||||||
|
<!ELEMENT DTPOSTSTART - o %DTTMTYPE>
|
||||||
|
|
||||||
|
<!-- End date for posted transactions -->
|
||||||
|
<!ELEMENT DTPOSTEND - o %DTTMTYPE>
|
||||||
|
|
||||||
|
<!-- statement transaction aggregate -->
|
||||||
|
<!ELEMENT STMTTRN - - (TRNTYPE , DTPOSTED , DTUSER? , DTAVAIL? , TRNAMT , FITID ,
|
||||||
|
(CORRECTFITID , CORRECTACTION)? ,
|
||||||
|
SRVRTID? , CHECKNUM? , REFNUM? ,
|
||||||
|
SIC? , PAYEEID? , (NAME | PAYEE)?, (BANKACCTTO | CCACCTTO)?, MEMO? ,
|
||||||
|
(CURRENCY | ORIGCURRENCY)?)>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Status of request - see section 5.5.1.4.1 for possible values -->
|
||||||
|
<!ELEMENT TRNTYPE - o %STRTYPE> <!--TODO: attribute candidate -->
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Date transaction was posted to account -->
|
||||||
|
<!ELEMENT DTPOSTED - o %DTTMTYPE>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Date user initiated transaction, if known -->
|
||||||
|
<!ELEMENT DTUSER - o %DTTMTYPE>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Date funds are available -->
|
||||||
|
<!ELEMENT DTAVAIL - o %DTTMTYPE>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Standard Industrial Code -->
|
||||||
|
<!ELEMENT SIC - o %INTTYPE>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Check range aggregate. See section 5.6.1.2.1 -->
|
||||||
|
<!ELEMENT CHKRANGE - - (CHKNUMSTART , CHKNUMEND?)>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Check description aggregate. See section 5.6.1.2.2 -->
|
||||||
|
<!ELEMENT CHKDESC - - (NAME , CHECKNUM? , DTUSER? , TRNAMT?)>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Start check number -->
|
||||||
|
<!ELEMENT CHKNUMSTART - o %IDTYPE>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Ending check number to cancel -->
|
||||||
|
<!ELEMENT CHKNUMEND - o %IDTYPE>
|
||||||
|
|
||||||
|
<!-- Reference number -->
|
||||||
|
<!ELEMENT REFNUM - o %STRTYPE>
|
||||||
|
|
||||||
|
<!-- stopped check item -->
|
||||||
|
<!ELEMENT STPCHKNUM - - (CHECKNUM , NAME? , DTUSER? , TRNAMT? ,
|
||||||
|
CHKSTATUS , CHKERROR? , (CURRENCY | ORIGCURRENCY)?)>
|
||||||
|
|
||||||
|
<!-- Status code for individual stop check request0 = OK1 = rejected100 = check not found101 = check already posted -->
|
||||||
|
<!ELEMENT CHKSTATUS - o %INTTYPE> <!-- TODO: attribute? -->
|
||||||
|
|
||||||
|
<!-- Further textual error explanation -->
|
||||||
|
<!ELEMENT CHKERROR - o %STRTYPE>
|
||||||
|
|
||||||
|
<!-- Transfer information aggregate -->
|
||||||
|
<!ELEMENT XFERINFO - - ((BANKACCTFROM | CCACCTFROM) , (BANKACCTTO | CCACCTTO) , TRNAMT , DTDUE?)>
|
||||||
|
|
||||||
|
<!-- Transfer processing status -->
|
||||||
|
<!ELEMENT XFERPRCSTS - - (XFERPRCCODE , DTXFERPRC)>
|
||||||
|
|
||||||
|
<!-- Transfers processing date; enum for processing date interpretation -->
|
||||||
|
<!ELEMENT XFERPRCCODE - o %STRTYPE>
|
||||||
|
|
||||||
|
<!-- Date transfer is expected to be processed -->
|
||||||
|
<!ELEMENT DTXFERPRC - o %DTTMTYPE>
|
||||||
|
|
||||||
|
<!-- Date transaction is projected for posting to account -->
|
||||||
|
<!ELEMENT DTXFERPRJ - o %DTTMTYPE>
|
||||||
|
|
||||||
|
<!-- Beneficiary of a wire transfer -- >
|
||||||
|
<!ELEMENT WIREBENEFICIARY - - (NAME , BANKACCTTO , MEMO?)>
|
||||||
|
|
||||||
|
<!-- Beneficiary's bank for a wire transfer -- >
|
||||||
|
<!ELEMENT WIREDESTBANK - - (EXTBANKDESC)>
|
||||||
|
|
||||||
|
<!-- Extended description of a bank for a wire transfer -- >
|
||||||
|
<!ELEMENT EXTBANKDESC - - (NAME , BANKID , ADDR1,ADDR2?,ADDR3? , CITY , STATE , POSTALCODE , COUNTRY? , PHONE?)>
|
||||||
|
|
||||||
|
<!-- Payment instructions for a wire transfer -->
|
||||||
|
<!ELEMENT PAYINSTRUCT - o %STRTYPE>
|
||||||
|
|
||||||
|
<!-- Fee assessed for the transfer -->
|
||||||
|
<!ELEMENT FEE - o %AMTTYPE>
|
||||||
|
|
||||||
|
<!-- Description of fee -->
|
||||||
|
<!ELEMENT FEEMSG - o %STRTYPE>
|
||||||
|
|
||||||
|
<!-- Transfer confirmation message -->
|
||||||
|
<!ELEMENT CONFMSG - o %STRTYPE>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
285
src/experimental/ofx/dtd/ofxbill.dtd
Normal file
285
src/experimental/ofx/dtd/ofxbill.dtd
Normal file
@ -0,0 +1,285 @@
|
|||||||
|
<!--
|
||||||
|
$Revision$
|
||||||
|
$Date$
|
||||||
|
|
||||||
|
Open Financial Exchange DTD - Payment module
|
||||||
|
Copyright 1997 CheckFree Corp., Intuit Inc., Microsoft Corp. All rights reserved
|
||||||
|
|
||||||
|
-->
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Message Set Wrappers and Profile -->
|
||||||
|
|
||||||
|
<!ELEMENT BILLPAYMSGSRQV1 - - ((PAYEETRNRQ | PAYEESYNCRQ)*,
|
||||||
|
( PMTTRNRQ | RECPMTTRNRQ | PMTINQTRNRQ | PMTMAILTRNRQ |
|
||||||
|
PMTSYNCRQ | RECPMTSYNCRQ | PMTMAILSYNCRQ)*)>
|
||||||
|
|
||||||
|
<!ELEMENT BILLPAYMSGSRSV1 - - ((PAYEETRNRS | PAYEESYNCRS)*,
|
||||||
|
( PMTTRNRS | RECPMTTRNRS | PMTINQTRNRS | PMTMAILTRNRS |
|
||||||
|
PMTSYNCRS | RECPMTSYNCRS | PMTMAILSYNCRS)*)>
|
||||||
|
|
||||||
|
<!-- -->
|
||||||
|
<!ELEMENT BILLPAYMSGSET - - (BILLPAYMSGSETV1)>
|
||||||
|
|
||||||
|
<!ELEMENT BILLPAYMSGSETV1 - - (MSGSETCORE,
|
||||||
|
DAYSWITH, DFLTDAYSTOPAY,
|
||||||
|
XFERDAYSWITH, XFERDFLTDAYSTOPAY,
|
||||||
|
PROCDAYSOFF*, PROCENDTM,
|
||||||
|
MODELWND, POSTPROCWND, STSVIAMODS,
|
||||||
|
PMTBYADDR, PMTBYXFER, PMTBYPAYEEID,
|
||||||
|
CANADDPAYEE, HASEXTDPMT,
|
||||||
|
CANMODPMTS, CANMODMDLS, DIFFFIRSTPMT,
|
||||||
|
DIFFLASTPMT)>
|
||||||
|
|
||||||
|
<!ELEMENT DAYSWITH - o %INTTYPE> <!-- number of days before the processing date that funds are withdrawn -->
|
||||||
|
<!ELEMENT DFLTDAYSTOPAY - o %INTTYPE> <!-- the default number of days to pay -->
|
||||||
|
<!ELEMENT XFERDAYSWITH - o %INTTYPE> <!-- number of days before the processing date that funds are withdrawn for xfers-->
|
||||||
|
<!ELEMENT XFERDFLTDAYSTOPAY - o %INTTYPE> <!-- the default number of days to pay for transfers-->
|
||||||
|
<!ELEMENT POSTPROCWND - o %INTTYPE> <!-- the number of days after a transaction is processed that it is acessible
|
||||||
|
for status inquiries -->
|
||||||
|
<!ELEMENT STSVIAMODS - o %BOOLTYPE> <!-- server supports communication of server-initiated payment status changes
|
||||||
|
via the PMTMODRS -->
|
||||||
|
<!ELEMENT PMTBYADDR - o %BOOLTYPE> <!-- the payment provider supports payments to payees identified by billing
|
||||||
|
address, i.e. the PAYEE aggregate -->
|
||||||
|
<!ELEMENT PMTBYXFER - o %BOOLTYPE> <!-- can pay by transfers -->
|
||||||
|
<!ELEMENT PMTBYPAYEEID - o %BOOLTYPE> <!-- can pay by user supplied payee IDs -->
|
||||||
|
<!ELEMENT CANADDPAYEE - o %BOOLTYPE> <!-- user can add payees if no, the user is restricted to payees added to the
|
||||||
|
users payee list by the payment system -->
|
||||||
|
<!ELEMENT HASEXTDPMT - o %BOOLTYPE> <!-- supports the EXTDPMT business payment aggregate -->
|
||||||
|
<!ELEMENT CANMODPMTS - o %BOOLTYPE> <!-- permit modifications to payments, i.e. PMTMODRQ -->
|
||||||
|
<!ELEMENT DIFFFIRSTPMT - o %BOOLTYPE> <!-- support for specifying a different amount for the first payment
|
||||||
|
generated by a model -->
|
||||||
|
<!ELEMENT DIFFLASTPMT - o %BOOLTYPE> <!-- support for specifying a different amount for the last payment generated
|
||||||
|
by a model -->
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Transactions -->
|
||||||
|
|
||||||
|
|
||||||
|
<!ELEMENT PMTTRNRQ - - (%TRNRQMACRO, (PMTRQ | PMTMODRQ | PMTCANCRQ))>
|
||||||
|
<!ELEMENT RECPMTTRNRQ - - (%TRNRQMACRO, (RECPMTRQ | RECPMTMODRQ | RECPMTCANCRQ))>
|
||||||
|
<!ELEMENT PAYEETRNRQ - - (%TRNRQMACRO, (PAYEERQ | PAYEEMODRQ | PAYEEDELRQ))>
|
||||||
|
<!ELEMENT PMTINQTRNRQ - - (%TRNRQMACRO, PMTINQRQ)>
|
||||||
|
<!ELEMENT PMTMAILTRNRQ - - (%TRNRQMACRO, PMTMAILRQ)>
|
||||||
|
|
||||||
|
<!ELEMENT PMTTRNRS - - (%TRNRSMACRO, (PMTRS | PMTMODRS | PMTCANCRS)?)>
|
||||||
|
<!ELEMENT RECPMTTRNRS - - (%TRNRSMACRO, (RECPMTRS | RECPMTMODRS | RECPMTCANCRS)?)>
|
||||||
|
<!ELEMENT PAYEETRNRS - - (%TRNRSMACRO, (PAYEERS | PAYEEMODRS | PAYEEDELRS)?)>
|
||||||
|
<!ELEMENT PMTINQTRNRS - - (%TRNRSMACRO, PMTINQRS?)>
|
||||||
|
<!ELEMENT PMTMAILTRNRS - - (%TRNRSMACRO, PMTMAILRS?)>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- ============================================================================= -->
|
||||||
|
<!-- Requests -->
|
||||||
|
<!-- ============================================================================= -->
|
||||||
|
|
||||||
|
<!-- payment request -->
|
||||||
|
<!ELEMENT PMTRQ - - (PMTINFO)>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- modification request -->
|
||||||
|
<!ELEMENT PMTMODRQ - - (SRVRTID, PMTINFO)>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- modification request -->
|
||||||
|
<!ELEMENT PMTCANCRQ - - (SRVRTID)>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- recurring payment request -->
|
||||||
|
<!ELEMENT RECPMTRQ - - (RECURRINST, PMTINFO, INITIALAMT?, FINALAMT?)>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- modification request -->
|
||||||
|
<!ELEMENT RECPMTMODRQ - - (RECSRVRTID, RECURRINST, PMTINFO, INITIALAMT?, FINALAMT?, MODPENDING)>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- cancellation request -->
|
||||||
|
<!ELEMENT RECPMTCANCRQ - - (RECSRVRTID, CANPENDING)>
|
||||||
|
|
||||||
|
<!-- payment status inquiry request -->
|
||||||
|
<!ELEMENT PMTINQRQ - - (SRVRTID)>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- payee request : add a payee to the payee list -->
|
||||||
|
<!ELEMENT PAYEERQ - - ((PAYEEID | (PAYEE , BANKACCTTO?)), PAYACCT*)>
|
||||||
|
|
||||||
|
<!-- payee modification request -->
|
||||||
|
<!ELEMENT PAYEEMODRQ - - (PAYEELSTID, (PAYEE , BANKACCTTO?)?, PAYACCT*)>
|
||||||
|
|
||||||
|
<!-- payee deletion request -->
|
||||||
|
<!ELEMENT PAYEEDELRQ - - (PAYEELSTID)>
|
||||||
|
|
||||||
|
<!-- ============================================================================= -->
|
||||||
|
<!-- Responses -->
|
||||||
|
<!-- ============================================================================= -->
|
||||||
|
|
||||||
|
<!-- payment response -->
|
||||||
|
<!ELEMENT PMTRS - - (SRVRTID, PAYEELSTID, CURDEF, PMTINFO, EXTDPAYEE?,
|
||||||
|
CHECKNUM?, PMTPRCSTS, RECSRVRTID?)>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- payment modification response -->
|
||||||
|
<!ELEMENT PMTMODRS - - (SRVRTID, PMTINFO, PMTPRCSTS?)>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- payment modification response -->
|
||||||
|
<!ELEMENT PMTCANCRS - - (SRVRTID)>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- recurring payment response -->
|
||||||
|
<!ELEMENT RECPMTRS - - (RECSRVRTID, PAYEELSTID, CURDEF, RECURRINST, PMTINFO, INITIALAMT?, FINALAMT?, EXTDPAYEE?)>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- modification response -->
|
||||||
|
<!ELEMENT RECPMTMODRS - - (RECSRVRTID, RECURRINST, PMTINFO, INITIALAMT?, FINALAMT?, MODPENDING)>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- recurring payment modification response -->
|
||||||
|
<!ELEMENT RECPMTCANCRS - - (RECSRVRTID, CANPENDING)>
|
||||||
|
|
||||||
|
<!-- payment status inquiry response -->
|
||||||
|
<!ELEMENT PMTINQRS - - (SRVRTID, PMTPRCSTS, CHECKNUM?)>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- payee response : add a payee to the payee list -->
|
||||||
|
<!ELEMENT PAYEERS - - (PAYEELSTID, (PAYEE , BANKACCTTO?)?, EXTDPAYEE?, PAYACCT*)>
|
||||||
|
|
||||||
|
<!-- payee modification response -->
|
||||||
|
<!ELEMENT PAYEEMODRS - - (PAYEELSTID, (PAYEE , BANKACCTTO?)?, PAYACCT*, EXTDPAYEE?)>
|
||||||
|
|
||||||
|
<!-- payee deletion response -->
|
||||||
|
<!ELEMENT PAYEEDELRS - - (PAYEELSTID)>
|
||||||
|
|
||||||
|
<!-- ============================================================================= -->
|
||||||
|
<!-- Aggregates -->
|
||||||
|
<!-- ============================================================================= -->
|
||||||
|
|
||||||
|
|
||||||
|
<!-- BPACCTINFO -->
|
||||||
|
<!ELEMENT BPACCTINFO - - (BANKACCTFROM, SVCSTATUS)>
|
||||||
|
|
||||||
|
<!-- Payment information aggregate, see section 6.2.1.1 -->
|
||||||
|
<!ELEMENT PMTINFO - - (BANKACCTFROM, TRNAMT,
|
||||||
|
(PAYEEID|PAYEE), PAYEELSTID?, BANKACCTTO?,
|
||||||
|
EXTDPMT*, PAYACCT,
|
||||||
|
DTDUE, MEMO?, BILLREFINFO?)>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Payment processing status -->
|
||||||
|
<!ELEMENT PMTPRCSTS - - (PMTPRCCODE, DTPMTPRC)>
|
||||||
|
|
||||||
|
<!-- Payment processing date; enum for processing date interpretation -->
|
||||||
|
<!ELEMENT PMTPRCCODE - o %STRTYPE>
|
||||||
|
|
||||||
|
<!-- Payment processing date; Interpretation depends on <PMTPRCCODE> -->
|
||||||
|
<!ELEMENT DTPMTPRC - o %DTTMTYPE>
|
||||||
|
|
||||||
|
<!-- billing reference info -->
|
||||||
|
<!ELEMENT BILLREFINFO - o %STRTYPE>
|
||||||
|
|
||||||
|
<!-- Extended Payment aggregate -->
|
||||||
|
<!-- Either extdpmtdsc or extdpmtinv, or both, but at least one required -->
|
||||||
|
<!ELEMENT EXTDPMT - - (EXTDPMTFOR?, EXTDPMTCHK?,
|
||||||
|
((EXTDPMTDSC, EXTDPMTINV?) |
|
||||||
|
(EXTDPMTINV)))>
|
||||||
|
<!ELEMENT EXTDPMTINV - - (INVOICE+)>
|
||||||
|
<!ELEMENT INVOICE - - (INVNO, INVTOTALAMT, INVPAIDAMT,
|
||||||
|
INVDATE, INVDESC, DISCOUNT?,
|
||||||
|
ADJUSTMENT?, LINEITEM*)>
|
||||||
|
<!ELEMENT DISCOUNT - - (DSCRATE, DSCAMT, DSCDATE?, DSCDESC)>
|
||||||
|
<!ELEMENT ADJUSTMENT - - (ADJNO?, ADJDESC, ADJAMT, ADJDATE?)>
|
||||||
|
<!ELEMENT LINEITEM - - (LITMAMT, LITMDESC)>
|
||||||
|
|
||||||
|
<!ELEMENT EXTDPMTFOR - o %STRTYPE>
|
||||||
|
<!ELEMENT EXTDPMTCHK - o %INTTYPE>
|
||||||
|
<!ELEMENT EXTDPMTDSC - - %STRTYPE>
|
||||||
|
<!ELEMENT INVNO - o %STRTYPE>
|
||||||
|
<!ELEMENT INVTOTALAMT - o %AMTTYPE>
|
||||||
|
<!ELEMENT INVPAIDAMT - o %AMTTYPE>
|
||||||
|
<!ELEMENT INVDATE - o %DTTMTYPE>
|
||||||
|
<!ELEMENT INVDESC - o %STRTYPE>
|
||||||
|
<!ELEMENT DSCRATE - o %RATETYPE>
|
||||||
|
<!ELEMENT DSCAMT - o %AMTTYPE>
|
||||||
|
<!ELEMENT DSCDATE - o %DTTMTYPE>
|
||||||
|
<!ELEMENT DSCDESC - o %STRTYPE>
|
||||||
|
<!ELEMENT ADJNO - o %STRTYPE>
|
||||||
|
<!ELEMENT ADJDESC - o %STRTYPE>
|
||||||
|
<!ELEMENT ADJAMT - o %AMTTYPE>
|
||||||
|
<!ELEMENT ADJDATE - o %DTTMTYPE>
|
||||||
|
<!ELEMENT LITMAMT - o %AMTTYPE>
|
||||||
|
<!ELEMENT LITMDESC - o %STRTYPE>
|
||||||
|
|
||||||
|
<!-- Initial Amount -->
|
||||||
|
<!ELEMENT INITIALAMT - o %AMTTYPE>
|
||||||
|
|
||||||
|
<!-- Final Amount -->
|
||||||
|
<!ELEMENT FINALAMT - o %AMTTYPE>
|
||||||
|
|
||||||
|
<!-- standard payee -->
|
||||||
|
<!ELEMENT EXTDPAYEE - - ( (PAYEEID, IDSCOPE, NAME)?, DAYSTOPAY)>
|
||||||
|
|
||||||
|
<!-- Server-assigned standard payee ID -->
|
||||||
|
<!ELEMENT PAYEEID - o %SRVRIDTYPE>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Payee ID scope enumeration ; currently one of {GLOBAL,USER} -->
|
||||||
|
<!ELEMENT IDSCOPE - o %STRTYPE>
|
||||||
|
|
||||||
|
<!-- Minimum number of days needed to process -->
|
||||||
|
<!ELEMENT DAYSTOPAY - o %INTTYPE>
|
||||||
|
|
||||||
|
<!-- Check number -->
|
||||||
|
<!ELEMENT CHECKNUM - o %IDTYPE>
|
||||||
|
|
||||||
|
<!-- Payee aggregate -->
|
||||||
|
<!ELEMENT PAYEE - - (NAME, ADDR1, ADDR2?, ADDR3?, CITY, STATE, POSTALCODE, COUNTRY?, PHONE)>
|
||||||
|
|
||||||
|
<!-- Server-assigned payee list ID -->
|
||||||
|
<!ELEMENT PAYEELSTID - o %SRVRIDTYPE>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
synchronization request messages
|
||||||
|
-->
|
||||||
|
|
||||||
|
<!-- payment synchronization request -->
|
||||||
|
<!ELEMENT PMTSYNCRQ - - (%SYNCRQMACRO, BANKACCTFROM, PMTTRNRQ*)>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- recurring payment synchronization request -->
|
||||||
|
<!ELEMENT RECPMTSYNCRQ - - (%SYNCRQMACRO, BANKACCTFROM, RECPMTTRNRQ*)>
|
||||||
|
|
||||||
|
<!-- payee list synchronization request -->
|
||||||
|
<!ELEMENT PAYEESYNCRQ - - (%SYNCRQMACRO, PAYEETRNRQ*)>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- bill pay mail sync request -->
|
||||||
|
<!ELEMENT PMTMAILSYNCRQ - - (%SYNCRQMACRO, INCIMAGES, USEHTML, PMTMAILTRNRQ*)>
|
||||||
|
|
||||||
|
|
||||||
|
<!--
|
||||||
|
synchronization response messages
|
||||||
|
-->
|
||||||
|
|
||||||
|
<!-- payment synchronization response -->
|
||||||
|
<!ELEMENT PMTSYNCRS - - (%SYNCRSMACRO, BANKACCTFROM, PMTTRNRS*)>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- recurring payment synchronization response -->
|
||||||
|
<!ELEMENT RECPMTSYNCRS - - (%SYNCRSMACRO, BANKACCTFROM, RECPMTTRNRS*)>
|
||||||
|
|
||||||
|
<!-- payee list synchronization response -->
|
||||||
|
<!ELEMENT PAYEESYNCRS - - (%SYNCRSMACRO, PAYEETRNRS*)>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- bill pay mail sync response -->
|
||||||
|
<!ELEMENT PMTMAILSYNCRS - - (%SYNCRSMACRO, PMTMAILTRNRS*)>
|
||||||
|
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Payment mail messages
|
||||||
|
-->
|
||||||
|
|
||||||
|
<!-- payment inquiry mail message -->
|
||||||
|
<!ELEMENT PMTMAILRQ - - (MAIL,(SRVRTID,PMTINFO)?)>
|
||||||
|
|
||||||
|
<!ELEMENT PMTMAILRS - - (MAIL,(SRVRTID,PMTINFO)?)>
|
556
src/experimental/ofx/dtd/ofxinv.dtd
Normal file
556
src/experimental/ofx/dtd/ofxinv.dtd
Normal file
@ -0,0 +1,556 @@
|
|||||||
|
<!--
|
||||||
|
$Revision$
|
||||||
|
$Date$
|
||||||
|
|
||||||
|
Open Financial Exchange DTD - investments module
|
||||||
|
Copyright 1997 CheckFree Corp., Intuit Inc., Microsoft Corp. All rights reserved
|
||||||
|
|
||||||
|
-->
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Investment Statement Messages -->
|
||||||
|
<!ELEMENT INVSTMTMSGSRQV1 - - ((INVSTMTTRNRQ |
|
||||||
|
INVMAILTRNRQ | INVMAILSYNCRQ)+) >
|
||||||
|
|
||||||
|
<!ELEMENT INVSTMTMSGSRSV1 - - ((INVSTMTTRNRS |
|
||||||
|
INVMAILTRNRS | INVMAILSYNCRS)+) >
|
||||||
|
|
||||||
|
<!-- Security List Messages -->
|
||||||
|
<!ELEMENT SECLISTMSGSRQV1 - - (SECLISTTRNRQ+) >
|
||||||
|
|
||||||
|
<!ELEMENT SECLISTMSGSRSV1 - - (SECLISTTRNRS* , SECLIST?) >
|
||||||
|
|
||||||
|
<!-- **** SECURITIES *** -->
|
||||||
|
|
||||||
|
<!-- Security List Transaction Request/Response -->
|
||||||
|
<!ELEMENT SECLISTTRNRQ - - (%TRNRQMACRO , SECLISTRQ) >
|
||||||
|
|
||||||
|
<!ELEMENT SECLISTTRNRS - - (%TRNRSMACRO , SECLISTRS?) >
|
||||||
|
|
||||||
|
<!-- Security List Request/Response -->
|
||||||
|
<!ELEMENT SECLISTRQ - - (SECRQ+)>
|
||||||
|
|
||||||
|
<!ELEMENT SECRQ - - (SECID | TICKER | FIID) >
|
||||||
|
|
||||||
|
<!ELEMENT SECLISTRS - - %STRTYPE >
|
||||||
|
|
||||||
|
<!-- Security Ticker Symbol -->
|
||||||
|
<!ELEMENT TICKER - O %STRTYPE >
|
||||||
|
|
||||||
|
<!-- Financial Institution ID for the Security -->
|
||||||
|
<!ELEMENT FIID - O %STRTYPE >
|
||||||
|
|
||||||
|
<!-- ** Security Identifier ** -->
|
||||||
|
<!ELEMENT SECID - - (UNIQUEID , UNIQUEIDTYPE) >
|
||||||
|
|
||||||
|
<!-- Unique ID for the Security -->
|
||||||
|
<!ELEMENT UNIQUEID - O %STRTYPE >
|
||||||
|
|
||||||
|
<!-- Standard used for Unique ID e.g. CUSIP -->
|
||||||
|
<!ELEMENT UNIQUEIDTYPE - O %STRTYPE >
|
||||||
|
|
||||||
|
<!-- *** Security Information *** -->
|
||||||
|
|
||||||
|
<!-- Security List -->
|
||||||
|
<!ELEMENT SECLIST - - ((MFINFO | STOCKINFO | OPTINFO | DEBTINFO |
|
||||||
|
OTHERINFO)*) >
|
||||||
|
|
||||||
|
<!-- ** Info all security types have in common ** -->
|
||||||
|
<!ELEMENT SECINFO - - (SECID , SECNAME , TICKER? , FIID? ,
|
||||||
|
RATING? , UNITPRICE? , DTASOF? ,
|
||||||
|
CURRENCY? , MEMO?) >
|
||||||
|
|
||||||
|
<!ELEMENT SECNAME - O %STRTYPE>
|
||||||
|
|
||||||
|
<!-- Rating for Security -->
|
||||||
|
<!ELEMENT RATING - O %STRTYPE >
|
||||||
|
|
||||||
|
<!-- Unitprice for Security -->
|
||||||
|
<!ELEMENT UNITPRICE - O %UNITPRICETYPE >
|
||||||
|
|
||||||
|
<!-- *** Debt Information *** -->
|
||||||
|
<!ELEMENT DEBTINFO - - (SECINFO , PARVALUE , DEBTTYPE , DEBTCLASS? ,
|
||||||
|
COUPONRT? , DTCOUPON? , COUPONFREQ? , CALLPRICE? ,
|
||||||
|
YIELDTOCALL? , DTCALL? , CALLTYPE? , YIELDTOMAT? ,
|
||||||
|
DTMAT? , ASSETCLASS? , FIASSETCLASS?) >
|
||||||
|
|
||||||
|
<!ELEMENT PARVALUE - O %AMTTYPE >
|
||||||
|
|
||||||
|
<!ELEMENT DEBTTYPE - O %STRTYPE >
|
||||||
|
|
||||||
|
<!ELEMENT DEBTCLASS - O %STRTYPE >
|
||||||
|
|
||||||
|
<!ELEMENT COUPONRT - O %AMTTYPE >
|
||||||
|
|
||||||
|
<!ELEMENT DTCOUPON - O %DTTMTYPE >
|
||||||
|
|
||||||
|
<!ELEMENT COUPONFREQ - O %STRTYPE >
|
||||||
|
|
||||||
|
<!ELEMENT CALLPRICE - O %UNITPRICETYPE >
|
||||||
|
|
||||||
|
<!ELEMENT YIELDTOCALL - O %AMTTYPE >
|
||||||
|
|
||||||
|
<!ELEMENT DTCALL - O %DTTMTYPE >
|
||||||
|
|
||||||
|
<!ELEMENT CALLTYPE - O %STRTYPE >
|
||||||
|
|
||||||
|
<!ELEMENT YIELDTOMAT - O %AMTTYPE >
|
||||||
|
|
||||||
|
<!ELEMENT DTMAT - O %DTTMTYPE >
|
||||||
|
|
||||||
|
<!-- Asset Class for Security -->
|
||||||
|
<!ELEMENT ASSETCLASS - O %STRTYPE >
|
||||||
|
|
||||||
|
<!-- FI's Asset Class for Security -->
|
||||||
|
<!ELEMENT FIASSETCLASS - O %STRTYPE >
|
||||||
|
|
||||||
|
<!-- *** Mutual Fund Information *** -->
|
||||||
|
<!ELEMENT MFINFO - - (SECINFO , MFTYPE? , YIELD? , DTYIELDASOF? ,
|
||||||
|
MFASSETCLASS? , FIMFASSETCLASS?) >
|
||||||
|
|
||||||
|
<!ELEMENT MFTYPE - O %STRTYPE >
|
||||||
|
|
||||||
|
<!ELEMENT YIELD - O %AMTTYPE >
|
||||||
|
|
||||||
|
<!ELEMENT DTYIELDASOF - O %DTTMTYPE >
|
||||||
|
|
||||||
|
<!-- Asset Class for Mutual Funds -->
|
||||||
|
<!ELEMENT MFASSETCLASS - - (PORTION+) >
|
||||||
|
|
||||||
|
<!-- Asset Class Portion -->
|
||||||
|
<!ELEMENT PORTION - - (ASSETCLASS , PERCENT) >
|
||||||
|
|
||||||
|
<!ELEMENT PERCENT - O %AMTTYPE >
|
||||||
|
|
||||||
|
<!-- FI's Asset Class for Mutual Funds -->
|
||||||
|
<!ELEMENT FIMFASSETCLASS - - (FIPORTION+) >
|
||||||
|
|
||||||
|
<!-- FI's Asset Class Portion -->
|
||||||
|
<!ELEMENT FIPORTION - - (FIASSETCLASS , PERCENT) >
|
||||||
|
|
||||||
|
<!-- *** Option Information *** -->
|
||||||
|
<!ELEMENT OPTINFO - - (SECINFO , OPTTYPE , STRIKEPRICE , DTEXPIRE ,
|
||||||
|
SHPERCTRCT , SECID? , ASSETCLASS? , FIASSETCLASS?) >
|
||||||
|
|
||||||
|
<!ELEMENT OPTTYPE - O %STRTYPE >
|
||||||
|
|
||||||
|
<!ELEMENT STRIKEPRICE - O %AMTTYPE >
|
||||||
|
|
||||||
|
<!-- Number of shares per contract -->
|
||||||
|
<!ELEMENT SHPERCTRCT - O %INTTYPE >
|
||||||
|
|
||||||
|
<!-- *** Other Security Type Information *** -->
|
||||||
|
<!ELEMENT OTHERINFO - - (SECINFO , TYPEDESC?, ASSETCLASS? , FIASSETCLASS?) >
|
||||||
|
|
||||||
|
<!ELEMENT TYPEDESC - O %STRTYPE >
|
||||||
|
|
||||||
|
|
||||||
|
<!-- *** Stock Information *** -->
|
||||||
|
<!ELEMENT STOCKINFO - - (SECINFO , STOCKTYPE? , YIELD? , DTYIELDASOF? ,
|
||||||
|
ASSETCLASS? , FIASSETCLASS?) >
|
||||||
|
|
||||||
|
<!ELEMENT STOCKTYPE - O %STRTYPE >
|
||||||
|
|
||||||
|
|
||||||
|
<!-- ***** Investment Accounts ****** -->
|
||||||
|
|
||||||
|
<!-- Investment Account From -->
|
||||||
|
<!ELEMENT INVACCTFROM - - (BROKERID , ACCTID) >
|
||||||
|
|
||||||
|
<!-- Investment Account To -->
|
||||||
|
<!ELEMENT INVACCTTO - - (BROKERID , ACCTID) >
|
||||||
|
|
||||||
|
<!ELEMENT BROKERID - O %STRTYPE >
|
||||||
|
|
||||||
|
<!-- ** Investment Account Information ** -->
|
||||||
|
<!ELEMENT INVACCTINFO - - (INVACCTFROM , USPRODUCTTYPE , CHECKING ,
|
||||||
|
SVCSTATUS, INVACCTTYPE? , OPTIONLEVEL?) >
|
||||||
|
|
||||||
|
<!ELEMENT USPRODUCTTYPE - O %STRTYPE >
|
||||||
|
|
||||||
|
<!ELEMENT CHECKING - O %BOOLTYPE >
|
||||||
|
|
||||||
|
<!ELEMENT INVACCTTYPE - O %STRTYPE >
|
||||||
|
|
||||||
|
<!ELEMENT OPTIONLEVEL - O %STRTYPE >
|
||||||
|
|
||||||
|
|
||||||
|
<!-- ****** INVESTMENT STATEMENT DOWNLOAD ****** -->
|
||||||
|
|
||||||
|
<!-- Investment Statement Transaction Request/Response -->
|
||||||
|
<!ELEMENT INVSTMTTRNRQ - - (%TRNRQMACRO , INVSTMTRQ) >
|
||||||
|
|
||||||
|
<!ELEMENT INVSTMTTRNRS - - (%TRNRSMACRO , INVSTMTRS?) >
|
||||||
|
|
||||||
|
<!-- *** Investment Statement Request *** -->
|
||||||
|
<!ELEMENT INVSTMTRQ - - (INVACCTFROM , INCTRAN , INCOO , INCPOS ,
|
||||||
|
INCBAL) >
|
||||||
|
|
||||||
|
<!-- ** Include Transactions ** -->
|
||||||
|
<!ELEMENT INCTRAN - - (DTSTART? , DTEND? , INCLUDE) >
|
||||||
|
|
||||||
|
<!-- ** Include Open Orders ** -->
|
||||||
|
<!ELEMENT INCOO - O %BOOLTYPE >
|
||||||
|
|
||||||
|
<!-- ** Include Positions ** -->
|
||||||
|
<!ELEMENT INCPOS - - (DTASOF? , INCLUDE) >
|
||||||
|
|
||||||
|
<!-- Include Balances -->
|
||||||
|
<!ELEMENT INCBAL - O %BOOLTYPE >
|
||||||
|
|
||||||
|
|
||||||
|
<!-- *** Investment Statement Response *** -->
|
||||||
|
<!ELEMENT INVSTMTRS - - (DTASOF , CURDEF , INVACCTFROM , INVTRANLIST? ,
|
||||||
|
INVPOSLIST? , INVBAL? , INVOOLIST? , MKTGINFO?) >
|
||||||
|
|
||||||
|
<!-- Marketing Mesage -->
|
||||||
|
<!ELEMENT MKTVAL - O %AMTTYPE >
|
||||||
|
|
||||||
|
<!-- ** Transaction List ** -->
|
||||||
|
<!ELEMENT INVTRANLIST - - (DTSTART , DTEND , (BUYDEBT | BUYMF | BUYOPT | BUYOTHER |
|
||||||
|
BUYSTOCK | CLOSUREOPT | INCOME | INVEXPENSE | JRNLFUND |
|
||||||
|
JRNLSEC | MARGININTEREST | REINVEST | RETOFCAP| SELLDEBT |
|
||||||
|
SELLMF | SELLOPT | SELLOTHER | SELLSTOCK |
|
||||||
|
SPLIT | TRANSFER)* , INVBANKTRAN*) >
|
||||||
|
|
||||||
|
<!-- ** Investment Banking Transaction ** -->
|
||||||
|
<!ELEMENT INVBANKTRAN - - (STMTTRN , SUBACCTFUND) >
|
||||||
|
|
||||||
|
<!-- ** Transaction fields common to many types of transactions ** -->
|
||||||
|
<!ELEMENT INVTRAN - - (FITID , SRVRTID? , DTTRADE , DTSETTLE? , MEMO?) >
|
||||||
|
|
||||||
|
<!-- Trade Date -->
|
||||||
|
<!ELEMENT DTTRADE - O %DTTMTYPE >
|
||||||
|
|
||||||
|
<!-- Settlement Date -->
|
||||||
|
<!ELEMENT DTSETTLE - O %DTTMTYPE >
|
||||||
|
|
||||||
|
<!-- ** Transaction fields common to BUY types of transactions ** -->
|
||||||
|
<!ELEMENT INVBUY - - (INVTRAN , SECID , UNITS , UNITPRICE , MARKUP? ,
|
||||||
|
COMMISSION? , TAXES? , FEES? , LOAD? , TOTAL , CURRENCY? ,
|
||||||
|
ORIGCURRENCY? , SUBACCTSEC , SUBACCTFUND) >
|
||||||
|
|
||||||
|
<!ELEMENT UNITS - O %AMTTYPE >
|
||||||
|
|
||||||
|
<!ELEMENT MARKUP - O %AMTTYPE >
|
||||||
|
|
||||||
|
<!ELEMENT COMMISSION - O %AMTTYPE >
|
||||||
|
|
||||||
|
<!ELEMENT TAXES - O %AMTTYPE >
|
||||||
|
|
||||||
|
<!ELEMENT FEES - O %AMTTYPE >
|
||||||
|
|
||||||
|
<!ELEMENT LOAD - O %AMTTYPE >
|
||||||
|
|
||||||
|
<!ELEMENT TOTAL - O %AMTTYPE >
|
||||||
|
|
||||||
|
<!-- Sub-account for the security -->
|
||||||
|
<!ELEMENT SUBACCTSEC - O %STRTYPE >
|
||||||
|
|
||||||
|
<!-- Sub-account for the funds involved in the trade: CASH, SHORT, MARGIN, OTHER -->
|
||||||
|
<!ELEMENT SUBACCTFUND - O %STRTYPE >
|
||||||
|
|
||||||
|
<!-- ** Transaction fields common to SELL types of transactions ** -->
|
||||||
|
<!ELEMENT INVSELL - - (INVTRAN , SECID , UNITS , UNITPRICE , MARKDOWN? ,
|
||||||
|
COMMISSION? , TAXES? , FEES? , LOAD? , WITHHOLDING? ,
|
||||||
|
TAXEXEMPT? , TOTAL , GAIN? , CURRENCY? , ORIGCURRENCY? ,
|
||||||
|
SUBACCTSEC , SUBACCTFUND) >
|
||||||
|
|
||||||
|
<!ELEMENT MARKDOWN - O %AMTTYPE >
|
||||||
|
|
||||||
|
<!ELEMENT WITHHOLDING - O %AMTTYPE >
|
||||||
|
|
||||||
|
<!ELEMENT GAIN - O %AMTTYPE >
|
||||||
|
|
||||||
|
<!-- ** Buy Debt Transaction ** -->
|
||||||
|
<!ELEMENT BUYDEBT - - (INVBUY , ACCRDINT?) >
|
||||||
|
|
||||||
|
<!ELEMENT ACCRDINT - O %AMTTYPE >
|
||||||
|
|
||||||
|
<!-- ** Buy Mutual Fund Transaction ** -->
|
||||||
|
<!ELEMENT BUYMF - - (INVBUY , BUYTYPE , RELFITID?) >
|
||||||
|
|
||||||
|
<!-- Buy Type: BUY or BUYTOCOVER -->
|
||||||
|
<!ELEMENT BUYTYPE - O %STRTYPE >
|
||||||
|
|
||||||
|
<!-- Related Transaction ID -->
|
||||||
|
<!ELEMENT RELFITID - O %UUIDTYPE >
|
||||||
|
|
||||||
|
<!-- ** Buy Option Transaction ** -->
|
||||||
|
<!ELEMENT BUYOPT - - (INVBUY , OPTBUYTYPE , SHPERCTRCT) >
|
||||||
|
|
||||||
|
<!-- Option Buy Type -->
|
||||||
|
<!ELEMENT OPTBUYTYPE - O %STRTYPE >
|
||||||
|
|
||||||
|
<!-- ** Buy Other Transaction ** -->
|
||||||
|
<!ELEMENT BUYOTHER - - (INVBUY) >
|
||||||
|
|
||||||
|
<!-- ** Buy Stock Transaction ** -->
|
||||||
|
<!ELEMENT BUYSTOCK - - (INVBUY , BUYTYPE) >
|
||||||
|
|
||||||
|
<!-- ** Closure of Option Transaction ** -->
|
||||||
|
<!ELEMENT CLOSUREOPT - - (INVTRAN , SECID , OPTACTION , UNITS , SHPERCTRCT ,
|
||||||
|
SUBACCTSEC , RELFITID? , GAIN?) >
|
||||||
|
|
||||||
|
<!-- Closure of option action: EXPIRE,EXERCISE,ASSIGN -->
|
||||||
|
<!ELEMENT OPTACTION - O %STRTYPE >
|
||||||
|
|
||||||
|
<!-- **Income Transaction ** -->
|
||||||
|
<!ELEMENT INCOME - - (INVTRAN , SECID , INCOMETYPE , TOTAL , SUBACCTSEC ,
|
||||||
|
SUBACCTFUND , TAXEXEMPT? , WITHHOLDING? ,CURRENCY? ,
|
||||||
|
ORIGCURRENCY? ) >
|
||||||
|
|
||||||
|
<!-- Type of Income -->
|
||||||
|
<!ELEMENT INCOMETYPE - O %STRTYPE >
|
||||||
|
|
||||||
|
<!ELEMENT TAXEXEMPT - O %BOOLTYPE >
|
||||||
|
|
||||||
|
<!-- ** Investment Related Expense Transaction ** -->
|
||||||
|
<!ELEMENT INVEXPENSE - - (INVTRAN , SECID , TOTAL , SUBACCTSEC ,
|
||||||
|
SUBACCTFUND , CURRENCY? , ORIGCURRENCY?) >
|
||||||
|
|
||||||
|
<!-- ** Journaling of Funds between sub-accounts Transaction ** -->
|
||||||
|
<!ELEMENT JRNLFUND - - (INVTRAN , SUBACCTTO , SUBACCTFROM , TOTAL) >
|
||||||
|
|
||||||
|
<!ELEMENT SUBACCTTO - O %STRTYPE >
|
||||||
|
|
||||||
|
<!ELEMENT SUBACCTFROM - O %STRTYPE >
|
||||||
|
|
||||||
|
<!-- ** Journaling of Security between sub-accounts Transaction ** -->
|
||||||
|
<!ELEMENT JRNLSEC - - (INVTRAN , SECID, SUBACCTTO , SUBACCTFROM , UNITS) >
|
||||||
|
|
||||||
|
<!-- ** Margin Interest Transaction ** -->
|
||||||
|
<!ELEMENT MARGININTEREST - - (INVTRAN , TOTAL , SUBACCTFUND , CURRENCY? ,
|
||||||
|
ORIGCURRENCY?) >
|
||||||
|
|
||||||
|
<!-- ** Reinvest Transaction ** -->
|
||||||
|
<!ELEMENT REINVEST - - (INVTRAN , SECID , INCOMETYPE , TOTAL , SUBACCTSEC ,
|
||||||
|
UNITS , UNITPRICE , COMMISSION? , TAXES? , FEES? , LOAD? ,
|
||||||
|
TAXEXEMPT? , CURRENCY? , ORIGCURRENCY?) >
|
||||||
|
|
||||||
|
<!-- ** Return Of Capital Transaction ** -->
|
||||||
|
<!ELEMENT RETOFCAP - - (INVTRAN , SECID , TOTAL , SUBACCTSEC ,
|
||||||
|
SUBACCTFUND , CURRENCY? , ORIGCURRENCY?) >
|
||||||
|
|
||||||
|
<!-- ** Sell Debt Transaction ** -->
|
||||||
|
<!ELEMENT SELLDEBT - - (INVSELL , SELLREASON , ACCRDINT?) >
|
||||||
|
|
||||||
|
<!-- Reason Sell of Debt generated: CALL, MATURITY, SELL -->
|
||||||
|
<!ELEMENT SELLREASON - O %STRTYPE >
|
||||||
|
|
||||||
|
<!-- ** Sell Mutual Fund Transaction ** -->
|
||||||
|
<!ELEMENT SELLMF - - (INVSELL , SELLTYPE , AVGCOSTBASIS? , RELFITID?) >
|
||||||
|
|
||||||
|
<!-- Sell Type: SELL or SELLSHORT -->
|
||||||
|
<!ELEMENT SELLTYPE - O %STRTYPE >
|
||||||
|
|
||||||
|
<!-- Average cost basis -->
|
||||||
|
<!ELEMENT AVGCOSTBASIS - O %AMTTYPE >
|
||||||
|
|
||||||
|
<!-- ** Sell Option Transaction ** -->
|
||||||
|
<!ELEMENT SELLOPT - - (INVSELL , OPTSELLTYPE , SHPERCTRCT ,
|
||||||
|
RELFITID? , RELTYPE?, SECURED?) >
|
||||||
|
|
||||||
|
<!-- Option Sell Type: SELLTOCLOSE or SELLTOOPEN -->
|
||||||
|
<!ELEMENT OPTSELLTYPE - O %STRTYPE >
|
||||||
|
|
||||||
|
<!-- Related option transaction type: SPREAD, STRADDLE, NONE -->
|
||||||
|
<!ELEMENT RELTYPE - O %STRTYPE >
|
||||||
|
|
||||||
|
<!-- How the option is secured: NAKED or COVERED -->
|
||||||
|
<!ELEMENT SECURED - O %STRTYPE >
|
||||||
|
|
||||||
|
<!-- ** Sell Other Transaction ** -->
|
||||||
|
<!ELEMENT SELLOTHER - - (INVSELL) >
|
||||||
|
|
||||||
|
<!-- ** Sell Stock Transaction ** -->
|
||||||
|
<!ELEMENT SELLSTOCK - - (INVSELL , SELLTYPE) >
|
||||||
|
|
||||||
|
<!-- ** Split Transaction ** -->
|
||||||
|
<!ELEMENT SPLIT - - (INVTRAN , SECID , SUBACCTSEC ,
|
||||||
|
OLDUNITS , NEWUNITS , NUMERATOR , DENOMINATOR ,
|
||||||
|
CURRENCY? , ORIGCURRENCY? , FRACCASH? , SUBACCTFUND?) >
|
||||||
|
|
||||||
|
<!ELEMENT OLDUNITS - O %INTTYPE >
|
||||||
|
|
||||||
|
<!ELEMENT NEWUNITS - O %INTTYPE >
|
||||||
|
|
||||||
|
<!ELEMENT NUMERATOR - O %INTTYPE >
|
||||||
|
|
||||||
|
<!ELEMENT DENOMINATOR - O %INTTYPE >
|
||||||
|
|
||||||
|
<!-- Amount of cash recieved from fractional shares -->
|
||||||
|
<!ELEMENT FRACCASH - O %AMTTYPE >
|
||||||
|
|
||||||
|
<!-- ** Transfer Transaction ** -->
|
||||||
|
<!ELEMENT TRANSFER - - (INVTRAN, SECID , SUBACCTSEC , UNITS ,
|
||||||
|
TFERACTION , POSTYPE , INVACCTFROM?,
|
||||||
|
AVGCOSTBASIS?, UNITPRICE?, DTPURCHASE?) >
|
||||||
|
<!-- Transfer action:IN or OUT -->
|
||||||
|
<!ELEMENT TFERACTION - O %STRTYPE >
|
||||||
|
|
||||||
|
<!ELEMENT DTPURCHASE - o %DTTMTYPE>
|
||||||
|
|
||||||
|
<!-- ***** Open Orders List ***** -->
|
||||||
|
<!ELEMENT INVOOLIST - - ((OOBUYDEBT | OOBUYMF | OOBUYOPT | OOBUYOTHER |
|
||||||
|
OOBUYSTOCK | OOSELLDEBT | OOSELLMF | OOSELLOPT |
|
||||||
|
OOSELLOTHER | OOSELLSTOCK | OOSWITCHMF)*) >
|
||||||
|
|
||||||
|
<!-- ** Open Order fields common to all open orders ** -->
|
||||||
|
<!ELEMENT OO - - (FITID , SRVRTID? , SECID , DTPLACED , UNITS , SUBACCT ,
|
||||||
|
DURATION , RESTRICTION , MINUNITS? , LIMITPRICE? ,
|
||||||
|
STOPPRICE? , MEMO? , CURRENCY?) >
|
||||||
|
|
||||||
|
<!ELEMENT DTPLACED - O %DTTMTYPE >
|
||||||
|
|
||||||
|
<!ELEMENT SUBACCT - O %STRTYPE >
|
||||||
|
|
||||||
|
<!ELEMENT DURATION - O %STRTYPE >
|
||||||
|
|
||||||
|
<!ELEMENT RESTRICTION - O %STRTYPE >
|
||||||
|
|
||||||
|
<!ELEMENT MINUNITS - O %AMTTYPE >
|
||||||
|
|
||||||
|
<!ELEMENT LIMITPRICE - O %UNITPRICETYPE >
|
||||||
|
|
||||||
|
<!ELEMENT STOPPRICE - O %UNITPRICETYPE >
|
||||||
|
|
||||||
|
<!-- ** Buy Debt Open Order ** -->
|
||||||
|
<!ELEMENT OOBUYDEBT - - (OO , AUCTION , DTAUCTION?) >
|
||||||
|
|
||||||
|
<!ELEMENT AUCTION - O %BOOLTYPE >
|
||||||
|
|
||||||
|
<!ELEMENT DTAUCTION - O %DTTMTYPE >
|
||||||
|
|
||||||
|
<!-- ** Buy Mutual Fund Open Order ** -->
|
||||||
|
<!ELEMENT OOBUYMF - - (OO , BUYTYPE , UNITTYPE) >
|
||||||
|
|
||||||
|
<!-- Type of units: SHARES or CURRENCY -->
|
||||||
|
<!ELEMENT UNITTYPE - O %STRTYPE >
|
||||||
|
|
||||||
|
<!-- ** Buy Option Open Order ** -->
|
||||||
|
<!ELEMENT OOBUYOPT - - (OO , OPTBUYTYPE) >
|
||||||
|
|
||||||
|
<!-- ** Buy Other Open Order ** -->
|
||||||
|
<!ELEMENT OOBUYOTHER - - (OO , UNITTYPE) >
|
||||||
|
|
||||||
|
<!-- ** Buy Stock Open Order ** -->
|
||||||
|
<!ELEMENT OOBUYSTOCK - - (OO , BUYTYPE) >
|
||||||
|
|
||||||
|
<!-- ** Sell Debt Open Order ** -->
|
||||||
|
<!ELEMENT OOSELLDEBT - - (OO) >
|
||||||
|
|
||||||
|
<!-- ** Sell Mutual Fund Open Order ** -->
|
||||||
|
<!ELEMENT OOSELLMF - - (OO , SELLTYPE , UNITTYPE , SELLALL) >
|
||||||
|
|
||||||
|
<!ELEMENT SELLALL - O %BOOLTYPE >
|
||||||
|
|
||||||
|
<!-- ** Sell Option Open Order ** -->
|
||||||
|
<!ELEMENT OOSELLOPT - - (OO , OPTSELLTYPE) >
|
||||||
|
|
||||||
|
<!-- ** Sell Other Security Type Open Order ** -->
|
||||||
|
<!ELEMENT OOSELLOTHER - - (OO , UNITTYPE) >
|
||||||
|
|
||||||
|
<!-- ** Sell Stock Open Order ** -->
|
||||||
|
<!ELEMENT OOSELLSTOCK - - (OO , SELLTYPE) >
|
||||||
|
|
||||||
|
<!-- ** Switch Mutual Fund Open Order ** -->
|
||||||
|
<!ELEMENT OOSWITCHMF - - (OO , SECID , UNITTYPE , SWITCHALL) >
|
||||||
|
|
||||||
|
<!ELEMENT SWITCHALL - O %BOOLTYPE >
|
||||||
|
|
||||||
|
|
||||||
|
<!-- ***** Position List ***** -->
|
||||||
|
<!ELEMENT INVPOSLIST - - ((POSMF | POSSTOCK | POSDEBT| POSOPT |
|
||||||
|
POSOTHER)*) >
|
||||||
|
|
||||||
|
<!-- Position fields common to and types of positions -->
|
||||||
|
<!ELEMENT INVPOS - - (SECID , HELDINACCT , POSTYPE , UNITS , UNITPRICE ,
|
||||||
|
MKTVAL , DTPRICEASOF , CURRENCY? , MEMO?) >
|
||||||
|
|
||||||
|
<!-- Which sub-account the position is held in: CASH, MARGIN, SHORT, OTHER -->
|
||||||
|
<!ELEMENT HELDINACCT - O %STRTYPE >
|
||||||
|
|
||||||
|
<!-- Position Type: SHORT, LONG -->
|
||||||
|
<!ELEMENT POSTYPE - O %STRTYPE >
|
||||||
|
|
||||||
|
<!ELEMENT DTPRICEASOF - O %DTTMTYPE >
|
||||||
|
|
||||||
|
<!-- ** Debt Position ** -->
|
||||||
|
<!ELEMENT POSDEBT - - (INVPOS) >
|
||||||
|
|
||||||
|
<!-- ** Mutual Fund Position ** -->
|
||||||
|
<!ELEMENT POSMF - - (INVPOS , UNITSSTREET? , UNITSUSER? , REINVDIV? ,
|
||||||
|
REINVCG?) >
|
||||||
|
|
||||||
|
<!ELEMENT UNITSSTREET - O %INTTYPE >
|
||||||
|
|
||||||
|
<!ELEMENT UNITSUSER - O %INTTYPE >
|
||||||
|
|
||||||
|
<!ELEMENT REINVDIV - O %BOOLTYPE >
|
||||||
|
|
||||||
|
<!ELEMENT REINVCG - O %BOOLTYPE >
|
||||||
|
|
||||||
|
<!-- ** Option Position ** -->
|
||||||
|
<!ELEMENT POSOPT - - (INVPOS , SECURED?) >
|
||||||
|
|
||||||
|
<!-- ** Other Security Type Position ** -->
|
||||||
|
<!ELEMENT POSOTHER - - (INVPOS) >
|
||||||
|
|
||||||
|
<!-- ** Stock Position ** -->
|
||||||
|
<!ELEMENT POSSTOCK - - (INVPOS , UNITSSTREET? , UNITSUSER? , REINVDIV?) >
|
||||||
|
|
||||||
|
|
||||||
|
<!-- ** Balances ** -->
|
||||||
|
<!ELEMENT INVBAL - - (AVAILCASH , MARGINBALANCE , SHORTBALANCE ,
|
||||||
|
BUYPOWER? , BALLIST?) >
|
||||||
|
|
||||||
|
<!ELEMENT MARGINBALANCE - O %AMTTYPE >
|
||||||
|
|
||||||
|
<!ELEMENT SHORTBALANCE - O %AMTTYPE >
|
||||||
|
|
||||||
|
<!ELEMENT AVAILCASH - O %AMTTYPE >
|
||||||
|
|
||||||
|
<!ELEMENT BUYPOWER - O %AMTTYPE >
|
||||||
|
|
||||||
|
<!ELEMENT BALLIST - - (BAL*) >
|
||||||
|
|
||||||
|
<!-- **** Investment Statement Message Set *** -->
|
||||||
|
|
||||||
|
<!-- Investment Message Set -->
|
||||||
|
<!ELEMENT INVSTMTMSGSET - - (INVSTMTMSGSETV1) >
|
||||||
|
|
||||||
|
<!-- Investment Message Set: Version 1 -->
|
||||||
|
<!ELEMENT INVSTMTMSGSETV1 - - (MSGSETCORE , TRANDNLD , OODNLD , POSDNLD , BALDNLD, CANEMAIL) >
|
||||||
|
|
||||||
|
<!-- FI supports download of transactions -->
|
||||||
|
<!ELEMENT TRANDNLD - O %BOOLTYPE >
|
||||||
|
|
||||||
|
<!-- FI supports download of open orders -->
|
||||||
|
<!ELEMENT OODNLD - O %BOOLTYPE >
|
||||||
|
|
||||||
|
<!-- FI supports download of positions -->
|
||||||
|
<!ELEMENT POSDNLD - O %BOOLTYPE >
|
||||||
|
|
||||||
|
<!-- FI supports download of balances -->
|
||||||
|
<!ELEMENT BALDNLD - O %BOOLTYPE >
|
||||||
|
|
||||||
|
<!-- **** Security List Message Set *** -->
|
||||||
|
|
||||||
|
<!-- Security List message Set -->
|
||||||
|
<!ELEMENT SECLISTMSGSET - - (SECLISTMSGSETV1) >
|
||||||
|
|
||||||
|
<!-- Investment Message Set: Version 1 -->
|
||||||
|
<!ELEMENT SECLISTMSGSETV1 - - (MSGSETCORE , SECLISTRQDNLD) >
|
||||||
|
|
||||||
|
<!-- FI supports SECLISTRQ -->
|
||||||
|
<!ELEMENT SECLISTRQDNLD - O %BOOLTYPE >
|
||||||
|
|
||||||
|
<!-- INVESTMENT EMAIL -->
|
||||||
|
<!ELEMENT INVMAILTRNRQ - - (%TRNRQMACRO, INVMAILRQ)>
|
||||||
|
<!ELEMENT INVMAILTRNRS - - (%TRNRSMACRO, INVMAILRS?)>
|
||||||
|
<!ELEMENT INVMAILSYNCRQ - - (%SYNCRQMACRO, INCIMAGES, USEHTML, INVACCTFROM, INVMAILTRNRQ*)>
|
||||||
|
<!ELEMENT INVMAILSYNCRS - - (%SYNCRSMACRO, INVACCTFROM, INVMAILTRNRS*)>
|
||||||
|
|
||||||
|
<!ELEMENT INVMAILRQ - - (INVACCTFROM, MAIL)>
|
||||||
|
<!ELEMENT INVMAILRS - - (INVACCTFROM, MAIL)>
|
54
src/experimental/ofx/dtd/ofxmail.dtd
Normal file
54
src/experimental/ofx/dtd/ofxmail.dtd
Normal file
@ -0,0 +1,54 @@
|
|||||||
|
<!--
|
||||||
|
$Revision$
|
||||||
|
$Date$
|
||||||
|
|
||||||
|
Open Financial Exchange DTD - mail module
|
||||||
|
Copyright 1997 CheckFree Corp., Intuit Inc., Microsoft Corp. All rights reserved
|
||||||
|
|
||||||
|
-->
|
||||||
|
<!-- Message sets -->
|
||||||
|
<!ELEMENT EMAILMSGSRQV1 - - ((MAILTRNRQ | MAILSYNCRQ | GETMIMETRNRQ)+ )>
|
||||||
|
<!ELEMENT EMAILMSGSRSV1 - - ((MAILTRNRS | MAILSYNCRS | GETMIMETRNRS)+ )>
|
||||||
|
|
||||||
|
<!-- Profile entry for message set -->
|
||||||
|
<!ELEMENT EMAILMSGSET - - (EMAILMSGSETV1)>
|
||||||
|
<!ELEMENT EMAILMSGSETV1 - - (MSGSETCORE , MAILSUP , GETMIMESUP)>
|
||||||
|
<!ELEMENT MAILSUP - o %BOOLTYPE>
|
||||||
|
<!ELEMENT GETMIMESUP - o %BOOLTYPE>
|
||||||
|
|
||||||
|
<!-- Email Transactions -->
|
||||||
|
|
||||||
|
<!ELEMENT MAILTRNRQ - - (%TRNRQMACRO , MAILRQ)>
|
||||||
|
<!ELEMENT MAILTRNRS - - (%TRNRSMACRO , MAILRS?)>
|
||||||
|
<!ELEMENT GETMIMETRNRQ - - (%TRNRQMACRO , GETMIMERQ)>
|
||||||
|
<!ELEMENT GETMIMETRNRS - - (%TRNRSMACRO , GETMIMERS?)>
|
||||||
|
|
||||||
|
<!-- Email Request -->
|
||||||
|
|
||||||
|
<!ELEMENT MAILRQ - - (MAIL)>
|
||||||
|
<!ELEMENT MAIL - - (USERID , DTCREATED , FROM , TO ,
|
||||||
|
SUBJECT , MSGBODY , INCIMAGES ,
|
||||||
|
USEHTML)>
|
||||||
|
|
||||||
|
<!ELEMENT DTCREATED - o %DTTMTYPE>
|
||||||
|
<!ELEMENT FROM - o %STRTYPE>
|
||||||
|
<!ELEMENT TO - o %STRTYPE>
|
||||||
|
<!ELEMENT SUBJECT - o %STRTYPE>
|
||||||
|
<!ELEMENT USEHTML - o %BOOLTYPE>
|
||||||
|
|
||||||
|
<!ELEMENT MSGBODY - - %STRTYPE>
|
||||||
|
|
||||||
|
<!-- Email Response -->
|
||||||
|
|
||||||
|
<!ELEMENT MAILRS - - (MAIL)>
|
||||||
|
|
||||||
|
<!-- Email sync -->
|
||||||
|
|
||||||
|
<!ELEMENT MAILSYNCRQ - - (%SYNCRQMACRO , INCIMAGES, USEHTML, MAILTRNRQ*)>
|
||||||
|
<!ELEMENT MAILSYNCRS - - (%SYNCRSMACRO , MAILTRNRS*)>
|
||||||
|
|
||||||
|
<!-- HTML GET -->
|
||||||
|
|
||||||
|
<!ELEMENT GETMIMERQ - - (URL)>
|
||||||
|
<!ELEMENT GETMIMERS - - (URL)>
|
||||||
|
|
440
src/experimental/ofx/dtd/ofxmain.dtd
Normal file
440
src/experimental/ofx/dtd/ofxmain.dtd
Normal file
@ -0,0 +1,440 @@
|
|||||||
|
<!DOCTYPE OFX [
|
||||||
|
|
||||||
|
<!--
|
||||||
|
$Revision$
|
||||||
|
$Date$
|
||||||
|
|
||||||
|
Open Financial Exchange DTD - main module
|
||||||
|
Defines common types and overall OFX structure
|
||||||
|
Includes (via entity refs) all other service modules
|
||||||
|
Copyright 1997 CheckFree Corp., Intuit Inc., Microsoft Corp. All rights reserved
|
||||||
|
|
||||||
|
------------------------
|
||||||
|
This is not the original source. I've been hacking on it!
|
||||||
|
Hacked upon by Linas Vepstas March 1998
|
||||||
|
|
||||||
|
-->
|
||||||
|
|
||||||
|
<!-- ============================================================================= -->
|
||||||
|
<!-- ENTITIES - Extensions
|
||||||
|
This entity allows users of this DTD to add new message sets
|
||||||
|
to the DTD.
|
||||||
|
-->
|
||||||
|
<!-- ============================================================================= -->
|
||||||
|
|
||||||
|
<!-- Add extra xxxMSGSETRQVn here -->
|
||||||
|
<!ENTITY % EXTRARQMSGSETS "">
|
||||||
|
|
||||||
|
<!-- Add extra xxxMSGSETRSVn here -->
|
||||||
|
<!ENTITY % EXTRARSMSGSETS "">
|
||||||
|
|
||||||
|
<!-- Add extra XXXMSGSET here -->
|
||||||
|
<!ENTITY % EXTRAMSGSETS "">
|
||||||
|
|
||||||
|
<!-- ============================================================================= -->
|
||||||
|
<!-- ENTITIES - types
|
||||||
|
This section defines entities as 'types' for all
|
||||||
|
primitive element values. This is the only place
|
||||||
|
that #PCDATA should appear.
|
||||||
|
-->
|
||||||
|
<!-- ============================================================================= -->
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Server ID : encoding for <TOKEN>'s, <SERVERTID>'s, etc -->
|
||||||
|
<!ENTITY % SRVRIDTYPE "(xacc-srvrid)" >
|
||||||
|
|
||||||
|
<!-- UUID : a universal ID , up to 36 char hexadecimal -->
|
||||||
|
<!ENTITY % UUIDTYPE "(xacc-uuid)" >
|
||||||
|
|
||||||
|
<!-- Character string data -->
|
||||||
|
<!ENTITY % STRTYPE "(xacc-str)">
|
||||||
|
|
||||||
|
<!-- URL -->
|
||||||
|
<!ENTITY % URLTYPE "(xacc-url)">
|
||||||
|
|
||||||
|
<!-- Integer -->
|
||||||
|
<!ENTITY % INTTYPE "(xacc-int)">
|
||||||
|
|
||||||
|
<!-- Rate, percentage -->
|
||||||
|
<!ENTITY % RATETYPE "(xacc-rate)">
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Current Amount: Used for specifying an amount.
|
||||||
|
may be signed; comma or period for decimal point
|
||||||
|
-->
|
||||||
|
<!ENTITY % AMTTYPE "(xacc-amount)">
|
||||||
|
<!ENTITY % UNITPRICETYPE "(xacc-price)">
|
||||||
|
|
||||||
|
<!-- Date and Time: Used for specifying
|
||||||
|
the date and time. All date-time pairs
|
||||||
|
are based on local time of the server or client.
|
||||||
|
|
||||||
|
-->
|
||||||
|
<!ENTITY % DTTMTYPE "(xacc-dttm)">
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Boolean : Y/N
|
||||||
|
-->
|
||||||
|
<!ENTITY % BOOLTYPE "(xacc-bool)">
|
||||||
|
|
||||||
|
<!--
|
||||||
|
a general purpose identifier type
|
||||||
|
-->
|
||||||
|
<!ENTITY % IDTYPE "(xacc-id)">
|
||||||
|
|
||||||
|
<!-- ============================================================================= -->
|
||||||
|
<!-- ENTITIES - macros
|
||||||
|
This section defines macros used in one or more modules
|
||||||
|
where a new level of aggregation was not desired but
|
||||||
|
common structure is present
|
||||||
|
-->
|
||||||
|
<!-- ============================================================================= -->
|
||||||
|
|
||||||
|
<!-- Sync macros: all sync requests/responses have same form, but
|
||||||
|
have own name. Although we could use the multiple-element syntax and put
|
||||||
|
them all here, we'd rather keep service-specific names in the service files.
|
||||||
|
Thus, we have a macro here that is trivially referenced in each service module -->
|
||||||
|
|
||||||
|
<!ENTITY % SYNCRQMACRO "((TOKEN | TOKENONLY | REFRESH )
|
||||||
|
, REJECTIFMISSING)" >
|
||||||
|
|
||||||
|
<!ENTITY % SYNCRSMACRO "(TOKEN, LOSTSYNC?)">
|
||||||
|
|
||||||
|
<!-- Transaction Macro: all transaction requests have same form
|
||||||
|
but own name. Didn't want to create a new sub-aggregate
|
||||||
|
to hold these elements so use a macro to incorporate them
|
||||||
|
into each XXXTRNRQ and XXXTRNRS -->
|
||||||
|
<!ENTITY % TRNRQMACRO "(TRNUID , CLTCOOKIE?, TAN?)">
|
||||||
|
<!ENTITY % TRNRSMACRO "(TRNUID , STATUS , CLTCOOKIE?)">
|
||||||
|
|
||||||
|
<!-- Account from and account info: if you add a new service and it adds
|
||||||
|
a specific account from or account info aggregate, add it here so it will be
|
||||||
|
known to aggregates such as the account info request -->
|
||||||
|
<!ENTITY % ACCTFROMMACRO "(BANKACCTFROM | CCACCTFROM | INVACCTFROM)">
|
||||||
|
<!ENTITY % ACCTTOMACRO "(BANKACCTTO | CCACCTTO | INVACCTTO)">
|
||||||
|
<!ENTITY % ACCTINFOMACRO "(BANKACCTINFO | CCACCTINFO | BPACCTINFO | INVACCTINFO)">
|
||||||
|
|
||||||
|
<!-- Profile message set macro
|
||||||
|
Each of the XXXMSGSET tags need to be listed here
|
||||||
|
Referenced in oxprof MSGSETLIST element -->
|
||||||
|
<!ENTITY % MSGSETMACRO "
|
||||||
|
(SIGNONMSGSET?,
|
||||||
|
SIGNUPMSGSET?,
|
||||||
|
BANKMSGSET?,
|
||||||
|
CREDITCARDMSGSET?,
|
||||||
|
INVSTMTMSGSET?,
|
||||||
|
INTERXFERMSGSET?,
|
||||||
|
WIREXFERMSGSET?,
|
||||||
|
BILLPAYMSGSET?,
|
||||||
|
EMAILMSGSET?,
|
||||||
|
SECLISTMSGSET?,
|
||||||
|
PROFMSGSET?
|
||||||
|
%EXTRAMSGSETS
|
||||||
|
)">
|
||||||
|
|
||||||
|
<!-- ============================================================================= -->
|
||||||
|
<!-- 'INCLUDES'
|
||||||
|
This section incorporates each service dtd by
|
||||||
|
defining a system entity that points to that file,
|
||||||
|
then referencing it.
|
||||||
|
Note: this must come after all ENTITY declarations used by
|
||||||
|
the service module have been defined.
|
||||||
|
-->
|
||||||
|
<!-- ============================================================================= -->
|
||||||
|
|
||||||
|
<!ENTITY % signon-dtd SYSTEM "ofxsign.dtd">
|
||||||
|
%signon-dtd;
|
||||||
|
|
||||||
|
<!ENTITY % banking-dtd SYSTEM "ofxbank.dtd">
|
||||||
|
%banking-dtd;
|
||||||
|
|
||||||
|
<!ENTITY % billpay-dtd SYSTEM "ofxbill.dtd">
|
||||||
|
%billpay-dtd;
|
||||||
|
|
||||||
|
<!ENTITY % activate-dtd SYSTEM "ofxact.dtd">
|
||||||
|
%activate-dtd;
|
||||||
|
|
||||||
|
<!ENTITY % invest-dtd SYSTEM "ofxinv.dtd">
|
||||||
|
%invest-dtd;
|
||||||
|
|
||||||
|
<!ENTITY % mail-dtd SYSTEM "ofxmail.dtd">
|
||||||
|
%mail-dtd;
|
||||||
|
|
||||||
|
<!ENTITY % prof-dtd SYSTEM "ofxprof.dtd">
|
||||||
|
%prof-dtd;
|
||||||
|
|
||||||
|
<!-- ============================================================================= -->
|
||||||
|
<!--
|
||||||
|
OpenExchange Element Structure
|
||||||
|
This file defines common and high-level elements.
|
||||||
|
New requests and responses need to be added to the TRNRQ/TRNRS elements here
|
||||||
|
-->
|
||||||
|
<!-- ============================================================================= -->
|
||||||
|
|
||||||
|
<!-- Top-level -->
|
||||||
|
<!-- Add the 'meta-token' for sync requests from each
|
||||||
|
service module here -->
|
||||||
|
|
||||||
|
<!ENTITY % OFXRQMSGSETS
|
||||||
|
"SIGNONMSGSRQV1,
|
||||||
|
SIGNUPMSGSRQV1?,
|
||||||
|
BANKMSGSRQV1?,
|
||||||
|
CREDITCARDMSGSRQV1?,
|
||||||
|
INVSTMTMSGSRQV1?,
|
||||||
|
INTERXFERMSGSRQV1?,
|
||||||
|
WIREXFERMSGSRQV1?,
|
||||||
|
BILLPAYMSGSRQV1?,
|
||||||
|
EMAILMSGSRQV1?,
|
||||||
|
SECLISTMSGSRQV1?,
|
||||||
|
PROFMSGSRQV1?
|
||||||
|
%EXTRARQMSGSETS">
|
||||||
|
|
||||||
|
<!ENTITY % OFXRSMSGSETS
|
||||||
|
"SIGNONMSGSRSV1,
|
||||||
|
SIGNUPMSGSRSV1?,
|
||||||
|
BANKMSGSRSV1?,
|
||||||
|
CREDITCARDMSGSRSV1?,
|
||||||
|
INVSTMTMSGSRSV1?,
|
||||||
|
INTERXFERMSGSRSV1?,
|
||||||
|
WIREXFERMSGSRSV1?,
|
||||||
|
BILLPAYMSGSRSV1?,
|
||||||
|
EMAILMSGSRSV1?,
|
||||||
|
SECLISTMSGSRSV1?,
|
||||||
|
PROFMSGSRSV1?
|
||||||
|
%EXTRARSMSGSETS">
|
||||||
|
|
||||||
|
<!ELEMENT OFX - - ((%OFXRQMSGSETS) | (%OFXRSMSGSETS))>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Generic Elements and Common Aggregates -->
|
||||||
|
|
||||||
|
<!ELEMENT DTCLIENT - o %DTTMTYPE>
|
||||||
|
<!ELEMENT USERID - o %IDTYPE>
|
||||||
|
<!ELEMENT USERPASS - o %STRTYPE>
|
||||||
|
<!ELEMENT USERKEY - o %STRTYPE>
|
||||||
|
<!ELEMENT GENUSERKEY - o %BOOLTYPE>
|
||||||
|
<!ELEMENT APPID - o %IDTYPE>
|
||||||
|
<!ELEMENT APPVER - o %INTTYPE>
|
||||||
|
<!ELEMENT DTSERVER - o %DTTMTYPE>
|
||||||
|
<!ELEMENT TSKEYEXPIRE - o %DTTMTYPE>
|
||||||
|
<!ELEMENT CLTCOOKIE - o %STRTYPE>
|
||||||
|
<!ELEMENT TAN - o %STRTYPE>
|
||||||
|
|
||||||
|
<!ELEMENT DESC - o %STRTYPE>
|
||||||
|
<!ELEMENT PHONE - o %STRTYPE>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- general error reporting aggregate -->
|
||||||
|
<!ELEMENT STATUS - - (CODE , SEVERITY , MESSAGE?)>
|
||||||
|
|
||||||
|
<!ELEMENT CODE - o %INTTYPE>
|
||||||
|
<!ELEMENT SEVERITY - o %STRTYPE> <!-- TODO: enum? -->
|
||||||
|
<!ELEMENT MESSAGE - o %STRTYPE>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Balance record -->
|
||||||
|
<!ELEMENT BAL - - (NAME , DESC , BALTYPE , VALUE ,
|
||||||
|
DTASOF? , CURRENCY?)>
|
||||||
|
<!ELEMENT BALTYPE - o %STRTYPE> <!-- TODO: enum? -->
|
||||||
|
<!ELEMENT VALUE - o %AMTTYPE>
|
||||||
|
|
||||||
|
|
||||||
|
<!--
|
||||||
|
TRNUID - a UUID that uniquely identifies transactions
|
||||||
|
-->
|
||||||
|
<!ELEMENT TRNUID - o %UUIDTYPE>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Server ID -->
|
||||||
|
<!ELEMENT SRVRTID - o %SRVRIDTYPE>
|
||||||
|
|
||||||
|
<!-- Transaction ID issued by financial institution.This ID is used to detect duplicate downloads -->
|
||||||
|
<!ELEMENT FITID - o %IDTYPE>
|
||||||
|
|
||||||
|
<!-- starting date -->
|
||||||
|
<!ELEMENT DTSTART - o %DTTMTYPE>
|
||||||
|
|
||||||
|
<!-- ending date -->
|
||||||
|
<!ELEMENT DTEND - o %DTTMTYPE>
|
||||||
|
|
||||||
|
<!ELEMENT DTPROFUP - o %DTTMTYPE>
|
||||||
|
<!ELEMENT DTACCTUP - o %DTTMTYPE>
|
||||||
|
|
||||||
|
<!-- Sync-related -->
|
||||||
|
<!ELEMENT TOKENONLY - o %BOOLTYPE>
|
||||||
|
<!ELEMENT TOKEN - o %SRVRIDTYPE>
|
||||||
|
<!ELEMENT REFRESH - o %BOOLTYPE>
|
||||||
|
<!ELEMENT REJECTIFMISSING - o %BOOLTYPE>
|
||||||
|
<!ELEMENT LOSTSYNC - o %BOOLTYPE>
|
||||||
|
|
||||||
|
<!ELEMENT URL - o %URLTYPE>
|
||||||
|
<!ELEMENT INCIMAGES - o %BOOLTYPE>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Name & Address-related fields used in several messages -->
|
||||||
|
|
||||||
|
<!ELEMENT FIRSTNAME - o %STRTYPE>
|
||||||
|
<!ELEMENT MIDDLENAME - o %STRTYPE>
|
||||||
|
<!ELEMENT LASTNAME - o %STRTYPE>
|
||||||
|
|
||||||
|
<!-- Payees address lines (1 or more) -->
|
||||||
|
<!ELEMENT ADDR1 - o %STRTYPE>
|
||||||
|
<!ELEMENT ADDR2 - o %STRTYPE>
|
||||||
|
<!ELEMENT ADDR3 - o %STRTYPE>
|
||||||
|
|
||||||
|
<!-- Payees city -->
|
||||||
|
<!ELEMENT CITY - o %STRTYPE>
|
||||||
|
|
||||||
|
<!-- Payees state -->
|
||||||
|
<!ELEMENT STATE - o %STRTYPE>
|
||||||
|
|
||||||
|
<!-- Zip code -->
|
||||||
|
<!ELEMENT POSTALCODE - o %STRTYPE>
|
||||||
|
|
||||||
|
<!-- Payees country -->
|
||||||
|
<!ELEMENT COUNTRY - o %STRTYPE>
|
||||||
|
|
||||||
|
<!ELEMENT DAYPHONE - o %STRTYPE>
|
||||||
|
<!ELEMENT EVEPHONE - o %STRTYPE>
|
||||||
|
<!ELEMENT EMAIL - o %STRTYPE>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- ============================================================================= -->
|
||||||
|
<!-- Common between banking, billpay and/or investments -->
|
||||||
|
<!-- ============================================================================= -->
|
||||||
|
|
||||||
|
<!-- Bank account -->
|
||||||
|
|
||||||
|
<!ELEMENT (BANKACCTFROM,BANKACCTTO) - - (BANKID , BRANCHID? , ACCTID ,
|
||||||
|
ACCTTYPE , ACCTKEY?)>
|
||||||
|
|
||||||
|
<!-- Credit card account -->
|
||||||
|
|
||||||
|
<!ELEMENT (CCACCTFROM,CCACCTTO) - - (ACCTID , ACCTKEY?)>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Routing & transit number -->
|
||||||
|
<!ELEMENT BANKID - o %IDTYPE>
|
||||||
|
|
||||||
|
<!-- Bank identifier for international banks -->
|
||||||
|
<!ELEMENT BRANCHID - o %IDTYPE>
|
||||||
|
|
||||||
|
<!-- Account number -->
|
||||||
|
<!ELEMENT ACCTID - o %IDTYPE>
|
||||||
|
|
||||||
|
<!-- Type of account. -->
|
||||||
|
<!ELEMENT ACCTTYPE - o %IDTYPE>
|
||||||
|
|
||||||
|
<!-- Checksum for international banks -->
|
||||||
|
<!ELEMENT ACCTKEY - o %IDTYPE>
|
||||||
|
|
||||||
|
<!-- User account number for a merchant -->
|
||||||
|
<!ELEMENT PAYACCT - o %IDTYPE>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
If present, this is the FITID of a previously sent transaction that is corrected by this record.
|
||||||
|
This transaction replaces or deletes the transaction that it corrects.
|
||||||
|
-->
|
||||||
|
<!ELEMENT CORRECTFITID - o %IDTYPE>
|
||||||
|
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Actions can be REPLACE or DELETE.
|
||||||
|
REPLACE replaces the transaction referenced by CORRECTFITID; DELETE deletes it.
|
||||||
|
-->
|
||||||
|
<!ELEMENT CORRECTACTION - o %STRTYPE> <!-- TODO: attribute? -->
|
||||||
|
|
||||||
|
<!-- Payee name or description -->
|
||||||
|
<!ELEMENT NAME - o %STRTYPE>
|
||||||
|
|
||||||
|
<!-- Extra information (not in <NAME>), A-255 -->
|
||||||
|
<!ELEMENT MEMO - o %STRTYPE>
|
||||||
|
|
||||||
|
<!-- Marketing information -->
|
||||||
|
<!ELEMENT MKTGINFO - o %STRTYPE>
|
||||||
|
|
||||||
|
<!-- Include flag -->
|
||||||
|
<!ELEMENT INCLUDE - o %BOOLTYPE>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- ============================================================================= -->
|
||||||
|
<!-- Common amounts -->
|
||||||
|
<!-- ============================================================================= -->
|
||||||
|
|
||||||
|
<!-- Balance amount -->
|
||||||
|
<!ELEMENT BALAMT - o %AMTTYPE>
|
||||||
|
|
||||||
|
<!-- Amount of transaction -->
|
||||||
|
<!ELEMENT TRNAMT - o %AMTTYPE>
|
||||||
|
|
||||||
|
<!-- ============================================================================= -->
|
||||||
|
<!-- Common dates -->
|
||||||
|
<!-- ============================================================================= -->
|
||||||
|
|
||||||
|
<!-- Date funds are available -->
|
||||||
|
<!ELEMENT DTDUE - o %DTTMTYPE>
|
||||||
|
|
||||||
|
<!-- Balance date -->
|
||||||
|
<!ELEMENT DTASOF - o %DTTMTYPE>
|
||||||
|
|
||||||
|
<!-- ============================================================================= -->
|
||||||
|
<!-- Recurring models and instances -->
|
||||||
|
<!-- ============================================================================= -->
|
||||||
|
|
||||||
|
<!-- If the response is generated by a recurring model, this ID references it -->
|
||||||
|
<!ELEMENT RECSRVRTID - o %SRVRIDTYPE>
|
||||||
|
|
||||||
|
<!-- Recurring Instructions aggregate -->
|
||||||
|
<!ELEMENT RECURRINST - - (NINSTS? , FREQ)>
|
||||||
|
|
||||||
|
<!-- Number of instructions. If this tag is omitted, the schedule is open-ended -->
|
||||||
|
<!ELEMENT NINSTS - o %INTTYPE>
|
||||||
|
|
||||||
|
<!-- Frequency -->
|
||||||
|
<!ELEMENT FREQ - o %STRTYPE> <!-- TODO: attribute?? -->
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Modify pending flag, boolean
|
||||||
|
Note: if this flag is set, the server should modify pending as well as future transfers.
|
||||||
|
-->
|
||||||
|
<!ELEMENT MODPENDING - o %BOOLTYPE>
|
||||||
|
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Cancel pending flag, boolean
|
||||||
|
Note: if this flag is set, the server should cancel pending as well as future transfers.
|
||||||
|
-->
|
||||||
|
<!ELEMENT CANPENDING - o %BOOLTYPE>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- International -->
|
||||||
|
<!ELEMENT LANGUAGE - o %STRTYPE> <!-- TODO: enum? -->
|
||||||
|
|
||||||
|
<!ELEMENT (CURRENCY, ORIGCURRENCY) - - (CURRATE , CURSYM)>
|
||||||
|
<!ELEMENT CURSYM - o %STRTYPE>
|
||||||
|
<!ELEMENT CURRATE - o %RATETYPE>
|
||||||
|
<!ELEMENT CURDEF - o %STRTYPE>
|
||||||
|
|
||||||
|
<!-- ============================================================================= -->
|
||||||
|
<!-- Common Profile Stuff -->
|
||||||
|
<!-- ============================================================================= -->
|
||||||
|
|
||||||
|
<!-- Recurring transfers and payments -->
|
||||||
|
|
||||||
|
<!-- Supports recurring -->
|
||||||
|
<!ELEMENT CANRECUR - o %BOOLTYPE>
|
||||||
|
|
||||||
|
<!-- Can modify recurring models -->
|
||||||
|
<!ELEMENT CANMODMDLS - o %BOOLTYPE>
|
||||||
|
|
||||||
|
<!-- Number of days prior to processing that server makes a recurring transaction available to the client -->
|
||||||
|
<!ELEMENT MODELWND - o %INTTYPE>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Day where processing is unavailable (MONDAY, TUESDAY, etc) -->
|
||||||
|
<!ELEMENT PROCDAYSOFF - o %STRTYPE>
|
||||||
|
|
||||||
|
<!-- Cut off time for days's processing TODO: should just be time -->
|
||||||
|
<!ELEMENT PROCENDTM - o %DTTMTYPE>
|
||||||
|
|
||||||
|
]>
|
436
src/experimental/ofx/dtd/ofxmain.dtd.original
Normal file
436
src/experimental/ofx/dtd/ofxmain.dtd.original
Normal file
@ -0,0 +1,436 @@
|
|||||||
|
<!DOCTYPE OFX [
|
||||||
|
|
||||||
|
<!--
|
||||||
|
$Revision$
|
||||||
|
$Date$
|
||||||
|
|
||||||
|
Open Financial Exchange DTD - main module
|
||||||
|
Defines common types and overall OFX structure
|
||||||
|
Includes (via entity refs) all other service modules
|
||||||
|
Copyright 1997 CheckFree Corp., Intuit Inc., Microsoft Corp. All rights reserved
|
||||||
|
|
||||||
|
-->
|
||||||
|
|
||||||
|
<!-- ============================================================================= -->
|
||||||
|
<!-- ENTITIES - Extensions
|
||||||
|
This entity allows users of this DTD to add new message sets
|
||||||
|
to the DTD.
|
||||||
|
-->
|
||||||
|
<!-- ============================================================================= -->
|
||||||
|
|
||||||
|
<!-- Add extra xxxMSGSETRQVn here -->
|
||||||
|
<!ENTITY % EXTRARQMSGSETS "">
|
||||||
|
|
||||||
|
<!-- Add extra xxxMSGSETRSVn here -->
|
||||||
|
<!ENTITY % EXTRARSMSGSETS "">
|
||||||
|
|
||||||
|
<!-- Add extra XXXMSGSET here -->
|
||||||
|
<!ENTITY % EXTRAMSGSETS "">
|
||||||
|
|
||||||
|
<!-- ============================================================================= -->
|
||||||
|
<!-- ENTITIES - types
|
||||||
|
This section defines entities as 'types' for all
|
||||||
|
primitive element values. This is the only place
|
||||||
|
that #PCDATA should appear.
|
||||||
|
-->
|
||||||
|
<!-- ============================================================================= -->
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Server ID : encoding for <TOKEN>'s, <SERVERTID>'s, etc -->
|
||||||
|
<!ENTITY % SRVRIDTYPE "(#PCDATA)" >
|
||||||
|
|
||||||
|
<!-- UUID : a universal ID , up to 36 char hexadecimal -->
|
||||||
|
<!ENTITY % UUIDTYPE "(#PCDATA)" >
|
||||||
|
|
||||||
|
<!-- Character string data -->
|
||||||
|
<!ENTITY % STRTYPE "(#PCDATA)">
|
||||||
|
|
||||||
|
<!-- URL -->
|
||||||
|
<!ENTITY % URLTYPE "(#PCDATA)">
|
||||||
|
|
||||||
|
<!-- Integer -->
|
||||||
|
<!ENTITY % INTTYPE "(#PCDATA)">
|
||||||
|
|
||||||
|
<!-- Rate, percentage -->
|
||||||
|
<!ENTITY % RATETYPE "(#PCDATA)">
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Current Amount: Used for specifying an amount.
|
||||||
|
may be signed; comma or period for decimal point
|
||||||
|
-->
|
||||||
|
<!ENTITY % AMTTYPE "(#PCDATA)">
|
||||||
|
<!ENTITY % UNITPRICETYPE "(#PCDATA)">
|
||||||
|
|
||||||
|
<!-- Date and Time: Used for specifying
|
||||||
|
the date and time. All date-time pairs
|
||||||
|
are based on local time of the server or client.
|
||||||
|
|
||||||
|
-->
|
||||||
|
<!ENTITY % DTTMTYPE "(#PCDATA)">
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Boolean : Y/N
|
||||||
|
-->
|
||||||
|
<!ENTITY % BOOLTYPE "(#PCDATA)">
|
||||||
|
|
||||||
|
<!--
|
||||||
|
a general purpose identifier type
|
||||||
|
-->
|
||||||
|
<!ENTITY % IDTYPE "(#PCDATA)">
|
||||||
|
|
||||||
|
<!-- ============================================================================= -->
|
||||||
|
<!-- ENTITIES - macros
|
||||||
|
This section defines macros used in one or more modules
|
||||||
|
where a new level of aggregation was not desired but
|
||||||
|
common structure is present
|
||||||
|
-->
|
||||||
|
<!-- ============================================================================= -->
|
||||||
|
|
||||||
|
<!-- Sync macros: all sync requests/responses have same form, but
|
||||||
|
have own name. Although we could use the multiple-element syntax and put
|
||||||
|
them all here, we'd rather keep service-specific names in the service files.
|
||||||
|
Thus, we have a macro here that is trivially referenced in each service module -->
|
||||||
|
|
||||||
|
<!ENTITY % SYNCRQMACRO "((TOKEN | TOKENONLY | REFRESH )
|
||||||
|
, REJECTIFMISSING)" >
|
||||||
|
|
||||||
|
<!ENTITY % SYNCRSMACRO "(TOKEN, LOSTSYNC?)">
|
||||||
|
|
||||||
|
<!-- Transaction Macro: all transaction requests have same form
|
||||||
|
but own name. Didn't want to create a new sub-aggregate
|
||||||
|
to hold these elements so use a macro to incorporate them
|
||||||
|
into each XXXTRNRQ and XXXTRNRS -->
|
||||||
|
<!ENTITY % TRNRQMACRO "(TRNUID , CLTCOOKIE?, TAN?)">
|
||||||
|
<!ENTITY % TRNRSMACRO "(TRNUID , STATUS , CLTCOOKIE?)">
|
||||||
|
|
||||||
|
<!-- Account from and account info: if you add a new service and it adds
|
||||||
|
a specific account from or account info aggregate, add it here so it will be
|
||||||
|
known to aggregates such as the account info request -->
|
||||||
|
<!ENTITY % ACCTFROMMACRO "(BANKACCTFROM | CCACCTFROM | INVACCTFROM)">
|
||||||
|
<!ENTITY % ACCTTOMACRO "(BANKACCTTO | CCACCTTO | INVACCTTO)">
|
||||||
|
<!ENTITY % ACCTINFOMACRO "(BANKACCTINFO | CCACCTINFO | BPACCTINFO | INVACCTINFO)">
|
||||||
|
|
||||||
|
<!-- Profile message set macro
|
||||||
|
Each of the XXXMSGSET tags need to be listed here
|
||||||
|
Referenced in oxprof MSGSETLIST element -->
|
||||||
|
<!ENTITY % MSGSETMACRO "
|
||||||
|
(SIGNONMSGSET?,
|
||||||
|
SIGNUPMSGSET?,
|
||||||
|
BANKMSGSET?,
|
||||||
|
CREDITCARDMSGSET?,
|
||||||
|
INVSTMTMSGSET?,
|
||||||
|
INTERXFERMSGSET?,
|
||||||
|
WIREXFERMSGSET?,
|
||||||
|
BILLPAYMSGSET?,
|
||||||
|
EMAILMSGSET?,
|
||||||
|
SECLISTMSGSET?,
|
||||||
|
PROFMSGSET?
|
||||||
|
%EXTRAMSGSETS
|
||||||
|
)">
|
||||||
|
|
||||||
|
<!-- ============================================================================= -->
|
||||||
|
<!-- 'INCLUDES'
|
||||||
|
This section incorporates each service dtd by
|
||||||
|
defining a system entity that points to that file,
|
||||||
|
then referencing it.
|
||||||
|
Note: this must come after all ENTITY declarations used by
|
||||||
|
the service module have been defined.
|
||||||
|
-->
|
||||||
|
<!-- ============================================================================= -->
|
||||||
|
|
||||||
|
<!ENTITY % signon-dtd SYSTEM "ofxsign.dtd">
|
||||||
|
%signon-dtd;
|
||||||
|
|
||||||
|
<!ENTITY % banking-dtd SYSTEM "ofxbank.dtd">
|
||||||
|
%banking-dtd;
|
||||||
|
|
||||||
|
<!ENTITY % billpay-dtd SYSTEM "ofxbill.dtd">
|
||||||
|
%billpay-dtd;
|
||||||
|
|
||||||
|
<!ENTITY % activate-dtd SYSTEM "ofxact.dtd">
|
||||||
|
%activate-dtd;
|
||||||
|
|
||||||
|
<!ENTITY % invest-dtd SYSTEM "ofxinv.dtd">
|
||||||
|
%invest-dtd;
|
||||||
|
|
||||||
|
<!ENTITY % mail-dtd SYSTEM "ofxmail.dtd">
|
||||||
|
%mail-dtd;
|
||||||
|
|
||||||
|
<!ENTITY % prof-dtd SYSTEM "ofxprof.dtd">
|
||||||
|
%prof-dtd;
|
||||||
|
|
||||||
|
<!-- ============================================================================= -->
|
||||||
|
<!--
|
||||||
|
OpenExchange Element Structure
|
||||||
|
This file defines common and high-level elements.
|
||||||
|
New requests and responses need to be added to the TRNRQ/TRNRS elements here
|
||||||
|
-->
|
||||||
|
<!-- ============================================================================= -->
|
||||||
|
|
||||||
|
<!-- Top-level -->
|
||||||
|
<!-- Add the 'meta-token' for sync requests from each
|
||||||
|
service module here -->
|
||||||
|
|
||||||
|
<!ENTITY % OFXRQMSGSETS
|
||||||
|
"SIGNONMSGSRQV1,
|
||||||
|
SIGNUPMSGSRQV1?,
|
||||||
|
BANKMSGSRQV1?,
|
||||||
|
CREDITCARDMSGSRQV1?,
|
||||||
|
INVSTMTMSGSRQV1?,
|
||||||
|
INTERXFERMSGSRQV1?,
|
||||||
|
WIREXFERMSGSRQV1?,
|
||||||
|
BILLPAYMSGSRQV1?,
|
||||||
|
EMAILMSGSRQV1?,
|
||||||
|
SECLISTMSGSRQV1?,
|
||||||
|
PROFMSGSRQV1?
|
||||||
|
%EXTRARQMSGSETS">
|
||||||
|
|
||||||
|
<!ENTITY % OFXRSMSGSETS
|
||||||
|
"SIGNONMSGSRSV1,
|
||||||
|
SIGNUPMSGSRSV1?,
|
||||||
|
BANKMSGSRSV1?,
|
||||||
|
CREDITCARDMSGSRSV1?,
|
||||||
|
INVSTMTMSGSRSV1?,
|
||||||
|
INTERXFERMSGSRSV1?,
|
||||||
|
WIREXFERMSGSRSV1?,
|
||||||
|
BILLPAYMSGSRSV1?,
|
||||||
|
EMAILMSGSRSV1?,
|
||||||
|
SECLISTMSGSRSV1?,
|
||||||
|
PROFMSGSRSV1?
|
||||||
|
%EXTRARSMSGSETS">
|
||||||
|
|
||||||
|
<!ELEMENT OFX - - ((%OFXRQMSGSETS) | (%OFXRSMSGSETS))>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Generic Elements and Common Aggregates -->
|
||||||
|
|
||||||
|
<!ELEMENT DTCLIENT - o %DTTMTYPE>
|
||||||
|
<!ELEMENT USERID - o %IDTYPE>
|
||||||
|
<!ELEMENT USERPASS - o %STRTYPE>
|
||||||
|
<!ELEMENT USERKEY - o %STRTYPE>
|
||||||
|
<!ELEMENT GENUSERKEY - o %BOOLTYPE>
|
||||||
|
<!ELEMENT APPID - o %IDTYPE>
|
||||||
|
<!ELEMENT APPVER - o %INTTYPE>
|
||||||
|
<!ELEMENT DTSERVER - o %DTTMTYPE>
|
||||||
|
<!ELEMENT TSKEYEXPIRE - o %DTTMTYPE>
|
||||||
|
<!ELEMENT CLTCOOKIE - o %STRTYPE>
|
||||||
|
<!ELEMENT TAN - o %STRTYPE>
|
||||||
|
|
||||||
|
<!ELEMENT DESC - o %STRTYPE>
|
||||||
|
<!ELEMENT PHONE - o %STRTYPE>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- general error reporting aggregate -->
|
||||||
|
<!ELEMENT STATUS - - (CODE , SEVERITY , MESSAGE?)>
|
||||||
|
|
||||||
|
<!ELEMENT CODE - o %INTTYPE>
|
||||||
|
<!ELEMENT SEVERITY - o %STRTYPE> <!-- TODO: enum? -->
|
||||||
|
<!ELEMENT MESSAGE - o %STRTYPE>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Balance record -->
|
||||||
|
<!ELEMENT BAL - - (NAME , DESC , BALTYPE , VALUE ,
|
||||||
|
DTASOF? , CURRENCY?)>
|
||||||
|
<!ELEMENT BALTYPE - o %STRTYPE> <!-- TODO: enum? -->
|
||||||
|
<!ELEMENT VALUE - o %AMTTYPE>
|
||||||
|
|
||||||
|
|
||||||
|
<!--
|
||||||
|
TRNUID - a UUID that uniquely identifies transactions
|
||||||
|
-->
|
||||||
|
<!ELEMENT TRNUID - o %UUIDTYPE>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Server ID -->
|
||||||
|
<!ELEMENT SRVRTID - o %SRVRIDTYPE>
|
||||||
|
|
||||||
|
<!-- Transaction ID issued by financial institution.This ID is used to detect duplicate downloads -->
|
||||||
|
<!ELEMENT FITID - o %IDTYPE>
|
||||||
|
|
||||||
|
<!-- starting date -->
|
||||||
|
<!ELEMENT DTSTART - o %DTTMTYPE>
|
||||||
|
|
||||||
|
<!-- ending date -->
|
||||||
|
<!ELEMENT DTEND - o %DTTMTYPE>
|
||||||
|
|
||||||
|
<!ELEMENT DTPROFUP - o %DTTMTYPE>
|
||||||
|
<!ELEMENT DTACCTUP - o %DTTMTYPE>
|
||||||
|
|
||||||
|
<!-- Sync-related -->
|
||||||
|
<!ELEMENT TOKENONLY - o %BOOLTYPE>
|
||||||
|
<!ELEMENT TOKEN - o %SRVRIDTYPE>
|
||||||
|
<!ELEMENT REFRESH - o %BOOLTYPE>
|
||||||
|
<!ELEMENT REJECTIFMISSING - o %BOOLTYPE>
|
||||||
|
<!ELEMENT LOSTSYNC - o %BOOLTYPE>
|
||||||
|
|
||||||
|
<!ELEMENT URL - o %URLTYPE>
|
||||||
|
<!ELEMENT INCIMAGES - o %BOOLTYPE>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Name & Address-related fields used in several messages -->
|
||||||
|
|
||||||
|
<!ELEMENT FIRSTNAME - o %STRTYPE>
|
||||||
|
<!ELEMENT MIDDLENAME - o %STRTYPE>
|
||||||
|
<!ELEMENT LASTNAME - o %STRTYPE>
|
||||||
|
|
||||||
|
<!-- Payees address lines (1 or more) -->
|
||||||
|
<!ELEMENT ADDR1 - o %STRTYPE>
|
||||||
|
<!ELEMENT ADDR2 - o %STRTYPE>
|
||||||
|
<!ELEMENT ADDR3 - o %STRTYPE>
|
||||||
|
|
||||||
|
<!-- Payees city -->
|
||||||
|
<!ELEMENT CITY - o %STRTYPE>
|
||||||
|
|
||||||
|
<!-- Payees state -->
|
||||||
|
<!ELEMENT STATE - o %STRTYPE>
|
||||||
|
|
||||||
|
<!-- Zip code -->
|
||||||
|
<!ELEMENT POSTALCODE - o %STRTYPE>
|
||||||
|
|
||||||
|
<!-- Payees country -->
|
||||||
|
<!ELEMENT COUNTRY - o %STRTYPE>
|
||||||
|
|
||||||
|
<!ELEMENT DAYPHONE - o %STRTYPE>
|
||||||
|
<!ELEMENT EVEPHONE - o %STRTYPE>
|
||||||
|
<!ELEMENT EMAIL - o %STRTYPE>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- ============================================================================= -->
|
||||||
|
<!-- Common between banking, billpay and/or investments -->
|
||||||
|
<!-- ============================================================================= -->
|
||||||
|
|
||||||
|
<!-- Bank account -->
|
||||||
|
|
||||||
|
<!ELEMENT (BANKACCTFROM,BANKACCTTO) - - (BANKID , BRANCHID? , ACCTID ,
|
||||||
|
ACCTTYPE , ACCTKEY?)>
|
||||||
|
|
||||||
|
<!-- Credit card account -->
|
||||||
|
|
||||||
|
<!ELEMENT (CCACCTFROM,CCACCTTO) - - (ACCTID , ACCTKEY?)>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Routing & transit number -->
|
||||||
|
<!ELEMENT BANKID - o %IDTYPE>
|
||||||
|
|
||||||
|
<!-- Bank identifier for international banks -->
|
||||||
|
<!ELEMENT BRANCHID - o %IDTYPE>
|
||||||
|
|
||||||
|
<!-- Account number -->
|
||||||
|
<!ELEMENT ACCTID - o %IDTYPE>
|
||||||
|
|
||||||
|
<!-- Type of account. -->
|
||||||
|
<!ELEMENT ACCTTYPE - o %IDTYPE>
|
||||||
|
|
||||||
|
<!-- Checksum for international banks -->
|
||||||
|
<!ELEMENT ACCTKEY - o %IDTYPE>
|
||||||
|
|
||||||
|
<!-- User account number for a merchant -->
|
||||||
|
<!ELEMENT PAYACCT - o %IDTYPE>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
If present, this is the FITID of a previously sent transaction that is corrected by this record.
|
||||||
|
This transaction replaces or deletes the transaction that it corrects.
|
||||||
|
-->
|
||||||
|
<!ELEMENT CORRECTFITID - o %IDTYPE>
|
||||||
|
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Actions can be REPLACE or DELETE.
|
||||||
|
REPLACE replaces the transaction referenced by CORRECTFITID; DELETE deletes it.
|
||||||
|
-->
|
||||||
|
<!ELEMENT CORRECTACTION - o %STRTYPE> <!-- TODO: attribute? -->
|
||||||
|
|
||||||
|
<!-- Payee name or description -->
|
||||||
|
<!ELEMENT NAME - o %STRTYPE>
|
||||||
|
|
||||||
|
<!-- Extra information (not in <NAME>), A-255 -->
|
||||||
|
<!ELEMENT MEMO - o %STRTYPE>
|
||||||
|
|
||||||
|
<!-- Marketing information -->
|
||||||
|
<!ELEMENT MKTGINFO - o %STRTYPE>
|
||||||
|
|
||||||
|
<!-- Include flag -->
|
||||||
|
<!ELEMENT INCLUDE - o (%BOOLTYPE;) >
|
||||||
|
|
||||||
|
|
||||||
|
<!-- ============================================================================= -->
|
||||||
|
<!-- Common amounts -->
|
||||||
|
<!-- ============================================================================= -->
|
||||||
|
|
||||||
|
<!-- Balance amount -->
|
||||||
|
<!ELEMENT BALAMT - o %AMTTYPE>
|
||||||
|
|
||||||
|
<!-- Amount of transaction -->
|
||||||
|
<!ELEMENT TRNAMT - o %AMTTYPE>
|
||||||
|
|
||||||
|
<!-- ============================================================================= -->
|
||||||
|
<!-- Common dates -->
|
||||||
|
<!-- ============================================================================= -->
|
||||||
|
|
||||||
|
<!-- Date funds are available -->
|
||||||
|
<!ELEMENT DTDUE - o %DTTMTYPE>
|
||||||
|
|
||||||
|
<!-- Balance date -->
|
||||||
|
<!ELEMENT DTASOF - o %DTTMTYPE>
|
||||||
|
|
||||||
|
<!-- ============================================================================= -->
|
||||||
|
<!-- Recurring models and instances -->
|
||||||
|
<!-- ============================================================================= -->
|
||||||
|
|
||||||
|
<!-- If the response is generated by a recurring model, this ID references it -->
|
||||||
|
<!ELEMENT RECSRVRTID - o %SRVRIDTYPE>
|
||||||
|
|
||||||
|
<!-- Recurring Instructions aggregate -->
|
||||||
|
<!ELEMENT RECURRINST - - (NINSTS? , FREQ)>
|
||||||
|
|
||||||
|
<!-- Number of instructions. If this tag is omitted, the schedule is open-ended -->
|
||||||
|
<!ELEMENT NINSTS - o %INTTYPE>
|
||||||
|
|
||||||
|
<!-- Frequency -->
|
||||||
|
<!ELEMENT FREQ - o %STRTYPE> <!-- TODO: attribute?? -->
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Modify pending flag, boolean
|
||||||
|
Note: if this flag is set, the server should modify pending as well as future transfers.
|
||||||
|
-->
|
||||||
|
<!ELEMENT MODPENDING - o %BOOLTYPE>
|
||||||
|
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Cancel pending flag, boolean
|
||||||
|
Note: if this flag is set, the server should cancel pending as well as future transfers.
|
||||||
|
-->
|
||||||
|
<!ELEMENT CANPENDING - o %BOOLTYPE>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- International -->
|
||||||
|
<!ELEMENT LANGUAGE - o %STRTYPE> <!-- TODO: enum? -->
|
||||||
|
|
||||||
|
<!ELEMENT (CURRENCY, ORIGCURRENCY) - - (CURRATE , CURSYM)>
|
||||||
|
<!ELEMENT CURSYM - o %STRTYPE>
|
||||||
|
<!ELEMENT CURRATE - o %RATETYPE>
|
||||||
|
<!ELEMENT CURDEF - o %STRTYPE>
|
||||||
|
|
||||||
|
<!-- ============================================================================= -->
|
||||||
|
<!-- Common Profile Stuff -->
|
||||||
|
<!-- ============================================================================= -->
|
||||||
|
|
||||||
|
<!-- Recurring transfers and payments -->
|
||||||
|
|
||||||
|
<!-- Supports recurring -->
|
||||||
|
<!ELEMENT CANRECUR - o %BOOLTYPE>
|
||||||
|
|
||||||
|
<!-- Can modify recurring models -->
|
||||||
|
<!ELEMENT CANMODMDLS - o %BOOLTYPE>
|
||||||
|
|
||||||
|
<!-- Number of days prior to processing that server makes a recurring transaction available to the client -->
|
||||||
|
<!ELEMENT MODELWND - o %INTTYPE>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Day where processing is unavailable (MONDAY, TUESDAY, etc) -->
|
||||||
|
<!ELEMENT PROCDAYSOFF - o %STRTYPE>
|
||||||
|
|
||||||
|
<!-- Cut off time for days's processing TODO: should just be time -->
|
||||||
|
<!ELEMENT PROCENDTM - o %DTTMTYPE>
|
||||||
|
|
||||||
|
]>
|
71
src/experimental/ofx/dtd/ofxprof.dtd
Normal file
71
src/experimental/ofx/dtd/ofxprof.dtd
Normal file
@ -0,0 +1,71 @@
|
|||||||
|
<!--
|
||||||
|
$Revision$
|
||||||
|
$Date$
|
||||||
|
|
||||||
|
Open Financial Exchange DTD - profile module
|
||||||
|
Copyright 1997 CheckFree Corp., Intuit Inc., Microsoft Corp. All rights reserved
|
||||||
|
|
||||||
|
-->
|
||||||
|
|
||||||
|
<!-- Profile message set -->
|
||||||
|
<!ELEMENT PROFMSGSRQV1 - - (PROFTRNRQ+ )>
|
||||||
|
<!ELEMENT PROFMSGSRSV1 - - (PROFTRNRS+ )>
|
||||||
|
|
||||||
|
<!-- Profile entry for message set -->
|
||||||
|
<!ELEMENT PROFMSGSET - - (PROFMSGSETV1)>
|
||||||
|
<!ELEMENT PROFMSGSETV1 - - (MSGSETCORE)>
|
||||||
|
|
||||||
|
<!-- No synchronization in this module -->
|
||||||
|
|
||||||
|
<!-- Transactions -->
|
||||||
|
<!ELEMENT PROFTRNRQ - - (%TRNRQMACRO , PROFRQ)>
|
||||||
|
<!ELEMENT PROFTRNRS - - (%TRNRSMACRO , PROFRS?)>
|
||||||
|
|
||||||
|
<!-- Messages -->
|
||||||
|
|
||||||
|
<!ELEMENT PROFRQ - - (CLIENTROUTING , DTPROFUP)>
|
||||||
|
<!ELEMENT CLIENTROUTING - o %STRTYPE>
|
||||||
|
|
||||||
|
<!ELEMENT PROFRS - - (MSGSETLIST , SIGNONINFOLIST , DTPROFUP,
|
||||||
|
FINAME, ADDR1,ADDR2?,ADDR3?, CITY, STATE, POSTALCODE, COUNTRY,
|
||||||
|
CSPHONE?, TSPHONE?, FAXPHONE?, URL?, EMAIL? )>
|
||||||
|
|
||||||
|
<!ELEMENT FINAME - o %STRTYPE>
|
||||||
|
<!ELEMENT CSPHONE - o %STRTYPE>
|
||||||
|
<!ELEMENT TSPHONE - o %STRTYPE>
|
||||||
|
<!ELEMENT FAXPHONE - o %STRTYPE>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Message List -->
|
||||||
|
<!-- Defined in terms of macro in ofxmain -->
|
||||||
|
<!ELEMENT MSGSETLIST - - ( (%MSGSETMACRO)* )>
|
||||||
|
|
||||||
|
<!-- Message set core info - used by all XXXMSGSETVn -->
|
||||||
|
<!ELEMENT MSGSETCORE - - (VER , URL , OFXSEC ,
|
||||||
|
TRANSPSEC , SIGNONREALM ,
|
||||||
|
LANGUAGE+, SYNCMODE, RESPFILEER, SPNAME? )>
|
||||||
|
|
||||||
|
<!ELEMENT VER - o %INTTYPE>
|
||||||
|
<!ELEMENT OFXSEC - o %INTTYPE>
|
||||||
|
<!ELEMENT TRANSPSEC - o %BOOLTYPE>
|
||||||
|
<!ELEMENT SYNCMODE - o %STRTYPE>
|
||||||
|
<!ELEMENT RESPFILEER - o %BOOLTYPE>
|
||||||
|
<!ELEMENT SPNAME - o %STRTYPE>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Signon realm -->
|
||||||
|
<!ELEMENT SIGNONINFOLIST - - (SIGNONINFO*)>
|
||||||
|
<!ELEMENT SIGNONINFO - - (SIGNONREALM , MIN , MAX ,
|
||||||
|
CHARTYPE , CASESEN ,
|
||||||
|
SPECIAL , SPACES, PINCH, CHGPINFIRST)>
|
||||||
|
|
||||||
|
<!ELEMENT SIGNONREALM - o %STRTYPE>
|
||||||
|
<!ELEMENT MIN - o %INTTYPE>
|
||||||
|
<!ELEMENT MAX - o %INTTYPE>
|
||||||
|
<!ELEMENT CHARTYPE - o %STRTYPE>
|
||||||
|
<!ELEMENT CASESEN - o %BOOLTYPE>
|
||||||
|
<!ELEMENT SPECIAL - o %BOOLTYPE>
|
||||||
|
<!ELEMENT SPACES - o %BOOLTYPE>
|
||||||
|
<!ELEMENT PINCH - o %BOOLTYPE>
|
||||||
|
<!ELEMENT CHGPINFIRST - o %BOOLTYPE>
|
||||||
|
|
61
src/experimental/ofx/dtd/ofxsign.dtd
Normal file
61
src/experimental/ofx/dtd/ofxsign.dtd
Normal file
@ -0,0 +1,61 @@
|
|||||||
|
<!--
|
||||||
|
$Revision$
|
||||||
|
$Date$
|
||||||
|
|
||||||
|
Open Financial Exchange DTD - signon module
|
||||||
|
Copyright 1997 CheckFree Corp., Intuit Inc., Microsoft Corp. All rights reserved
|
||||||
|
|
||||||
|
-->
|
||||||
|
|
||||||
|
<!-- Message set -->
|
||||||
|
<!-- Different from most: only one sonrq and at most one
|
||||||
|
pin change allowed -->
|
||||||
|
<!ELEMENT SIGNONMSGSRQV1 - - (SONRQ , PINCHTRNRQ?, CHALLENGETRNRQ?)>
|
||||||
|
<!ELEMENT SIGNONMSGSRSV1 - - (SONRS , PINCHTRNRS?, CHALLENGETRNRS?)>
|
||||||
|
|
||||||
|
<!-- Signon message set profile entry -->
|
||||||
|
<!ELEMENT SIGNONMSGSET - - (SIGNONMSGSETV1)>
|
||||||
|
<!ELEMENT SIGNONMSGSETV1 - - (MSGSETCORE )>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Transactions -->
|
||||||
|
<!ELEMENT PINCHTRNRQ - - (%TRNRQMACRO , PINCHRQ)>
|
||||||
|
<!ELEMENT CHALLENGETRNRQ - - (%TRNRQMACRO , CHALLENGERQ)>
|
||||||
|
<!ELEMENT PINCHTRNRS - - (%TRNRSMACRO , PINCHRS?)>
|
||||||
|
<!ELEMENT CHALLENGETRNRS - - (%TRNRSMACRO , CHALLENGERS?)>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Signon Request and Response -->
|
||||||
|
|
||||||
|
<!ELEMENT SONRQ - - (DTCLIENT ,
|
||||||
|
((USERID , USERPASS) | USERKEY),
|
||||||
|
GENUSERKEY? , LANGUAGE ,
|
||||||
|
FI? , SESSCOOKIE? , APPID , APPVER)>
|
||||||
|
|
||||||
|
<!ELEMENT FI - - (ORG , FID?)>
|
||||||
|
<!ELEMENT ORG - o %STRTYPE>
|
||||||
|
<!ELEMENT FID - o %STRTYPE>
|
||||||
|
|
||||||
|
<!ELEMENT SESSCOOKIE - o %STRTYPE>
|
||||||
|
|
||||||
|
<!ELEMENT SONRS - - (STATUS , DTSERVER , USERKEY? ,
|
||||||
|
TSKEYEXPIRE? , LANGUAGE ,
|
||||||
|
DTPROFUP? , DTACCTUP? , FI?, SESSCOOKIE?)>
|
||||||
|
|
||||||
|
<!-- Pin Change request and response -->
|
||||||
|
|
||||||
|
<!ELEMENT PINCHRQ - - (USERID , NEWUSERPASS)>
|
||||||
|
|
||||||
|
<!ELEMENT PINCHRS - - (USERID , DTCHANGED?)>
|
||||||
|
|
||||||
|
<!ELEMENT NEWUSERPASS - o %STRTYPE>
|
||||||
|
<!ELEMENT DTCHANGED - o %DTTMTYPE>
|
||||||
|
|
||||||
|
<!-- Challenge request and response -->
|
||||||
|
|
||||||
|
<!ELEMENT CHALLENGERQ - - (USERID, FICERTID?)>
|
||||||
|
|
||||||
|
<!ELEMENT CHALLENGERS - - (USERID , NONCE, FICERTID)>
|
||||||
|
|
||||||
|
<!ELEMENT NONCE - o %STRTYPE>
|
||||||
|
<!ELEMENT FICERTID - o %STRTYPE>
|
1
src/experimental/ofx/explore/.cvsignore
Normal file
1
src/experimental/ofx/explore/.cvsignore
Normal file
@ -0,0 +1 @@
|
|||||||
|
Makefile
|
12
src/experimental/ofx/explore/Makefile.am
Normal file
12
src/experimental/ofx/explore/Makefile.am
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
|
||||||
|
EXTRA_DIST = \
|
||||||
|
.cvsignore \
|
||||||
|
README.OFX \
|
||||||
|
length.cc \
|
||||||
|
parse_error \
|
||||||
|
post2.ofx \
|
||||||
|
reply_post2 \
|
||||||
|
req1 \
|
||||||
|
req1_orig \
|
||||||
|
req5 \
|
||||||
|
req7
|
228
src/experimental/ofx/explore/Makefile.in
Normal file
228
src/experimental/ofx/explore/Makefile.in
Normal file
@ -0,0 +1,228 @@
|
|||||||
|
# Makefile.in generated automatically by automake 1.4 from Makefile.am
|
||||||
|
|
||||||
|
# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
|
||||||
|
# This Makefile.in is free software; the Free Software Foundation
|
||||||
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
|
# with or without modifications, as long as this notice is preserved.
|
||||||
|
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||||
|
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||||
|
# PARTICULAR PURPOSE.
|
||||||
|
|
||||||
|
|
||||||
|
SHELL = @SHELL@
|
||||||
|
|
||||||
|
srcdir = @srcdir@
|
||||||
|
top_srcdir = @top_srcdir@
|
||||||
|
VPATH = @srcdir@
|
||||||
|
prefix = @prefix@
|
||||||
|
exec_prefix = @exec_prefix@
|
||||||
|
|
||||||
|
bindir = @bindir@
|
||||||
|
sbindir = @sbindir@
|
||||||
|
libexecdir = @libexecdir@
|
||||||
|
datadir = @datadir@
|
||||||
|
sysconfdir = @sysconfdir@
|
||||||
|
sharedstatedir = @sharedstatedir@
|
||||||
|
localstatedir = @localstatedir@
|
||||||
|
libdir = @libdir@
|
||||||
|
infodir = @infodir@
|
||||||
|
mandir = @mandir@
|
||||||
|
includedir = @includedir@
|
||||||
|
oldincludedir = /usr/include
|
||||||
|
|
||||||
|
DESTDIR =
|
||||||
|
|
||||||
|
pkgdatadir = $(datadir)/@PACKAGE@
|
||||||
|
pkglibdir = $(libdir)/@PACKAGE@
|
||||||
|
pkgincludedir = $(includedir)/@PACKAGE@
|
||||||
|
|
||||||
|
top_builddir = ../../../..
|
||||||
|
|
||||||
|
ACLOCAL = @ACLOCAL@
|
||||||
|
AUTOCONF = @AUTOCONF@
|
||||||
|
AUTOMAKE = @AUTOMAKE@
|
||||||
|
AUTOHEADER = @AUTOHEADER@
|
||||||
|
|
||||||
|
INSTALL = @INSTALL@
|
||||||
|
INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
|
||||||
|
INSTALL_DATA = @INSTALL_DATA@
|
||||||
|
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||||
|
transform = @program_transform_name@
|
||||||
|
|
||||||
|
NORMAL_INSTALL = :
|
||||||
|
PRE_INSTALL = :
|
||||||
|
POST_INSTALL = :
|
||||||
|
NORMAL_UNINSTALL = :
|
||||||
|
PRE_UNINSTALL = :
|
||||||
|
POST_UNINSTALL = :
|
||||||
|
host_alias = @host_alias@
|
||||||
|
host_triplet = @host@
|
||||||
|
AS = @AS@
|
||||||
|
CATALOGS = @CATALOGS@
|
||||||
|
CATOBJEXT = @CATOBJEXT@
|
||||||
|
CC = @CC@
|
||||||
|
DATADIRNAME = @DATADIRNAME@
|
||||||
|
DLLTOOL = @DLLTOOL@
|
||||||
|
GENCAT = @GENCAT@
|
||||||
|
GLIB_CFLAGS = @GLIB_CFLAGS@
|
||||||
|
GLIB_CONFIG_BIN = @GLIB_CONFIG_BIN@
|
||||||
|
GLIB_LIBS = @GLIB_LIBS@
|
||||||
|
GMOFILES = @GMOFILES@
|
||||||
|
GMSGFMT = @GMSGFMT@
|
||||||
|
GNC_CONFIGDIR = @GNC_CONFIGDIR@
|
||||||
|
GNC_DOC_INSTALL_DIR = @GNC_DOC_INSTALL_DIR@
|
||||||
|
GNC_LIBDIR = @GNC_LIBDIR@
|
||||||
|
GNC_SCM_INSTALL_DIR = @GNC_SCM_INSTALL_DIR@
|
||||||
|
GNC_SHAREDIR = @GNC_SHAREDIR@
|
||||||
|
GNOME_CFLAGS = @GNOME_CFLAGS@
|
||||||
|
GNOME_CONFIG_BIN = @GNOME_CONFIG_BIN@
|
||||||
|
GNOME_LIBS = @GNOME_LIBS@
|
||||||
|
GNOME_STATIC_TARGET = @GNOME_STATIC_TARGET@
|
||||||
|
GNOME_TARGET = @GNOME_TARGET@
|
||||||
|
GTK_XMHTML = @GTK_XMHTML@
|
||||||
|
GT_NO = @GT_NO@
|
||||||
|
GT_YES = @GT_YES@
|
||||||
|
GUILE = @GUILE@
|
||||||
|
GUILE_COMPILE_ARGS = @GUILE_COMPILE_ARGS@
|
||||||
|
GUILE_CONFIG = @GUILE_CONFIG@
|
||||||
|
GUILE_LINK_ARGS = @GUILE_LINK_ARGS@
|
||||||
|
G_WRAP = @G_WRAP@
|
||||||
|
G_WRAP_COMPILE_ARGS = @G_WRAP_COMPILE_ARGS@
|
||||||
|
G_WRAP_CONFIG = @G_WRAP_CONFIG@
|
||||||
|
G_WRAP_LINK_ARGS = @G_WRAP_LINK_ARGS@
|
||||||
|
INCLUDE_LOCALE_H = @INCLUDE_LOCALE_H@
|
||||||
|
INSTOBJEXT = @INSTOBJEXT@
|
||||||
|
INTLDEPS = @INTLDEPS@
|
||||||
|
INTLLIBS = @INTLLIBS@
|
||||||
|
INTLOBJS = @INTLOBJS@
|
||||||
|
LIBTOOL = @LIBTOOL@
|
||||||
|
LN_S = @LN_S@
|
||||||
|
LOCALE_DIR = @LOCALE_DIR@
|
||||||
|
MAKEINFO = @MAKEINFO@
|
||||||
|
MKINSTALLDIRS = @MKINSTALLDIRS@
|
||||||
|
MSGFMT = @MSGFMT@
|
||||||
|
OBJDUMP = @OBJDUMP@
|
||||||
|
PACKAGE = @PACKAGE@
|
||||||
|
PERL = @PERL@
|
||||||
|
PERLINCL = @PERLINCL@
|
||||||
|
POFILES = @POFILES@
|
||||||
|
POSUB = @POSUB@
|
||||||
|
RANLIB = @RANLIB@
|
||||||
|
SWIG = @SWIG@
|
||||||
|
USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
|
||||||
|
USE_NLS = @USE_NLS@
|
||||||
|
VERSION = @VERSION@
|
||||||
|
l = @l@
|
||||||
|
|
||||||
|
EXTRA_DIST = .cvsignore README.OFX length.cc parse_error post2.ofx reply_post2 req1 req1_orig req5 req7
|
||||||
|
|
||||||
|
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
|
||||||
|
CONFIG_HEADER = ../../../../config.h
|
||||||
|
CONFIG_CLEAN_FILES =
|
||||||
|
DIST_COMMON = Makefile.am Makefile.in
|
||||||
|
|
||||||
|
|
||||||
|
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
|
||||||
|
|
||||||
|
TAR = gtar
|
||||||
|
GZIP_ENV = --best
|
||||||
|
all: all-redirect
|
||||||
|
.SUFFIXES:
|
||||||
|
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
|
||||||
|
cd $(top_srcdir) && $(AUTOMAKE) --gnu src/experimental/ofx/explore/Makefile
|
||||||
|
|
||||||
|
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES)
|
||||||
|
cd $(top_builddir) \
|
||||||
|
&& CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
|
||||||
|
|
||||||
|
tags: TAGS
|
||||||
|
TAGS:
|
||||||
|
|
||||||
|
|
||||||
|
distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
|
||||||
|
|
||||||
|
subdir = src/experimental/ofx/explore
|
||||||
|
|
||||||
|
distdir: $(DISTFILES)
|
||||||
|
here=`cd $(top_builddir) && pwd`; \
|
||||||
|
top_distdir=`cd $(top_distdir) && pwd`; \
|
||||||
|
distdir=`cd $(distdir) && pwd`; \
|
||||||
|
cd $(top_srcdir) \
|
||||||
|
&& $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnu src/experimental/ofx/explore/Makefile
|
||||||
|
@for file in $(DISTFILES); do \
|
||||||
|
d=$(srcdir); \
|
||||||
|
if test -d $$d/$$file; then \
|
||||||
|
cp -pr $$d/$$file $(distdir)/$$file; \
|
||||||
|
else \
|
||||||
|
test -f $(distdir)/$$file \
|
||||||
|
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \
|
||||||
|
|| cp -p $$d/$$file $(distdir)/$$file || :; \
|
||||||
|
fi; \
|
||||||
|
done
|
||||||
|
info-am:
|
||||||
|
info: info-am
|
||||||
|
dvi-am:
|
||||||
|
dvi: dvi-am
|
||||||
|
check-am: all-am
|
||||||
|
check: check-am
|
||||||
|
installcheck-am:
|
||||||
|
installcheck: installcheck-am
|
||||||
|
install-exec-am:
|
||||||
|
install-exec: install-exec-am
|
||||||
|
|
||||||
|
install-data-am:
|
||||||
|
install-data: install-data-am
|
||||||
|
|
||||||
|
install-am: all-am
|
||||||
|
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||||
|
install: install-am
|
||||||
|
uninstall-am:
|
||||||
|
uninstall: uninstall-am
|
||||||
|
all-am: Makefile
|
||||||
|
all-redirect: all-am
|
||||||
|
install-strip:
|
||||||
|
$(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
|
||||||
|
installdirs:
|
||||||
|
|
||||||
|
|
||||||
|
mostlyclean-generic:
|
||||||
|
|
||||||
|
clean-generic:
|
||||||
|
|
||||||
|
distclean-generic:
|
||||||
|
-rm -f Makefile $(CONFIG_CLEAN_FILES)
|
||||||
|
-rm -f config.cache config.log stamp-h stamp-h[0-9]*
|
||||||
|
|
||||||
|
maintainer-clean-generic:
|
||||||
|
mostlyclean-am: mostlyclean-generic
|
||||||
|
|
||||||
|
mostlyclean: mostlyclean-am
|
||||||
|
|
||||||
|
clean-am: clean-generic mostlyclean-am
|
||||||
|
|
||||||
|
clean: clean-am
|
||||||
|
|
||||||
|
distclean-am: distclean-generic clean-am
|
||||||
|
-rm -f libtool
|
||||||
|
|
||||||
|
distclean: distclean-am
|
||||||
|
|
||||||
|
maintainer-clean-am: maintainer-clean-generic distclean-am
|
||||||
|
@echo "This command is intended for maintainers to use;"
|
||||||
|
@echo "it deletes files that may require special tools to rebuild."
|
||||||
|
|
||||||
|
maintainer-clean: maintainer-clean-am
|
||||||
|
|
||||||
|
.PHONY: tags distdir info-am info dvi-am dvi check check-am \
|
||||||
|
installcheck-am installcheck install-exec-am install-exec \
|
||||||
|
install-data-am install-data install-am install uninstall-am uninstall \
|
||||||
|
all-redirect all-am all installdirs mostlyclean-generic \
|
||||||
|
distclean-generic clean-generic maintainer-clean-generic clean \
|
||||||
|
mostlyclean distclean maintainer-clean
|
||||||
|
|
||||||
|
|
||||||
|
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||||
|
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||||
|
.NOEXPORT:
|
76
src/experimental/ofx/explore/README.OFX
Normal file
76
src/experimental/ofx/explore/README.OFX
Normal file
@ -0,0 +1,76 @@
|
|||||||
|
|
||||||
|
some notes about the OFX test implementation for GNUCash.
|
||||||
|
---------------------------------------------------------
|
||||||
|
|
||||||
|
Ueli Rutishauser (urutishauser@bigfoot.com ) / 10.4.1998
|
||||||
|
|
||||||
|
All the following informationen depends on version 1.5 and 1.0.2 of the
|
||||||
|
Open Financial Exchange Specification (OFX).
|
||||||
|
|
||||||
|
version notes
|
||||||
|
-------------
|
||||||
|
|
||||||
|
The actual OFXHEADER Version is 1.00 (100)
|
||||||
|
|
||||||
|
The actual OFXSGML DTD Version is 1.02 (102)
|
||||||
|
|
||||||
|
|
||||||
|
urlget
|
||||||
|
------
|
||||||
|
|
||||||
|
urlget -i -v http://localhost/
|
||||||
|
|
||||||
|
urlget -i -v https://swww.etrade.com/
|
||||||
|
|
||||||
|
urlget -i -v -T post2.ofx https://ofx.etrade.com/cgi-ofx/etradeofx/
|
||||||
|
|
||||||
|
anonymous login
|
||||||
|
---------------
|
||||||
|
|
||||||
|
to login anonymous, USERID and/or USERPASS must be set to anonymous
|
||||||
|
followed by 23 zeros.
|
||||||
|
|
||||||
|
|
||||||
|
BROKERID
|
||||||
|
--------
|
||||||
|
|
||||||
|
BROKERID (page 102 and 256) must set to the domain of the broker eg. etrade.com
|
||||||
|
|
||||||
|
general notes
|
||||||
|
-------------
|
||||||
|
|
||||||
|
-OFX-Files cannot contain comments (<-- not allowed)
|
||||||
|
-All Tags must be written Uppercase (<OFX> not <ofx>)
|
||||||
|
|
||||||
|
test files
|
||||||
|
----------
|
||||||
|
|
||||||
|
req1_orig Original Request for Investement Statements download (with comments)
|
||||||
|
|
||||||
|
req1 ready to send request for a "Investement Statement download"
|
||||||
|
get1 response of such a request (not yet available)
|
||||||
|
|
||||||
|
req5 login anonymous
|
||||||
|
get5 result of a anonymous login (not yet available)
|
||||||
|
|
||||||
|
req6 login anonymous/get FI profile
|
||||||
|
get6 result of a anonymous login with a profile request
|
||||||
|
|
||||||
|
req7 Request for a "Investement Statement download"
|
||||||
|
reply_req7 response when a false Account-ID is provided
|
||||||
|
reply_req7_2 regular response
|
||||||
|
|
||||||
|
post4.ofx login
|
||||||
|
reply_post4 response to a valid login request
|
||||||
|
|
||||||
|
PLEASE: do not test this examples with any OFX-server when you not
|
||||||
|
really develop on the OFX-part. We have only one working OFX URL at the
|
||||||
|
moment...
|
||||||
|
|
||||||
|
programs/code
|
||||||
|
-------------
|
||||||
|
|
||||||
|
length the program length calculates the length (Content-Length) for the
|
||||||
|
HTTP Header of a file.
|
||||||
|
|
||||||
|
|
51
src/experimental/ofx/explore/length.cc
Normal file
51
src/experimental/ofx/explore/length.cc
Normal file
@ -0,0 +1,51 @@
|
|||||||
|
/* this little program calculate the content-length for a HTTP-POST
|
||||||
|
Statement. Count begins not until the first OFX (uppercase) occures.
|
||||||
|
|
||||||
|
Copyright (c) 1998 by Ueli Rutishauser
|
||||||
|
GPL'ed
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <iostream.h>
|
||||||
|
#include <fstream.h>
|
||||||
|
|
||||||
|
void main( int argc, char **argv)
|
||||||
|
{
|
||||||
|
char character;
|
||||||
|
int input_length=0, count=0, input_alphnum=0, O_yes=0, F_yes=0, X_yes=0;
|
||||||
|
|
||||||
|
cout << "This program calculates the field content-length for a HTTP Header. Counting begins after the first occurens of the string OFX (uppercase)" << endl;
|
||||||
|
|
||||||
|
if ( argc < 2)
|
||||||
|
cout << "error - no command line argument given" << endl;
|
||||||
|
|
||||||
|
|
||||||
|
cout << "use " << argv[1] << endl;
|
||||||
|
ifstream input(argv[1],ios::in);
|
||||||
|
|
||||||
|
if (!input)
|
||||||
|
cout << "error open input file" << endl;
|
||||||
|
else
|
||||||
|
{
|
||||||
|
while (input.get(character))
|
||||||
|
{
|
||||||
|
//cout << character;
|
||||||
|
if (character == 'O')
|
||||||
|
O_yes++;
|
||||||
|
if (character == 'F' && O_yes > 0)
|
||||||
|
F_yes++;
|
||||||
|
if (character == 'X' && O_yes > 0 && F_yes)
|
||||||
|
X_yes++;
|
||||||
|
|
||||||
|
if (X_yes>0)
|
||||||
|
input_length++;
|
||||||
|
}
|
||||||
|
|
||||||
|
input_length += 2; //add OF
|
||||||
|
|
||||||
|
input.close();
|
||||||
|
|
||||||
|
cout << "content-length of this file is (dec)" << dec << input_length << endl;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
7
src/experimental/ofx/explore/parse_error
Normal file
7
src/experimental/ofx/explore/parse_error
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
up result 0
|
||||||
|
HTTP/1.0 400 OFX Request Parsing Error
|
||||||
|
Server: Netscape-Enterprise/2.01
|
||||||
|
Date: Fri, 10 Apr 1998 18:26:55 GMT
|
||||||
|
Content-type: application/x-ofx
|
||||||
|
|
||||||
|
down result 0 1901
|
29
src/experimental/ofx/explore/post2.ofx
Normal file
29
src/experimental/ofx/explore/post2.ofx
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
POST /cgi-ofx/etradeofx HTTP/1.0
|
||||||
|
User-Agent: MyApp 5.0
|
||||||
|
Content-Type: application/x-ofx
|
||||||
|
Content-Length: 298
|
||||||
|
|
||||||
|
OFXHEADER:100
|
||||||
|
DATA:OFXSGML
|
||||||
|
VERSION:102
|
||||||
|
SECURITY:TYPE1
|
||||||
|
ENCODING:USASCII
|
||||||
|
|
||||||
|
<OFX>
|
||||||
|
<SIGNONMSGSRQV1>
|
||||||
|
<SONRQ>
|
||||||
|
<DTCLIENT>19980410083500
|
||||||
|
</DTCLIENT>
|
||||||
|
<USERID>xxxxxx
|
||||||
|
</USERID>
|
||||||
|
<USERPASS>xxxxxx
|
||||||
|
</USERPASS>
|
||||||
|
<LANGUAGE>ENG
|
||||||
|
</LANGUAGE>
|
||||||
|
<APPID>MyApp
|
||||||
|
</APPID>
|
||||||
|
<APPVER>0500
|
||||||
|
</APPVER>
|
||||||
|
</SONRQ>
|
||||||
|
</SIGNONMSGSRQV1>
|
||||||
|
</OFX>
|
26
src/experimental/ofx/explore/reply_post2
Normal file
26
src/experimental/ofx/explore/reply_post2
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
up result 0
|
||||||
|
HTTP/1.0 200 OK
|
||||||
|
Server: Netscape-Enterprise/2.01
|
||||||
|
Date: Sat, 11 Apr 1998 12:44:11 GMT
|
||||||
|
Content-type: application/x-ofx
|
||||||
|
|
||||||
|
OFXHEADER:100
|
||||||
|
DATA:OFXSGML
|
||||||
|
VERSION:102
|
||||||
|
SECURITY:NONE
|
||||||
|
ENCODING:USASCII
|
||||||
|
|
||||||
|
<OFX>
|
||||||
|
<SIGNONMSGSRSV1>
|
||||||
|
<SONRS>
|
||||||
|
<STATUS>
|
||||||
|
<CODE>0
|
||||||
|
<SEVERITY>INFO
|
||||||
|
</STATUS>
|
||||||
|
<DTSERVER>19980411124411.000
|
||||||
|
<LANGUAGE>ENG
|
||||||
|
<DTPROFUP>19971105140000
|
||||||
|
</SONRS>
|
||||||
|
</SIGNONMSGSRSV1>
|
||||||
|
</OFX>
|
||||||
|
down result 0 2024
|
43
src/experimental/ofx/explore/req1
Normal file
43
src/experimental/ofx/explore/req1
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
POST /cgi-ofx/etradeofx HTTP/1.0
|
||||||
|
User-Agent: MyApp 5.0
|
||||||
|
Content-Type: application/x-ofx
|
||||||
|
Content-Length: 537
|
||||||
|
|
||||||
|
OFXHEADER:100
|
||||||
|
DATA:OFXSGML
|
||||||
|
VERSION:102
|
||||||
|
SECURITY:TYPE1
|
||||||
|
ENCODING:USASCII
|
||||||
|
|
||||||
|
<OFX>
|
||||||
|
<SIGNONMSGSRQV1>
|
||||||
|
<SONRQ>
|
||||||
|
<DTCLIENT>19980410101000
|
||||||
|
<USERID>FW5853
|
||||||
|
<USERPASS>xxxxx
|
||||||
|
<LANGUAGE>ENG
|
||||||
|
<APPID>GNUCash_OFX
|
||||||
|
<APPVER>0001
|
||||||
|
</SONRQ>
|
||||||
|
</SIGNONMSGSRQV1>
|
||||||
|
<INVSTMTMSGSRQV1>
|
||||||
|
<INVSTMTTRNRQ>
|
||||||
|
<TRNUID>1001
|
||||||
|
<INVSTMTRQ>
|
||||||
|
<INVACCTFROM>
|
||||||
|
<BROKERID>etrade.com
|
||||||
|
<ACCTID>5853
|
||||||
|
</INVACCTFROM>
|
||||||
|
<INCTRAN>
|
||||||
|
<DTSTART>19970824130105
|
||||||
|
<INCLUDE>Y
|
||||||
|
</INCTRAN>
|
||||||
|
<INCOO>Y
|
||||||
|
<INCPOS>
|
||||||
|
<INCLUDE>Y
|
||||||
|
</INCPOS>
|
||||||
|
<INCBAL>Y
|
||||||
|
</INVSTMTRQ>
|
||||||
|
</INVSTMTTRNRQ>
|
||||||
|
</INVSTMTMSGSRQV1>
|
||||||
|
</OFX>
|
33
src/experimental/ofx/explore/req1_orig
Normal file
33
src/experimental/ofx/explore/req1_orig
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
<OFX> <!--Beginning of request data-->
|
||||||
|
<SIGNONMSGSRQV1>
|
||||||
|
<SONRQ> <!--Beginning of signon-->
|
||||||
|
<DTCLIENT>19980410101000 <!--Datetime, 8/28/96, 10:10:00 am-->
|
||||||
|
<USERID>FW5853 <!--User ID (e.g. SSN) -->
|
||||||
|
<USERPASS>xxxxx <!--Password(SSL encrypts whole) -->
|
||||||
|
<LANGUAGE>ENG <!--Use English for the response -->
|
||||||
|
<APPID>GNUCash OFX Test <!--Client application ID-->
|
||||||
|
<APPVER>0001 <!--Version 5.0-->
|
||||||
|
</SONRQ> <!--End of signon-->
|
||||||
|
</SIGNONMSGSRQV1>
|
||||||
|
<INVSTMTMSGSRQV1>
|
||||||
|
<INVSTMTTRNRQ> <!--First request in file-->
|
||||||
|
<TRNUID>1001 <!--Unique ID for this request-->
|
||||||
|
<INVSTMTRQ> <!--Beginning of statement download-->
|
||||||
|
<INVACCTFROM> <!--Identify the account: -->
|
||||||
|
<BROKERID>etrade.com <!--FI ID-->
|
||||||
|
<ACCTID>5853 <!--Account number-->
|
||||||
|
</INVACCTFROM> <!--End of account ID-->
|
||||||
|
<INCTRAN> <!--Request transactions-->
|
||||||
|
<DTSTART>19970824130105 <!--Send transactions posted after-->
|
||||||
|
<!--Aug 24, 1996 1:01:05pm-->
|
||||||
|
<INCLUDE>Y <!--Include transactions -->
|
||||||
|
</INCTRAN>
|
||||||
|
<INCOO>Y <!--Include open orders in response-->
|
||||||
|
<INCPOS> <!--Request positions -->
|
||||||
|
<INCLUDE>Y <!--Include current positions -->
|
||||||
|
</INCPOS>
|
||||||
|
<INCBAL>Y <!--Include balances in request-->
|
||||||
|
</INVSTMTRQ>
|
||||||
|
</INVSTMTTRNRQ> <!--End of first request-->
|
||||||
|
</INVSTMTMSGSRQV1>
|
||||||
|
</OFX> <!--End of Open Financial Exchangerequest data-->
|
23
src/experimental/ofx/explore/req5
Normal file
23
src/experimental/ofx/explore/req5
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
POST /cgi-ofx/etradeofx HTTP/1.0
|
||||||
|
User-Agent: MyApp 5.0
|
||||||
|
Content-Type: application/x-ofx
|
||||||
|
Content-Length: 288
|
||||||
|
|
||||||
|
OFXHEADER:100
|
||||||
|
DATA:OFXSGML
|
||||||
|
VERSION:102
|
||||||
|
SECURITY:TYPE1
|
||||||
|
ENCODING:USASCII
|
||||||
|
|
||||||
|
<OFX>
|
||||||
|
<SIGNONMSGSRQV1>
|
||||||
|
<SONRQ>
|
||||||
|
<DTCLIENT>19980410093500
|
||||||
|
<USERID>anonymous00000000000000000000000
|
||||||
|
<USERPASS>anonymous00000000000000000000000
|
||||||
|
<LANGUAGE>ENG
|
||||||
|
<APPID>GNUCash
|
||||||
|
<APPVER>0001
|
||||||
|
</SONRQ>
|
||||||
|
</SIGNONMSGSRQV1>
|
||||||
|
</OFX>
|
57
src/experimental/ofx/explore/req7
Normal file
57
src/experimental/ofx/explore/req7
Normal file
@ -0,0 +1,57 @@
|
|||||||
|
POST /cgi-ofx/etradeofx HTTP/1.0
|
||||||
|
User-Agent: MyApp 5.0
|
||||||
|
Content-Type: application/x-ofx
|
||||||
|
Content-Length: 692
|
||||||
|
|
||||||
|
OFXHEADER:100
|
||||||
|
DATA:OFXSGML
|
||||||
|
VERSION:102
|
||||||
|
SECURITY:TYPE1
|
||||||
|
ENCODING:USASCII
|
||||||
|
|
||||||
|
<OFX>
|
||||||
|
<SIGNONMSGSRQV1>
|
||||||
|
<SONRQ>
|
||||||
|
<DTCLIENT>19980411101000
|
||||||
|
</DTCLIENT>
|
||||||
|
<USERID>xxxxxx
|
||||||
|
</USERID>
|
||||||
|
<USERPASS>xxxxxx
|
||||||
|
</USERPASS>
|
||||||
|
<LANGUAGE>ENG
|
||||||
|
</LANGUAGE>
|
||||||
|
<APPID>GNUCash_OFX
|
||||||
|
</APPID>
|
||||||
|
<APPVER>0001
|
||||||
|
</APPVER>
|
||||||
|
</SONRQ>
|
||||||
|
</SIGNONMSGSRQV1>
|
||||||
|
<INVSTMTMSGSRQV1>
|
||||||
|
<INVSTMTTRNRQ>
|
||||||
|
<TRNUID>1001
|
||||||
|
</TRNUID>
|
||||||
|
<INVSTMTRQ>
|
||||||
|
<INVACCTFROM>
|
||||||
|
<BROKERID>etrade.com
|
||||||
|
</BROKERID>
|
||||||
|
<ACCTID>xxxx-xxxx
|
||||||
|
</ACCTID>
|
||||||
|
</INVACCTFROM>
|
||||||
|
<INCTRAN>
|
||||||
|
<DTSTART>19970824130105
|
||||||
|
</DTSTART>
|
||||||
|
<INCLUDE>Y
|
||||||
|
</INCLUDE>
|
||||||
|
</INCTRAN>
|
||||||
|
<INCOO>Y
|
||||||
|
</INCOO>
|
||||||
|
<INCPOS>
|
||||||
|
<INCLUDE>Y
|
||||||
|
</INCLUDE>
|
||||||
|
</INCPOS>
|
||||||
|
<INCBAL>Y
|
||||||
|
</INCBAL>
|
||||||
|
</INVSTMTRQ>
|
||||||
|
</INVSTMTTRNRQ>
|
||||||
|
</INVSTMTMSGSRQV1>
|
||||||
|
</OFX>
|
82
src/experimental/ofx/ofx-dtd-idl.txt
Normal file
82
src/experimental/ofx/ofx-dtd-idl.txt
Normal file
@ -0,0 +1,82 @@
|
|||||||
|
|
||||||
|
I have this nutty idea that maybe SGML/XML DTD's can be used as a
|
||||||
|
kind-of corba-like IDL of sorts. Has anyone pondered this, or know
|
||||||
|
of any resources?
|
||||||
|
|
||||||
|
----------
|
||||||
|
|
||||||
|
To be concrete, here's an example:
|
||||||
|
OFX (Open Financial Exchange) defines some SGML DTD's that describe a
|
||||||
|
document that contains financial data. An OFX document would look
|
||||||
|
vaguely like this:
|
||||||
|
|
||||||
|
<transaction>
|
||||||
|
<date>March 10, 1998</date>
|
||||||
|
<amount>$300.00</amount>
|
||||||
|
<description>Buy new microwave oven</description>
|
||||||
|
</transaction>
|
||||||
|
|
||||||
|
Quicken and bank web sites send these things to each other to do on-line
|
||||||
|
banking.
|
||||||
|
|
||||||
|
I am involved in a project to create a GPL'ed Quicken look-alike /
|
||||||
|
work-alike personal-finance package. Currently, our C++ classes
|
||||||
|
look vaguely like:
|
||||||
|
|
||||||
|
class Transaction {
|
||||||
|
public:
|
||||||
|
void SetDate (time_t date);
|
||||||
|
time_t GetDate (void);
|
||||||
|
void SetAmount (double amt);
|
||||||
|
double GetAmount (void);
|
||||||
|
void SetDescription (char *);
|
||||||
|
char * GetDescription (void);
|
||||||
|
private:
|
||||||
|
time_t date;
|
||||||
|
double amount;
|
||||||
|
char * description;
|
||||||
|
};
|
||||||
|
|
||||||
|
Lists of transactions form an account, etc.
|
||||||
|
|
||||||
|
I hope it is now obvious to the casual reader that our in-memory layout
|
||||||
|
of accounts and transactions vaguely resembles the ASCII layout of an
|
||||||
|
OFX document. In order to provide on-line banking features in our app,
|
||||||
|
I'd like to get the in-memory layout resemble the ofx document as much
|
||||||
|
as possible. Thus, the obvious should now be obvious:
|
||||||
|
|
||||||
|
Are there any packages that can
|
||||||
|
(a) take SGML/XML DTD's and turn them into C/C++ structs/classes?
|
||||||
|
(b) parse the incoming text document, and build the corresponding
|
||||||
|
C/C++ linked-lists/trees in memory?
|
||||||
|
|
||||||
|
---------------------------------------------------------------
|
||||||
|
|
||||||
|
More specifically, given the DTD
|
||||||
|
|
||||||
|
<!ELEMENT transaction - - (date, amount, description) >
|
||||||
|
<!ELEMENT date - - %datetype >
|
||||||
|
<!ELEMENT amount - - %numerictype >
|
||||||
|
<!ELEMENT description - - %stringtype >
|
||||||
|
|
||||||
|
I want something that will read this, and *automatically* spit out the
|
||||||
|
following ascii stream:
|
||||||
|
|
||||||
|
class Transaction {
|
||||||
|
time_t date;
|
||||||
|
double amount;
|
||||||
|
char * description;
|
||||||
|
};
|
||||||
|
|
||||||
|
---------------------------------------------------------------
|
||||||
|
James Clark's SGML/Parser (SP) http://www.jclark.com/sp/index.htm
|
||||||
|
Jade
|
||||||
|
|
||||||
|
dssslist@mulberrytech.com
|
||||||
|
|
||||||
|
--------------------------------------------------------------
|
||||||
|
--linas
|
||||||
|
|
||||||
|
10 March 1998
|
||||||
|
|
||||||
|
|
3291
src/experimental/ofx/ofx1.5.0.10.dtd
Normal file
3291
src/experimental/ofx/ofx1.5.0.10.dtd
Normal file
File diff suppressed because it is too large
Load Diff
1
src/experimental/ofx/parser/.cvsignore
Normal file
1
src/experimental/ofx/parser/.cvsignore
Normal file
@ -0,0 +1 @@
|
|||||||
|
Makefile
|
341
src/experimental/ofx/parser/DtdParser.C
Normal file
341
src/experimental/ofx/parser/DtdParser.C
Normal file
@ -0,0 +1,341 @@
|
|||||||
|
// $Id$
|
||||||
|
// Copyright (C) 1997 ISOGEN International Corp. and TechnoTeacher, Inc.
|
||||||
|
// All Rights Reserved.
|
||||||
|
//
|
||||||
|
// <Restrictions>
|
||||||
|
// This file and its associated materials are copyrighted material of
|
||||||
|
// ISOGEN International Corp. (ISOGEN) and TechnoTeacher,
|
||||||
|
// Inc. (TechnoTeacher). License to copy and use this file and its
|
||||||
|
// associated materials is granted to everyone, free of charge, with
|
||||||
|
// the following restrictions: (1) The ISOGEN and TechnoTeacher
|
||||||
|
// copyright statement must be maintained in any copies. (2) New
|
||||||
|
// materials derived from these materials must indicate their source,
|
||||||
|
// including references to the ISOGEN and TechnoTeacher web sites
|
||||||
|
// (www.isogen.com and www.techno.com). (3) These materials may not be
|
||||||
|
// sold in any form without the express written permission of ISOGEN
|
||||||
|
// and TechnoTeacher. [However, feel free to sell things you create
|
||||||
|
// from these materials as long as the things you create are truly
|
||||||
|
// different in function--we want to encourage people to learn from
|
||||||
|
// these materials and benefit from having learned--we just don't want
|
||||||
|
// others to sell what we're giving away.]
|
||||||
|
// </Restrictions>
|
||||||
|
|
||||||
|
#include "config.h"
|
||||||
|
#include "DtdParser.h"
|
||||||
|
|
||||||
|
#include "macros.h"
|
||||||
|
#include "sptchar.h"
|
||||||
|
#include "CodingSystemKit.h"
|
||||||
|
|
||||||
|
#include "PosixStorage.h"
|
||||||
|
#ifdef SP_WININET
|
||||||
|
#include "WinInetStorage.h"
|
||||||
|
#else
|
||||||
|
#include "URLStorage.h"
|
||||||
|
#endif
|
||||||
|
#include "LiteralStorage.h"
|
||||||
|
#include "NotationStorage.h"
|
||||||
|
#include "ExtendEntityManager.h"
|
||||||
|
#include "SOEntityCatalog.h"
|
||||||
|
|
||||||
|
#include "ErrorCountEventHandler.h"
|
||||||
|
|
||||||
|
#ifndef SP_DEFAULT_ENCODING
|
||||||
|
#ifdef WIN32
|
||||||
|
#define SP_DEFAULT_ENCODING SP_T("WINDOWS")
|
||||||
|
#else
|
||||||
|
#define SP_DEFAULT_ENCODING SP_T("IS8859-1")
|
||||||
|
#endif
|
||||||
|
#endif /* not SP_DEFAULT_ENCODING */
|
||||||
|
|
||||||
|
#ifndef SGML_SEARCH_PATH_DEFAULT
|
||||||
|
#define SGML_SEARCH_PATH_DEFAULT SP_T("")
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef SGML_CATALOG_FILES_DEFAULT
|
||||||
|
#define SGML_CATALOG_FILES_DEFAULT SP_T("")
|
||||||
|
#endif /* not SGML_CATALOG_FILES_DEFAULT */
|
||||||
|
|
||||||
|
#ifdef SP_NAMESPACE
|
||||||
|
namespace SP_NAMESPACE {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef SP_MSDOS_FILENAMES
|
||||||
|
const Char FILE_SEP = ';';
|
||||||
|
#else
|
||||||
|
const Char FILE_SEP = ':';
|
||||||
|
#endif
|
||||||
|
|
||||||
|
DtdParser::
|
||||||
|
DtdParser( const char * requiredInternalCode)
|
||||||
|
: internalCharsetIsDocCharset_( 1),
|
||||||
|
codingSystem_( 0),
|
||||||
|
mapCatalogDocument_(0),
|
||||||
|
mgr_( &nullMgr_)
|
||||||
|
{
|
||||||
|
initCodingSystem( requiredInternalCode);
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
DtdParser::
|
||||||
|
setMessenger( Messenger * mgr)
|
||||||
|
{
|
||||||
|
mgr_ = mgr ? mgr : &nullMgr_;
|
||||||
|
}
|
||||||
|
|
||||||
|
class DtdParserEventHandler
|
||||||
|
: public ErrorCountEventHandler
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
DtdParserEventHandler( Messenger *);
|
||||||
|
void message( MessageEvent *);
|
||||||
|
private:
|
||||||
|
Messenger * mgr_;
|
||||||
|
};
|
||||||
|
|
||||||
|
DtdParserEventHandler::
|
||||||
|
DtdParserEventHandler( Messenger * mgr)
|
||||||
|
: mgr_( mgr)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
DtdParserEventHandler::
|
||||||
|
message( MessageEvent * event)
|
||||||
|
{
|
||||||
|
// ignore ParserMessages::documentEndProlog and ParserMessages::documentElementUndefined
|
||||||
|
if ( event->message().type->number() != 45 && event->message().type->number() != 319) {
|
||||||
|
mgr_->dispatchMessage( event->message());
|
||||||
|
}
|
||||||
|
ErrorCountEventHandler::message( event);
|
||||||
|
}
|
||||||
|
|
||||||
|
ConstPtr< Dtd>
|
||||||
|
DtdParser::
|
||||||
|
parseDtd( const StringC & sysid)
|
||||||
|
{
|
||||||
|
DtdParserEventHandler handler( mgr_);
|
||||||
|
|
||||||
|
SgmlParser::Params sdParams;
|
||||||
|
sdParams.sysid = convertInput( SP_T( "<LITERAL> "));
|
||||||
|
sdParams.entityManager = entityManager().pointer();
|
||||||
|
sdParams.options = &options_;
|
||||||
|
sdParser_.init( sdParams);
|
||||||
|
sdParser_.parseAll( handler, handler.cancelPtr());
|
||||||
|
|
||||||
|
SgmlParser::Params params;
|
||||||
|
params.sysid = sysid;
|
||||||
|
params.entityType = SgmlParser::Params::dtd;
|
||||||
|
// unnecessary, since params.doctypeName starts out empty anyway.
|
||||||
|
// params.doctypeName = convertInput( SP_T( ""));
|
||||||
|
params.entityManager = entityManager().pointer();
|
||||||
|
params.options = &options_;
|
||||||
|
params.parent = &sdParser_;
|
||||||
|
parser_.init( params);
|
||||||
|
parser_.parseAll( handler, handler.cancelPtr());
|
||||||
|
|
||||||
|
Ptr< Dtd> dtd( parser_.baseDtd());
|
||||||
|
delete dtd->removeElementType( params.doctypeName);
|
||||||
|
|
||||||
|
return dtd;
|
||||||
|
}
|
||||||
|
|
||||||
|
Boolean
|
||||||
|
stringMatches( const SP_TCHAR * s, const char * key)
|
||||||
|
{
|
||||||
|
for (; *key != '\0'; s++, key++) {
|
||||||
|
if (*s != tolower(*key) && *s != toupper(*key))
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
return *s == '\0';
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
DtdParser::
|
||||||
|
initCodingSystem( const char * requiredInternalCode)
|
||||||
|
{
|
||||||
|
const char *name = requiredInternalCode;
|
||||||
|
#ifdef SP_MULTI_BYTE
|
||||||
|
char buf[256];
|
||||||
|
if (!name) {
|
||||||
|
const SP_TCHAR *internalCode = tgetenv(SP_T("SP_SYSTEM_CHARSET"));
|
||||||
|
if (internalCode) {
|
||||||
|
buf[255] = '\0';
|
||||||
|
for (size_t i = 0; i < 255; i++) {
|
||||||
|
buf[i] = internalCode[i];
|
||||||
|
if (buf[i] == '\0')
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
name = buf;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (requiredInternalCode)
|
||||||
|
internalCharsetIsDocCharset_ = 0;
|
||||||
|
else {
|
||||||
|
const SP_TCHAR *useInternal = tgetenv(SP_T("SP_CHARSET_FIXED"));
|
||||||
|
if (useInternal
|
||||||
|
&& (stringMatches(useInternal, "YES")
|
||||||
|
|| stringMatches(useInternal, "1")))
|
||||||
|
internalCharsetIsDocCharset_ = 0;
|
||||||
|
}
|
||||||
|
#endif /* SP_MULTI_BYTE */
|
||||||
|
codingSystemKit_ = CodingSystemKit::make(name);
|
||||||
|
const SP_TCHAR *codingName = tgetenv(internalCharsetIsDocCharset_
|
||||||
|
? SP_T("SP_BCTF")
|
||||||
|
: SP_T("SP_ENCODING"));
|
||||||
|
if (codingName)
|
||||||
|
codingSystem_ = lookupCodingSystem(codingName);
|
||||||
|
#ifdef SP_MULTI_BYTE
|
||||||
|
if (!codingSystem_ && !internalCharsetIsDocCharset_)
|
||||||
|
codingSystem_ = lookupCodingSystem(SP_DEFAULT_ENCODING);
|
||||||
|
#endif
|
||||||
|
if (!codingSystem_
|
||||||
|
#ifndef SP_WIDE_SYSTEM
|
||||||
|
|| codingSystem_->fixedBytesPerChar() > 1
|
||||||
|
#endif
|
||||||
|
)
|
||||||
|
codingSystem_ = codingSystemKit_->identityCodingSystem();
|
||||||
|
}
|
||||||
|
|
||||||
|
const CodingSystem *
|
||||||
|
DtdParser::
|
||||||
|
lookupCodingSystem( const AppChar * codingName)
|
||||||
|
{
|
||||||
|
#define MAX_CS_NAME 50
|
||||||
|
if (tcslen(codingName) < MAX_CS_NAME) {
|
||||||
|
char buf[MAX_CS_NAME];
|
||||||
|
int i;
|
||||||
|
for (i = 0; codingName[i] != SP_T('\0'); i++) {
|
||||||
|
SP_TUCHAR c = codingName[i];
|
||||||
|
#ifdef SP_WIDE_SYSTEM
|
||||||
|
if (c > (unsigned char)-1)
|
||||||
|
return 0;
|
||||||
|
#endif
|
||||||
|
buf[i] = char(c);
|
||||||
|
}
|
||||||
|
buf[i] = '\0';
|
||||||
|
return codingSystemKit_->makeCodingSystem(buf, internalCharsetIsDocCharset_);
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
StringC
|
||||||
|
DtdParser::
|
||||||
|
convertInput( const SP_TCHAR * s)
|
||||||
|
{
|
||||||
|
#ifdef SP_WIDE_SYSTEM
|
||||||
|
StringC str(s, wcslen(s));
|
||||||
|
#else
|
||||||
|
StringC str(codingSystem()->convertIn(s));
|
||||||
|
#endif
|
||||||
|
for (size_t i = 0; i < str.size(); i++)
|
||||||
|
if (str[i] == '\n')
|
||||||
|
str[i] = '\r';
|
||||||
|
return str;
|
||||||
|
}
|
||||||
|
|
||||||
|
Boolean
|
||||||
|
DtdParser::
|
||||||
|
makeSystemId( int nFiles, AppChar * const * files, StringC & result)
|
||||||
|
{
|
||||||
|
Vector<StringC> filenames(nFiles == 0 ? 1 : nFiles);
|
||||||
|
int i;
|
||||||
|
for (i = 0; i < nFiles; i++)
|
||||||
|
filenames[i] = convertInput(tcscmp(files[i], SP_T("-")) == 0
|
||||||
|
? SP_T("<OSFD>0")
|
||||||
|
: files[i]);
|
||||||
|
if (nFiles == 0)
|
||||||
|
filenames[0] = convertInput(SP_T("<OSFD>0"));
|
||||||
|
return entityManager()->mergeSystemIds(filenames,
|
||||||
|
mapCatalogDocument_,
|
||||||
|
systemCharset(),
|
||||||
|
*mgr_,
|
||||||
|
result);
|
||||||
|
}
|
||||||
|
|
||||||
|
Ptr< ExtendEntityManager> &
|
||||||
|
DtdParser::
|
||||||
|
entityManager()
|
||||||
|
{
|
||||||
|
if (!entityManager_.isNull())
|
||||||
|
return entityManager_;
|
||||||
|
PosixStorageManager *sm
|
||||||
|
= new PosixStorageManager("OSFILE",
|
||||||
|
&systemCharset(),
|
||||||
|
#ifndef SP_WIDE_SYSTEM
|
||||||
|
codingSystem(),
|
||||||
|
#endif
|
||||||
|
5);
|
||||||
|
size_t i;
|
||||||
|
for (i = 0; i < searchDirs_.size(); i++)
|
||||||
|
sm->addSearchDir(convertInput(searchDirs_[i]));
|
||||||
|
{
|
||||||
|
const AppChar *e = tgetenv(SP_T("SGML_SEARCH_PATH"));
|
||||||
|
if (!e)
|
||||||
|
e = SGML_SEARCH_PATH_DEFAULT;
|
||||||
|
if (*e) {
|
||||||
|
StringC str(convertInput(e));
|
||||||
|
size_t i = 0;
|
||||||
|
size_t start = 0;
|
||||||
|
for (;;) {
|
||||||
|
if (i == str.size() || str[i] == FILE_SEP) {
|
||||||
|
sm->addSearchDir(StringC(str.data() + start,
|
||||||
|
i - start));
|
||||||
|
if (i == str.size())
|
||||||
|
break;
|
||||||
|
start = ++i;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
i++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
entityManager_ = ExtendEntityManager::make(sm,
|
||||||
|
codingSystem(),
|
||||||
|
inputCodingSystemKit(),
|
||||||
|
internalCharsetIsDocCharset_);
|
||||||
|
#ifdef SP_WININET
|
||||||
|
entityManager_->registerStorageManager(new WinInetStorageManager("URL"));
|
||||||
|
#else
|
||||||
|
entityManager_->registerStorageManager(new URLStorageManager("URL"));
|
||||||
|
#endif
|
||||||
|
entityManager_->registerStorageManager(new LiteralStorageManager("LITERAL"));
|
||||||
|
entityManager_->registerStorageManager(new NotationStorageManager("CLSID"));
|
||||||
|
entityManager_->registerStorageManager(new NotationStorageManager("MIMETYPE"));
|
||||||
|
Vector<StringC> v;
|
||||||
|
for (i = 0; i < catalogSysids_.size(); i++)
|
||||||
|
// filenames specified on command-line must exist
|
||||||
|
v.push_back(convertInput(catalogSysids_[i]));
|
||||||
|
{
|
||||||
|
const AppChar *e = tgetenv(SP_T("SGML_CATALOG_FILES"));
|
||||||
|
if (!e)
|
||||||
|
e = SGML_CATALOG_FILES_DEFAULT;
|
||||||
|
if (*e) {
|
||||||
|
StringC str(convertInput(e));
|
||||||
|
size_t i = 0;
|
||||||
|
size_t start = 0;
|
||||||
|
for (;;) {
|
||||||
|
if (i == str.size() || str[i] == FILE_SEP) {
|
||||||
|
v.push_back(StringC(str.data() + start,
|
||||||
|
i - start));
|
||||||
|
if (i == str.size())
|
||||||
|
break;
|
||||||
|
start = ++i;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
i++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
entityManager_->setCatalogManager(SOCatalogManager::make(v,
|
||||||
|
catalogSysids_.size(),
|
||||||
|
&systemCharset(),
|
||||||
|
&systemCharset(),
|
||||||
|
0));
|
||||||
|
return entityManager_;
|
||||||
|
}
|
||||||
|
|
||||||
|
#ifdef SP_NAMESPACE
|
||||||
|
}
|
||||||
|
#endif
|
120
src/experimental/ofx/parser/DtdParser.h
Normal file
120
src/experimental/ofx/parser/DtdParser.h
Normal file
@ -0,0 +1,120 @@
|
|||||||
|
// $Id$
|
||||||
|
// Copyright (C) 1997 ISOGEN International Corp. and TechnoTeacher, Inc.
|
||||||
|
// All Rights Reserved.
|
||||||
|
//
|
||||||
|
// <Restrictions>
|
||||||
|
// This file and its associated materials are copyrighted material of
|
||||||
|
// ISOGEN International Corp. (ISOGEN) and TechnoTeacher,
|
||||||
|
// Inc. (TechnoTeacher). License to copy and use this file and its
|
||||||
|
// associated materials is granted to everyone, free of charge, with
|
||||||
|
// the following restrictions: (1) The ISOGEN and TechnoTeacher
|
||||||
|
// copyright statement must be maintained in any copies. (2) New
|
||||||
|
// materials derived from these materials must indicate their source,
|
||||||
|
// including references to the ISOGEN and TechnoTeacher web sites
|
||||||
|
// (www.isogen.com and www.techno.com). (3) These materials may not be
|
||||||
|
// sold in any form without the express written permission of ISOGEN
|
||||||
|
// and TechnoTeacher. [However, feel free to sell things you create
|
||||||
|
// from these materials as long as the things you create are truly
|
||||||
|
// different in function--we want to encourage people to learn from
|
||||||
|
// these materials and benefit from having learned--we just don't want
|
||||||
|
// others to sell what we're giving away.]
|
||||||
|
// </Restrictions>
|
||||||
|
|
||||||
|
#ifndef DtdParser_INCLUDED
|
||||||
|
#define DtdParser_INCLUDED 1
|
||||||
|
|
||||||
|
#include "Dtd.h"
|
||||||
|
#include "Ptr.h"
|
||||||
|
#include "Vector.h"
|
||||||
|
#include "CodingSystem.h"
|
||||||
|
#include "CodingSystemKit.h"
|
||||||
|
#include "SgmlParser.h"
|
||||||
|
#include "ParserOptions.h"
|
||||||
|
#include "ExtendEntityManager.h"
|
||||||
|
|
||||||
|
#ifdef SP_NAMESPACE
|
||||||
|
namespace SP_NAMESPACE {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
class DtdParser {
|
||||||
|
public:
|
||||||
|
DtdParser( const char * requiredInternalCode = 0);
|
||||||
|
void setMessenger( Messenger *);
|
||||||
|
|
||||||
|
ConstPtr< Dtd> parseDtd( const StringC & sysid);
|
||||||
|
|
||||||
|
#ifdef SP_WIDE_SYSTEM
|
||||||
|
typedef wchar_t AppChar;
|
||||||
|
#else
|
||||||
|
typedef char AppChar;
|
||||||
|
#endif
|
||||||
|
const CodingSystem * codingSystem();
|
||||||
|
const CharsetInfo & systemCharset();
|
||||||
|
ConstPtr< InputCodingSystemKit> inputCodingSystemKit();
|
||||||
|
StringC convertInput( const AppChar * s);
|
||||||
|
|
||||||
|
Boolean makeSystemId( int nFiles, AppChar * const * files, StringC & result);
|
||||||
|
Ptr< ExtendEntityManager> & entityManager();
|
||||||
|
|
||||||
|
SgmlParser & parser();
|
||||||
|
|
||||||
|
private:
|
||||||
|
Messenger * mgr_;
|
||||||
|
NullMessenger nullMgr_;
|
||||||
|
|
||||||
|
// Coding system stuff
|
||||||
|
void initCodingSystem( const char * requiredInternalCode);
|
||||||
|
const CodingSystem * lookupCodingSystem( const AppChar * codingName);
|
||||||
|
Boolean internalCharsetIsDocCharset_;
|
||||||
|
Ptr< CodingSystemKit> codingSystemKit_;
|
||||||
|
const CodingSystem * codingSystem_;
|
||||||
|
|
||||||
|
// Entity manager stuff
|
||||||
|
Vector< const AppChar *> searchDirs_;
|
||||||
|
Vector< const AppChar *> catalogSysids_;
|
||||||
|
Boolean mapCatalogDocument_;
|
||||||
|
Ptr< ExtendEntityManager> entityManager_;
|
||||||
|
|
||||||
|
// SGML Parser stuff
|
||||||
|
ParserOptions options_;
|
||||||
|
SgmlParser sdParser_;
|
||||||
|
SgmlParser parser_;
|
||||||
|
};
|
||||||
|
|
||||||
|
inline
|
||||||
|
const CodingSystem *
|
||||||
|
DtdParser::
|
||||||
|
codingSystem()
|
||||||
|
{
|
||||||
|
return codingSystem_;
|
||||||
|
}
|
||||||
|
|
||||||
|
inline
|
||||||
|
ConstPtr< InputCodingSystemKit>
|
||||||
|
DtdParser::
|
||||||
|
inputCodingSystemKit()
|
||||||
|
{
|
||||||
|
return codingSystemKit_.pointer();
|
||||||
|
}
|
||||||
|
|
||||||
|
inline
|
||||||
|
const CharsetInfo &
|
||||||
|
DtdParser::
|
||||||
|
systemCharset()
|
||||||
|
{
|
||||||
|
return codingSystemKit_->systemCharset();
|
||||||
|
}
|
||||||
|
|
||||||
|
inline
|
||||||
|
SgmlParser &
|
||||||
|
DtdParser::
|
||||||
|
parser()
|
||||||
|
{
|
||||||
|
return parser_;
|
||||||
|
}
|
||||||
|
|
||||||
|
#ifdef SP_NAMESPACE
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /* not DtdParser_INCLUDED */
|
11
src/experimental/ofx/parser/LICENSE
Normal file
11
src/experimental/ofx/parser/LICENSE
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
|
||||||
|
Note that some of the code in this directory is covered by
|
||||||
|
ISOGEN and TechnoTeacher copyrights. On first reading, these
|
||||||
|
copyrights appear to be restrictive. However, the parenthetical
|
||||||
|
remarks in thier license seems to indicate that a larger, derived
|
||||||
|
work is no longer subject to thier license. Since all of the rest
|
||||||
|
of the stuff in this directory is a larger, derived work, it would
|
||||||
|
appear that thier license doesn't apply, and that the whole can be
|
||||||
|
safely GPL'ed.
|
||||||
|
|
||||||
|
|
18
src/experimental/ofx/parser/Makefile.am
Normal file
18
src/experimental/ofx/parser/Makefile.am
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
|
||||||
|
EXTRA_DIST = \
|
||||||
|
DtdParser.C \
|
||||||
|
DtdParser.h \
|
||||||
|
LICENSE \
|
||||||
|
README \
|
||||||
|
example.txt \
|
||||||
|
parseDtd.C \
|
||||||
|
parseOfx.C \
|
||||||
|
pfxBaseTypes.C \
|
||||||
|
pfxBaseTypes.h \
|
||||||
|
pfxCompTypes.C \
|
||||||
|
pfxCompTypes.h \
|
||||||
|
pfxLangOut.C \
|
||||||
|
pfxLangOut.h \
|
||||||
|
pfxUtils.C \
|
||||||
|
pfxUtils.h \
|
||||||
|
simple.C
|
228
src/experimental/ofx/parser/Makefile.in
Normal file
228
src/experimental/ofx/parser/Makefile.in
Normal file
@ -0,0 +1,228 @@
|
|||||||
|
# Makefile.in generated automatically by automake 1.4 from Makefile.am
|
||||||
|
|
||||||
|
# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
|
||||||
|
# This Makefile.in is free software; the Free Software Foundation
|
||||||
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
|
# with or without modifications, as long as this notice is preserved.
|
||||||
|
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||||
|
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||||
|
# PARTICULAR PURPOSE.
|
||||||
|
|
||||||
|
|
||||||
|
SHELL = @SHELL@
|
||||||
|
|
||||||
|
srcdir = @srcdir@
|
||||||
|
top_srcdir = @top_srcdir@
|
||||||
|
VPATH = @srcdir@
|
||||||
|
prefix = @prefix@
|
||||||
|
exec_prefix = @exec_prefix@
|
||||||
|
|
||||||
|
bindir = @bindir@
|
||||||
|
sbindir = @sbindir@
|
||||||
|
libexecdir = @libexecdir@
|
||||||
|
datadir = @datadir@
|
||||||
|
sysconfdir = @sysconfdir@
|
||||||
|
sharedstatedir = @sharedstatedir@
|
||||||
|
localstatedir = @localstatedir@
|
||||||
|
libdir = @libdir@
|
||||||
|
infodir = @infodir@
|
||||||
|
mandir = @mandir@
|
||||||
|
includedir = @includedir@
|
||||||
|
oldincludedir = /usr/include
|
||||||
|
|
||||||
|
DESTDIR =
|
||||||
|
|
||||||
|
pkgdatadir = $(datadir)/@PACKAGE@
|
||||||
|
pkglibdir = $(libdir)/@PACKAGE@
|
||||||
|
pkgincludedir = $(includedir)/@PACKAGE@
|
||||||
|
|
||||||
|
top_builddir = ../../../..
|
||||||
|
|
||||||
|
ACLOCAL = @ACLOCAL@
|
||||||
|
AUTOCONF = @AUTOCONF@
|
||||||
|
AUTOMAKE = @AUTOMAKE@
|
||||||
|
AUTOHEADER = @AUTOHEADER@
|
||||||
|
|
||||||
|
INSTALL = @INSTALL@
|
||||||
|
INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
|
||||||
|
INSTALL_DATA = @INSTALL_DATA@
|
||||||
|
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||||
|
transform = @program_transform_name@
|
||||||
|
|
||||||
|
NORMAL_INSTALL = :
|
||||||
|
PRE_INSTALL = :
|
||||||
|
POST_INSTALL = :
|
||||||
|
NORMAL_UNINSTALL = :
|
||||||
|
PRE_UNINSTALL = :
|
||||||
|
POST_UNINSTALL = :
|
||||||
|
host_alias = @host_alias@
|
||||||
|
host_triplet = @host@
|
||||||
|
AS = @AS@
|
||||||
|
CATALOGS = @CATALOGS@
|
||||||
|
CATOBJEXT = @CATOBJEXT@
|
||||||
|
CC = @CC@
|
||||||
|
DATADIRNAME = @DATADIRNAME@
|
||||||
|
DLLTOOL = @DLLTOOL@
|
||||||
|
GENCAT = @GENCAT@
|
||||||
|
GLIB_CFLAGS = @GLIB_CFLAGS@
|
||||||
|
GLIB_CONFIG_BIN = @GLIB_CONFIG_BIN@
|
||||||
|
GLIB_LIBS = @GLIB_LIBS@
|
||||||
|
GMOFILES = @GMOFILES@
|
||||||
|
GMSGFMT = @GMSGFMT@
|
||||||
|
GNC_CONFIGDIR = @GNC_CONFIGDIR@
|
||||||
|
GNC_DOC_INSTALL_DIR = @GNC_DOC_INSTALL_DIR@
|
||||||
|
GNC_LIBDIR = @GNC_LIBDIR@
|
||||||
|
GNC_SCM_INSTALL_DIR = @GNC_SCM_INSTALL_DIR@
|
||||||
|
GNC_SHAREDIR = @GNC_SHAREDIR@
|
||||||
|
GNOME_CFLAGS = @GNOME_CFLAGS@
|
||||||
|
GNOME_CONFIG_BIN = @GNOME_CONFIG_BIN@
|
||||||
|
GNOME_LIBS = @GNOME_LIBS@
|
||||||
|
GNOME_STATIC_TARGET = @GNOME_STATIC_TARGET@
|
||||||
|
GNOME_TARGET = @GNOME_TARGET@
|
||||||
|
GTK_XMHTML = @GTK_XMHTML@
|
||||||
|
GT_NO = @GT_NO@
|
||||||
|
GT_YES = @GT_YES@
|
||||||
|
GUILE = @GUILE@
|
||||||
|
GUILE_COMPILE_ARGS = @GUILE_COMPILE_ARGS@
|
||||||
|
GUILE_CONFIG = @GUILE_CONFIG@
|
||||||
|
GUILE_LINK_ARGS = @GUILE_LINK_ARGS@
|
||||||
|
G_WRAP = @G_WRAP@
|
||||||
|
G_WRAP_COMPILE_ARGS = @G_WRAP_COMPILE_ARGS@
|
||||||
|
G_WRAP_CONFIG = @G_WRAP_CONFIG@
|
||||||
|
G_WRAP_LINK_ARGS = @G_WRAP_LINK_ARGS@
|
||||||
|
INCLUDE_LOCALE_H = @INCLUDE_LOCALE_H@
|
||||||
|
INSTOBJEXT = @INSTOBJEXT@
|
||||||
|
INTLDEPS = @INTLDEPS@
|
||||||
|
INTLLIBS = @INTLLIBS@
|
||||||
|
INTLOBJS = @INTLOBJS@
|
||||||
|
LIBTOOL = @LIBTOOL@
|
||||||
|
LN_S = @LN_S@
|
||||||
|
LOCALE_DIR = @LOCALE_DIR@
|
||||||
|
MAKEINFO = @MAKEINFO@
|
||||||
|
MKINSTALLDIRS = @MKINSTALLDIRS@
|
||||||
|
MSGFMT = @MSGFMT@
|
||||||
|
OBJDUMP = @OBJDUMP@
|
||||||
|
PACKAGE = @PACKAGE@
|
||||||
|
PERL = @PERL@
|
||||||
|
PERLINCL = @PERLINCL@
|
||||||
|
POFILES = @POFILES@
|
||||||
|
POSUB = @POSUB@
|
||||||
|
RANLIB = @RANLIB@
|
||||||
|
SWIG = @SWIG@
|
||||||
|
USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
|
||||||
|
USE_NLS = @USE_NLS@
|
||||||
|
VERSION = @VERSION@
|
||||||
|
l = @l@
|
||||||
|
|
||||||
|
EXTRA_DIST = DtdParser.C DtdParser.h LICENSE README example.txt parseDtd.C parseOfx.C pfxBaseTypes.C pfxBaseTypes.h pfxCompTypes.C pfxCompTypes.h pfxLangOut.C pfxLangOut.h pfxUtils.C pfxUtils.h simple.C
|
||||||
|
|
||||||
|
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
|
||||||
|
CONFIG_HEADER = ../../../../config.h
|
||||||
|
CONFIG_CLEAN_FILES =
|
||||||
|
DIST_COMMON = README Makefile.am Makefile.in
|
||||||
|
|
||||||
|
|
||||||
|
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
|
||||||
|
|
||||||
|
TAR = gtar
|
||||||
|
GZIP_ENV = --best
|
||||||
|
all: all-redirect
|
||||||
|
.SUFFIXES:
|
||||||
|
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
|
||||||
|
cd $(top_srcdir) && $(AUTOMAKE) --gnu src/experimental/ofx/parser/Makefile
|
||||||
|
|
||||||
|
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES)
|
||||||
|
cd $(top_builddir) \
|
||||||
|
&& CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
|
||||||
|
|
||||||
|
tags: TAGS
|
||||||
|
TAGS:
|
||||||
|
|
||||||
|
|
||||||
|
distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
|
||||||
|
|
||||||
|
subdir = src/experimental/ofx/parser
|
||||||
|
|
||||||
|
distdir: $(DISTFILES)
|
||||||
|
here=`cd $(top_builddir) && pwd`; \
|
||||||
|
top_distdir=`cd $(top_distdir) && pwd`; \
|
||||||
|
distdir=`cd $(distdir) && pwd`; \
|
||||||
|
cd $(top_srcdir) \
|
||||||
|
&& $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnu src/experimental/ofx/parser/Makefile
|
||||||
|
@for file in $(DISTFILES); do \
|
||||||
|
d=$(srcdir); \
|
||||||
|
if test -d $$d/$$file; then \
|
||||||
|
cp -pr $$d/$$file $(distdir)/$$file; \
|
||||||
|
else \
|
||||||
|
test -f $(distdir)/$$file \
|
||||||
|
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \
|
||||||
|
|| cp -p $$d/$$file $(distdir)/$$file || :; \
|
||||||
|
fi; \
|
||||||
|
done
|
||||||
|
info-am:
|
||||||
|
info: info-am
|
||||||
|
dvi-am:
|
||||||
|
dvi: dvi-am
|
||||||
|
check-am: all-am
|
||||||
|
check: check-am
|
||||||
|
installcheck-am:
|
||||||
|
installcheck: installcheck-am
|
||||||
|
install-exec-am:
|
||||||
|
install-exec: install-exec-am
|
||||||
|
|
||||||
|
install-data-am:
|
||||||
|
install-data: install-data-am
|
||||||
|
|
||||||
|
install-am: all-am
|
||||||
|
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||||
|
install: install-am
|
||||||
|
uninstall-am:
|
||||||
|
uninstall: uninstall-am
|
||||||
|
all-am: Makefile
|
||||||
|
all-redirect: all-am
|
||||||
|
install-strip:
|
||||||
|
$(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
|
||||||
|
installdirs:
|
||||||
|
|
||||||
|
|
||||||
|
mostlyclean-generic:
|
||||||
|
|
||||||
|
clean-generic:
|
||||||
|
|
||||||
|
distclean-generic:
|
||||||
|
-rm -f Makefile $(CONFIG_CLEAN_FILES)
|
||||||
|
-rm -f config.cache config.log stamp-h stamp-h[0-9]*
|
||||||
|
|
||||||
|
maintainer-clean-generic:
|
||||||
|
mostlyclean-am: mostlyclean-generic
|
||||||
|
|
||||||
|
mostlyclean: mostlyclean-am
|
||||||
|
|
||||||
|
clean-am: clean-generic mostlyclean-am
|
||||||
|
|
||||||
|
clean: clean-am
|
||||||
|
|
||||||
|
distclean-am: distclean-generic clean-am
|
||||||
|
-rm -f libtool
|
||||||
|
|
||||||
|
distclean: distclean-am
|
||||||
|
|
||||||
|
maintainer-clean-am: maintainer-clean-generic distclean-am
|
||||||
|
@echo "This command is intended for maintainers to use;"
|
||||||
|
@echo "it deletes files that may require special tools to rebuild."
|
||||||
|
|
||||||
|
maintainer-clean: maintainer-clean-am
|
||||||
|
|
||||||
|
.PHONY: tags distdir info-am info dvi-am dvi check check-am \
|
||||||
|
installcheck-am installcheck install-exec-am install-exec \
|
||||||
|
install-data-am install-data install-am install uninstall-am uninstall \
|
||||||
|
all-redirect all-am all installdirs mostlyclean-generic \
|
||||||
|
distclean-generic clean-generic maintainer-clean-generic clean \
|
||||||
|
mostlyclean distclean maintainer-clean
|
||||||
|
|
||||||
|
|
||||||
|
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||||
|
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||||
|
.NOEXPORT:
|
53
src/experimental/ofx/parser/README
Normal file
53
src/experimental/ofx/parser/README
Normal file
@ -0,0 +1,53 @@
|
|||||||
|
|
||||||
|
This directory contains some experimental code to handle
|
||||||
|
OFX (Open Financial Exchange) messages.
|
||||||
|
|
||||||
|
The most interesting thing here is the DTD parser "parseOfx"
|
||||||
|
which attempts to build a C++ interface that models the
|
||||||
|
structure of the OFX DTD's. It *almost* works. There
|
||||||
|
are some exceptional cases that are not properly handled.
|
||||||
|
|
||||||
|
Next on the list of work items is to extend the parser so
|
||||||
|
that it will also generate an implementation for the interface.
|
||||||
|
Specifically, it should automatically create code for constructors,
|
||||||
|
destructors, as well as SGML input & output routines (parsers,
|
||||||
|
of a sort).
|
||||||
|
|
||||||
|
To check this out, run parseOfx like so:
|
||||||
|
> parseOfx dtd/ofxmain.dtd
|
||||||
|
|
||||||
|
It will print the C++ decls to stdout.
|
||||||
|
|
||||||
|
--------------------------------------------------------------
|
||||||
|
|
||||||
|
HTTP tool:
|
||||||
|
http://www.inf.ufrgs.br/~sagula/urlget.html
|
||||||
|
|
||||||
|
OFX financicial institution list:
|
||||||
|
https://ofx-prod-filist.intuit.com/qw0700/filist.asp
|
||||||
|
|
||||||
|
SSLeay rpm's:
|
||||||
|
http://www.sabotage.net/redhat/ssl.html
|
||||||
|
http://ftp.tu-clausthal.de/pub/TEXT/EXPERT/linux/redhat-security/i386
|
||||||
|
http://ftp.tu-clausthal.de/pub/TEXT/EXPERT/linux/redhat-security/SRPMS
|
||||||
|
|
||||||
|
--------------------------------------------------------------
|
||||||
|
|
||||||
|
To build stuff in this directory, you will needs James Clark's
|
||||||
|
SGML Parser. This can be obtained at
|
||||||
|
http://www.jclark.com/sp/index.htm
|
||||||
|
Also:
|
||||||
|
ftp.debian.org/pub/debian/dists/frozen/main/binary-i386/text/sp_1.3-1.1-4.deb
|
||||||
|
|
||||||
|
This directory contains code from
|
||||||
|
ftp://ftp.techno.com/TechnoTeacher/parseDtd/parseDtd.zip
|
||||||
|
|
||||||
|
parseDtd.C: the sample parser from TechnoTeacher
|
||||||
|
|
||||||
|
parseOfx.C: the mangled parser I'm hacking on.
|
||||||
|
|
||||||
|
dtd/ofxmain.dtd: a hacked version of the original dtd, with
|
||||||
|
the intent of exposing the base types.
|
||||||
|
|
||||||
|
--linas
|
||||||
|
March 1998
|
126
src/experimental/ofx/parser/example.txt
Normal file
126
src/experimental/ofx/parser/example.txt
Normal file
@ -0,0 +1,126 @@
|
|||||||
|
From: ueli (urutishauser@bigfoot.com)
|
||||||
|
|
||||||
|
as example, a logon request. the result is something like that:
|
||||||
|
|
||||||
|
---------------
|
||||||
|
<OFX>
|
||||||
|
<SIGNONMSGSRQV1>
|
||||||
|
<SONRQ>
|
||||||
|
<DTCLIENT>19980411101000
|
||||||
|
</DTCLIENT>
|
||||||
|
<USERID>xxxxxx
|
||||||
|
</USERID>
|
||||||
|
<USERPASS>xxxxxx
|
||||||
|
</USERPASS>
|
||||||
|
<LANGUAGE>ENG
|
||||||
|
</LANGUAGE>
|
||||||
|
<APPID>GNUCash_OFX
|
||||||
|
</APPID>
|
||||||
|
<APPVER>0001
|
||||||
|
</APPVER>
|
||||||
|
</SONRQ>
|
||||||
|
</SIGNONMSGSRQV1>
|
||||||
|
[...something more like a investement statement download request...]
|
||||||
|
</OFX>
|
||||||
|
----------------------------------------------------------
|
||||||
|
|
||||||
|
class hierarchy
|
||||||
|
|
||||||
|
OFX
|
||||||
|
---> SIGNONMSGSRQV1
|
||||||
|
--> SONRQ
|
||||||
|
-->DTCLIENT
|
||||||
|
-->USERID
|
||||||
|
-->USERPASS
|
||||||
|
-->LANGUAGE
|
||||||
|
-->APPID
|
||||||
|
-->APPVER
|
||||||
|
|
||||||
|
|
||||||
|
----------------------------------------------------------
|
||||||
|
(copy from junk.C)
|
||||||
|
|
||||||
|
class cfxSignonmsgsrsv1;
|
||||||
|
class cfxSonrs;
|
||||||
|
|
||||||
|
class cfxSignonmsgsrsv1
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
cfxSignonmsgsrsv1 (void); // constructor
|
||||||
|
virtual ~cfxSignonmsgsrsv1 (); // destructor
|
||||||
|
|
||||||
|
|
||||||
|
// Sonrs *must* be present
|
||||||
|
cfxSonrs *sonrs;
|
||||||
|
nchtrnrs *pinchtrnrs;
|
||||||
|
|
||||||
|
// Challengetrnrs may be a null pointer
|
||||||
|
cfxChallengetrnrs *challengetrnrs;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
class cfxSonrs
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
cfxSonrs (void); // constructor
|
||||||
|
virtual ~cfxSonrs (); // destructor
|
||||||
|
|
||||||
|
|
||||||
|
// Status *must* be present
|
||||||
|
cfxStatus *status;
|
||||||
|
bfxDttm *dtserver;
|
||||||
|
bfxStr *userkey;
|
||||||
|
bfxDttm *tskeyexpire;
|
||||||
|
bfxStr *language;
|
||||||
|
bfxDttm *dtprofup;
|
||||||
|
bfxDttm *dtacctup;
|
||||||
|
|
||||||
|
// Fi may be a null pointer
|
||||||
|
cfxFi *fi;
|
||||||
|
bfxStr *sesscookie;
|
||||||
|
};
|
||||||
|
|
||||||
|
class cfxOfx
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
// Signonmsgsrsv1 *must* be present
|
||||||
|
cfxSignonmsgsrsv1 *signonmsgsrsv1;
|
||||||
|
|
||||||
|
..
|
||||||
|
}
|
||||||
|
|
||||||
|
----------------------------------------------------------
|
||||||
|
some pseudo-code to produce a login request:
|
||||||
|
|
||||||
|
{
|
||||||
|
ofxrequest = new cfxOfx();
|
||||||
|
ofxreqeust->signonmsgsrsv1->sonrs->dtserver="199811111";
|
||||||
|
|
||||||
|
...
|
||||||
|
|
||||||
|
//all needed variables
|
||||||
|
|
||||||
|
|
||||||
|
// ofx_request_type = login/investement statement
|
||||||
|
// download/billings/creditcard
|
||||||
|
if (ofxrequest->Valid(ofx_request_type))
|
||||||
|
{
|
||||||
|
ofxrequest->ExportRequest(ofx_request_type);
|
||||||
|
|
||||||
|
request = new HTTPRequest();
|
||||||
|
repuest->CreateHeader();
|
||||||
|
request->AddContent(ofxrequest->GetContent());
|
||||||
|
if (request->SendRequest())
|
||||||
|
{
|
||||||
|
//now read in the result in a new ofxrequest structure
|
||||||
|
ofxresponse = new cfxOfx();
|
||||||
|
//or not cfxOfx, cfxOfx i eventually only for request
|
||||||
|
|
||||||
|
request->ParseResponse( ofxresponse );
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
301
src/experimental/ofx/parser/parseDtd.C
Normal file
301
src/experimental/ofx/parser/parseDtd.C
Normal file
@ -0,0 +1,301 @@
|
|||||||
|
// $Id$
|
||||||
|
// Copyright (C) 1997 ISOGEN International Corp. and TechnoTeacher, Inc.
|
||||||
|
// All Rights Reserved.
|
||||||
|
//
|
||||||
|
// <Restrictions>
|
||||||
|
// This file and its associated materials are copyrighted material of
|
||||||
|
// ISOGEN International Corp. (ISOGEN) and TechnoTeacher,
|
||||||
|
// Inc. (TechnoTeacher). License to copy and use this file and its
|
||||||
|
// associated materials is granted to everyone, free of charge, with
|
||||||
|
// the following restrictions: (1) The ISOGEN and TechnoTeacher
|
||||||
|
// copyright statement must be maintained in any copies. (2) New
|
||||||
|
// materials derived from these materials must indicate their source,
|
||||||
|
// including references to the ISOGEN and TechnoTeacher web sites
|
||||||
|
// (www.isogen.com and www.techno.com). (3) These materials may not be
|
||||||
|
// sold in any form without the express written permission of ISOGEN
|
||||||
|
// and TechnoTeacher. [However, feel free to sell things you create
|
||||||
|
// from these materials as long as the things you create are truly
|
||||||
|
// different in function--we want to encourage people to learn from
|
||||||
|
// these materials and benefit from having learned--we just don't want
|
||||||
|
// others to sell what we're giving away.]
|
||||||
|
// </Restrictions>
|
||||||
|
|
||||||
|
#include "config.h"
|
||||||
|
#include "DtdParser.h"
|
||||||
|
#include "OutputCharStream.h"
|
||||||
|
|
||||||
|
#define OUTPUT_MESSAGES
|
||||||
|
|
||||||
|
#ifdef OUTPUT_MESSAGES
|
||||||
|
#include "sptchar.h"
|
||||||
|
#include "MessageReporter.h"
|
||||||
|
#include "MessageTable.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef SP_NAMESPACE
|
||||||
|
namespace SP_NAMESPACE {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef SP_MANUAL_INST
|
||||||
|
|
||||||
|
#define SP_DEFINE_TEMPLATES
|
||||||
|
#include "Owner.h"
|
||||||
|
#undef SP_DEFINE_TEMPLATES
|
||||||
|
|
||||||
|
#include "Message.h"
|
||||||
|
|
||||||
|
#ifdef SP_ANSI_CLASS_INST
|
||||||
|
template class Owner< Messenger>;
|
||||||
|
#else
|
||||||
|
typedef Owner< Messenger> Dummy_0;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /* SP_MANUAL_INST */
|
||||||
|
|
||||||
|
|
||||||
|
static FileOutputByteStream standardOutput(1, 0);
|
||||||
|
static FileOutputByteStream standardError(2, 0);
|
||||||
|
|
||||||
|
#ifdef OUTPUT_MESSAGES
|
||||||
|
|
||||||
|
class MyMessageReporter
|
||||||
|
: public MessageReporter
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
MyMessageReporter( const InputCodingSystem *, OutputCharStream *);
|
||||||
|
private:
|
||||||
|
Boolean getMessageText( const MessageFragment &, StringC &);
|
||||||
|
const InputCodingSystem * codingSystem_;
|
||||||
|
};
|
||||||
|
|
||||||
|
MyMessageReporter::
|
||||||
|
MyMessageReporter( const InputCodingSystem * codesys,
|
||||||
|
OutputCharStream * errorStream)
|
||||||
|
: MessageReporter( errorStream),
|
||||||
|
codingSystem_( codesys)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
Boolean
|
||||||
|
MyMessageReporter::
|
||||||
|
getMessageText( const MessageFragment & frag, StringC & text)
|
||||||
|
{
|
||||||
|
String<SP_TCHAR> str;
|
||||||
|
if (!MessageTable::instance()->getText(frag, str))
|
||||||
|
return 0;
|
||||||
|
#ifdef SP_WIDE_SYSTEM
|
||||||
|
text.assign((const Char *)str.data(), str.size());
|
||||||
|
#else
|
||||||
|
str += 0;
|
||||||
|
text = codingSystem_->convertIn(str.data());
|
||||||
|
#endif
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif /* OUTPUT_MESSAGES */
|
||||||
|
|
||||||
|
void
|
||||||
|
outputModelGroup( OutputCharStream & os, const ModelGroup * modelGroup, unsigned level)
|
||||||
|
{
|
||||||
|
os << "( ";
|
||||||
|
level++;
|
||||||
|
const char * connector = 0x0;
|
||||||
|
switch ( modelGroup->connector()) {
|
||||||
|
case ModelGroup::andConnector:
|
||||||
|
connector = " &";
|
||||||
|
break;
|
||||||
|
case ModelGroup::orConnector:
|
||||||
|
connector = " |";
|
||||||
|
break;
|
||||||
|
case ModelGroup::seqConnector:
|
||||||
|
connector = ",";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
unsigned i = 0;
|
||||||
|
while ( i < modelGroup->nMembers()) {
|
||||||
|
const ContentToken & token = modelGroup->member( i);
|
||||||
|
const ModelGroup * subModel = token.asModelGroup();
|
||||||
|
Boolean tokenIsPcdata = false;
|
||||||
|
if ( subModel)
|
||||||
|
outputModelGroup( os, subModel, level);
|
||||||
|
else {
|
||||||
|
const LeafContentToken * leaf = token.asLeafContentToken();
|
||||||
|
const ElementType * elementType = leaf->elementType();
|
||||||
|
if ( elementType)
|
||||||
|
os << elementType->name();
|
||||||
|
else {
|
||||||
|
tokenIsPcdata = true;
|
||||||
|
os << "#PCDATA";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if ( !tokenIsPcdata) {
|
||||||
|
switch ( token.occurrenceIndicator()) {
|
||||||
|
case ContentToken::none:
|
||||||
|
break;
|
||||||
|
case ContentToken::opt:
|
||||||
|
os << "?";
|
||||||
|
break;
|
||||||
|
case ContentToken::plus:
|
||||||
|
os << "+";
|
||||||
|
break;
|
||||||
|
case ContentToken::rep:
|
||||||
|
os << "*";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if ( ++i >= modelGroup->nMembers())
|
||||||
|
break;
|
||||||
|
os << connector << "\n";
|
||||||
|
unsigned l = level;
|
||||||
|
while ( l--)
|
||||||
|
os << " ";
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
os << " )";
|
||||||
|
}
|
||||||
|
|
||||||
|
extern "C"
|
||||||
|
int
|
||||||
|
main( int argc, char ** argv)
|
||||||
|
{
|
||||||
|
if ( argc < 2)
|
||||||
|
return 1;
|
||||||
|
|
||||||
|
DtdParser parser;
|
||||||
|
|
||||||
|
#ifdef OUTPUT_MESSAGES
|
||||||
|
Owner< Messenger> mgr;
|
||||||
|
if ( argv[ 1][ 0] != '-' || argv[ 1][ 1] != 's' || argv[ 1][ 2] != '\0') {
|
||||||
|
mgr = new MyMessageReporter( parser.codingSystem(),
|
||||||
|
new EncodeOutputCharStream( &standardError,
|
||||||
|
parser.codingSystem()));
|
||||||
|
parser.setMessenger( mgr.pointer());
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
StringC sysid;
|
||||||
|
parser.makeSystemId( argc - 1, argv + 1, sysid);
|
||||||
|
ConstPtr< Dtd> dtd = parser.parseDtd( sysid);
|
||||||
|
|
||||||
|
if ( dtd.isNull())
|
||||||
|
return 1;
|
||||||
|
|
||||||
|
EncodeOutputCharStream os( &standardOutput, parser.codingSystem());
|
||||||
|
Dtd::ConstElementTypeIter e( dtd->elementTypeIter());
|
||||||
|
const ElementType * type = e.next();
|
||||||
|
while ( type) {
|
||||||
|
os << type->name() << " =\n ";
|
||||||
|
switch ( type->definition()->declaredContent()) {
|
||||||
|
case ElementDefinition::modelGroup:
|
||||||
|
outputModelGroup( os, type->definition()->compiledModelGroup()->modelGroup(), 1);
|
||||||
|
break;
|
||||||
|
case ElementDefinition::any: {
|
||||||
|
Dtd::ConstElementTypeIter i( dtd->elementTypeIter());
|
||||||
|
os << "( #PCDATA";
|
||||||
|
const ElementType * type;
|
||||||
|
while ( ( type = i.next()))
|
||||||
|
os << " |\n " << type->name();
|
||||||
|
os << " )*";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case ElementDefinition::cdata:
|
||||||
|
os << "CDATA";
|
||||||
|
break;
|
||||||
|
case ElementDefinition::rcdata:
|
||||||
|
os << "RCDATA";
|
||||||
|
break;
|
||||||
|
case ElementDefinition::empty:
|
||||||
|
os << "EMPTY";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
os << "\n";
|
||||||
|
const AttributeDefinitionList * attlist = type->attributeDefTemp();
|
||||||
|
if ( attlist) {
|
||||||
|
os << "[\n";
|
||||||
|
for ( size_t a = 0; a < attlist->size(); a++) {
|
||||||
|
const AttributeDefinition * def = attlist->def( a);
|
||||||
|
os << " " << def->name() << " : ";
|
||||||
|
size_t indent = def->name().size() + 5;
|
||||||
|
AttributeDefinitionDesc desc;
|
||||||
|
def->getDesc( desc);
|
||||||
|
switch ( desc.declaredValue) {
|
||||||
|
case AttributeDefinitionDesc::cdata:
|
||||||
|
os << "CDATA";
|
||||||
|
break;
|
||||||
|
case AttributeDefinitionDesc::name:
|
||||||
|
os << "NAME";
|
||||||
|
break;
|
||||||
|
case AttributeDefinitionDesc::number:
|
||||||
|
os << "NUMBER";
|
||||||
|
break;
|
||||||
|
case AttributeDefinitionDesc::nmtoken:
|
||||||
|
os << "NMTOKEN";
|
||||||
|
break;
|
||||||
|
case AttributeDefinitionDesc::nutoken:
|
||||||
|
os << "NUTOKEN";
|
||||||
|
break;
|
||||||
|
case AttributeDefinitionDesc::entity:
|
||||||
|
os << "ENTITY";
|
||||||
|
break;
|
||||||
|
case AttributeDefinitionDesc::idref:
|
||||||
|
os << "IDREF";
|
||||||
|
break;
|
||||||
|
case AttributeDefinitionDesc::names:
|
||||||
|
os << "NAMES";
|
||||||
|
break;
|
||||||
|
case AttributeDefinitionDesc::numbers:
|
||||||
|
os << "NUMBERS";
|
||||||
|
break;
|
||||||
|
case AttributeDefinitionDesc::nmtokens:
|
||||||
|
os << "NMTOKENS";
|
||||||
|
break;
|
||||||
|
case AttributeDefinitionDesc::nutokens:
|
||||||
|
os << "NUTOKENS";
|
||||||
|
break;
|
||||||
|
case AttributeDefinitionDesc::entities:
|
||||||
|
os << "ENTITIES";
|
||||||
|
break;
|
||||||
|
case AttributeDefinitionDesc::idrefs:
|
||||||
|
os << "IDREFS";
|
||||||
|
break;
|
||||||
|
case AttributeDefinitionDesc::id:
|
||||||
|
os << "ID";
|
||||||
|
break;
|
||||||
|
case AttributeDefinitionDesc::notation:
|
||||||
|
os << "NOTATION";
|
||||||
|
indent += 8;
|
||||||
|
case AttributeDefinitionDesc::nameTokenGroup: {
|
||||||
|
os << "( ";
|
||||||
|
indent += 2;
|
||||||
|
size_t i;
|
||||||
|
size_t v = 0;
|
||||||
|
while ( v < desc.allowedValues.size()) {
|
||||||
|
os << desc.allowedValues[ v];
|
||||||
|
if ( ++v >= desc.allowedValues.size())
|
||||||
|
break;
|
||||||
|
os << " |\n";
|
||||||
|
i = indent;
|
||||||
|
while ( i--)
|
||||||
|
os << " ";
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
os << " )";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
os << "\n";
|
||||||
|
}
|
||||||
|
os << "]\n";
|
||||||
|
}
|
||||||
|
if ( !( type = e.next()))
|
||||||
|
break;
|
||||||
|
os << "\n";
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#ifdef SP_NAMESPACE
|
||||||
|
}
|
||||||
|
#endif
|
245
src/experimental/ofx/parser/parseOfx.C
Normal file
245
src/experimental/ofx/parser/parseOfx.C
Normal file
@ -0,0 +1,245 @@
|
|||||||
|
//
|
||||||
|
// FILE:
|
||||||
|
// parseOfx.C
|
||||||
|
//
|
||||||
|
// FUNCTION:
|
||||||
|
// Parses OFX dtd's
|
||||||
|
//
|
||||||
|
// HISTORY:
|
||||||
|
// Written by Linas Vepstas March 1998
|
||||||
|
|
||||||
|
#include <ctype.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <string.h>
|
||||||
|
#include <time.h>
|
||||||
|
|
||||||
|
#include "config.h"
|
||||||
|
#include "DtdParser.h"
|
||||||
|
#include "OutputCharStream.h"
|
||||||
|
|
||||||
|
#include "pfxBaseTypes.h"
|
||||||
|
#include "pfxCompTypes.h"
|
||||||
|
#include "pfxLangOut.h"
|
||||||
|
#include "pfxUtils.h"
|
||||||
|
|
||||||
|
|
||||||
|
// output messages is used to set up the SP parser
|
||||||
|
// to dump it's error messages to stderr
|
||||||
|
#define OUTPUT_MESSAGES
|
||||||
|
|
||||||
|
#ifdef OUTPUT_MESSAGES
|
||||||
|
#include "sptchar.h"
|
||||||
|
#include "MessageReporter.h"
|
||||||
|
#include "MessageTable.h"
|
||||||
|
#endif /* OUTPUT_MESSAGES */
|
||||||
|
|
||||||
|
#ifdef SP_NAMESPACE
|
||||||
|
namespace SP_NAMESPACE {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef OUTPUT_MESSAGES
|
||||||
|
#ifdef SP_MANUAL_INST
|
||||||
|
|
||||||
|
#define SP_DEFINE_TEMPLATES
|
||||||
|
#include "Owner.h"
|
||||||
|
#undef SP_DEFINE_TEMPLATES
|
||||||
|
|
||||||
|
#include "Message.h"
|
||||||
|
|
||||||
|
#ifdef SP_ANSI_CLASS_INST
|
||||||
|
template class Owner< Messenger>;
|
||||||
|
#else
|
||||||
|
typedef Owner< Messenger> Dummy_0;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /* SP_MANUAL_INST */
|
||||||
|
#endif /* OUTPUT_MESSAGES */
|
||||||
|
|
||||||
|
|
||||||
|
static FileOutputByteStream standardOutput(1, 0);
|
||||||
|
static FileOutputByteStream standardError(2, 0);
|
||||||
|
|
||||||
|
#ifdef OUTPUT_MESSAGES
|
||||||
|
|
||||||
|
class MyMessageReporter
|
||||||
|
: public MessageReporter
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
MyMessageReporter( const InputCodingSystem *, OutputCharStream *);
|
||||||
|
private:
|
||||||
|
Boolean getMessageText( const MessageFragment &, StringC &);
|
||||||
|
const InputCodingSystem * codingSystem_;
|
||||||
|
};
|
||||||
|
|
||||||
|
MyMessageReporter::
|
||||||
|
MyMessageReporter( const InputCodingSystem * codesys,
|
||||||
|
OutputCharStream * errorStream)
|
||||||
|
: MessageReporter( errorStream),
|
||||||
|
codingSystem_( codesys)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
Boolean
|
||||||
|
MyMessageReporter::
|
||||||
|
getMessageText( const MessageFragment & frag, StringC & text)
|
||||||
|
{
|
||||||
|
String<SP_TCHAR> str;
|
||||||
|
if (!MessageTable::instance()->getText(frag, str))
|
||||||
|
return 0;
|
||||||
|
#ifdef SP_WIDE_SYSTEM
|
||||||
|
text.assign((const Char *)str.data(), str.size());
|
||||||
|
#else
|
||||||
|
str += 0;
|
||||||
|
text = codingSystem_->convertIn(str.data());
|
||||||
|
#endif
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif /* OUTPUT_MESSAGES */
|
||||||
|
|
||||||
|
// ===========================================================
|
||||||
|
|
||||||
|
extern "C"
|
||||||
|
|
||||||
|
void Usage (char *progname)
|
||||||
|
{
|
||||||
|
printf ("Usage: %s <dtdfile> \n", progname);
|
||||||
|
exit (1);
|
||||||
|
}
|
||||||
|
|
||||||
|
int
|
||||||
|
main( int argc, char ** argv)
|
||||||
|
{
|
||||||
|
if ( argc < 2) Usage (argv[0]);
|
||||||
|
|
||||||
|
DtdParser parser;
|
||||||
|
|
||||||
|
pfxCompoundType compoundTypeHandler;
|
||||||
|
|
||||||
|
#ifdef OUTPUT_MESSAGES
|
||||||
|
Owner< Messenger> mgr;
|
||||||
|
if ( argv[ 1][ 0] != '-' || argv[ 1][ 1] != 's' || argv[ 1][ 2] != '\0') {
|
||||||
|
mgr = new MyMessageReporter( parser.codingSystem(),
|
||||||
|
new EncodeOutputCharStream( &standardError,
|
||||||
|
parser.codingSystem()));
|
||||||
|
parser.setMessenger( mgr.pointer());
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
StringC sysid;
|
||||||
|
parser.makeSystemId( argc - 1, argv + 1, sysid);
|
||||||
|
ConstPtr< Dtd> dtd = parser.parseDtd( sysid);
|
||||||
|
|
||||||
|
if ( dtd.isNull()) {
|
||||||
|
printf ("Error: specified dtd %s was null \n", argv[1]);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
// ----------------------------------------------------
|
||||||
|
|
||||||
|
compoundTypeHandler.prtout = new pfxOutDecl;
|
||||||
|
|
||||||
|
// ----------------------------------------------------
|
||||||
|
// print everything
|
||||||
|
time_t now = time (0);
|
||||||
|
char * cnow = ctime (&now);
|
||||||
|
|
||||||
|
printf ("//\n");
|
||||||
|
printf ("// This file automatically generated by %s \n", argv[0]);
|
||||||
|
printf ("// Do not edit -- your changes will be lost! \n");
|
||||||
|
printf ("// Generated on %s \n", cnow);
|
||||||
|
printf ("//\n");
|
||||||
|
printf ("//\n");
|
||||||
|
compoundTypeHandler.PrintBaseTypes (0);
|
||||||
|
|
||||||
|
|
||||||
|
printf ("//----------------------------------------------\n");
|
||||||
|
printf ("//\n");
|
||||||
|
printf ("// Forward declarations of classes\n");
|
||||||
|
printf ("//\n");
|
||||||
|
printf ("//\n");
|
||||||
|
const ElementType * type;
|
||||||
|
Dtd::ConstElementTypeIter e( dtd->elementTypeIter());
|
||||||
|
type = e.next();
|
||||||
|
while ( type) {
|
||||||
|
|
||||||
|
// see if is a base type
|
||||||
|
char * varname = compoundTypeHandler.AddBaseVar (type);
|
||||||
|
|
||||||
|
if (!varname) {
|
||||||
|
compoundTypeHandler.AddCompoundType (type);
|
||||||
|
|
||||||
|
switch ( type->definition()->declaredContent()) {
|
||||||
|
case ElementDefinition::modelGroup:
|
||||||
|
break;
|
||||||
|
case ElementDefinition::any:
|
||||||
|
break;
|
||||||
|
default: {
|
||||||
|
char * vname = pfxCharify (type->name());
|
||||||
|
printf ("unexpected duuuuuuuuuuuuuuuuuuude: %s \n", vname);
|
||||||
|
delete vname;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const AttributeDefinitionList * attlist = type->attributeDefTemp();
|
||||||
|
if ( attlist) {
|
||||||
|
printf (" attribute lists duuuuuuuuuuuuuuuuuuuuuuuuuude \n");
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( !( type = e.next()))
|
||||||
|
break;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
// ----------------------------------------------------
|
||||||
|
// print classes
|
||||||
|
printf ("//----------------------------------------------\n");
|
||||||
|
printf ("//\n");
|
||||||
|
printf ("// Class declarations\n");
|
||||||
|
printf ("//\n");
|
||||||
|
printf ("//\n");
|
||||||
|
|
||||||
|
Dtd::ConstElementTypeIter ee( dtd->elementTypeIter());
|
||||||
|
type = ee.next();
|
||||||
|
while ( type) {
|
||||||
|
|
||||||
|
// see if is a base type
|
||||||
|
char * varname = compoundTypeHandler.AddBaseVar (type);
|
||||||
|
|
||||||
|
if (!varname) {
|
||||||
|
compoundTypeHandler.PrintClass (type);
|
||||||
|
}
|
||||||
|
|
||||||
|
type = ee.next();
|
||||||
|
}
|
||||||
|
|
||||||
|
// ----------------------------------------------------
|
||||||
|
// print constructors
|
||||||
|
printf ("//----------------------------------------------\n");
|
||||||
|
printf ("//\n");
|
||||||
|
printf ("// Constructors\n");
|
||||||
|
printf ("//\n");
|
||||||
|
printf ("//\n");
|
||||||
|
|
||||||
|
compoundTypeHandler.prtout = new pfxOutConstructor;
|
||||||
|
|
||||||
|
Dtd::ConstElementTypeIter eee( dtd->elementTypeIter());
|
||||||
|
type = eee.next();
|
||||||
|
while ( type) {
|
||||||
|
|
||||||
|
// see if is a base type
|
||||||
|
char * varname = compoundTypeHandler.AddBaseVar (type);
|
||||||
|
|
||||||
|
if (!varname) {
|
||||||
|
compoundTypeHandler.PrintClass (type);
|
||||||
|
}
|
||||||
|
|
||||||
|
type = eee.next();
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#ifdef SP_NAMESPACE
|
||||||
|
}
|
||||||
|
#endif
|
238
src/experimental/ofx/parser/pfxBaseTypes.C
Normal file
238
src/experimental/ofx/parser/pfxBaseTypes.C
Normal file
@ -0,0 +1,238 @@
|
|||||||
|
//
|
||||||
|
// FILE:
|
||||||
|
// basTypes.C
|
||||||
|
//
|
||||||
|
// FUNCTION:
|
||||||
|
// Handles OFX base types
|
||||||
|
//
|
||||||
|
// HISTORY:
|
||||||
|
// Written by Linas Vepstas March 1998
|
||||||
|
|
||||||
|
#include <ctype.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <string.h>
|
||||||
|
#include <time.h>
|
||||||
|
|
||||||
|
#include "config.h"
|
||||||
|
#include "DtdParser.h"
|
||||||
|
|
||||||
|
#include "pfxUtils.h"
|
||||||
|
#include "pfxBaseTypes.h"
|
||||||
|
|
||||||
|
// ===========================================================
|
||||||
|
// class pfxBaseType stores & handles base types
|
||||||
|
|
||||||
|
|
||||||
|
pfxBaseType :: pfxBaseType (void)
|
||||||
|
{
|
||||||
|
prtout = 0x0;
|
||||||
|
nvars = 0;
|
||||||
|
varname[0] = 0x0;
|
||||||
|
vartype[0] = 0x0;
|
||||||
|
}
|
||||||
|
|
||||||
|
char *
|
||||||
|
pfxBaseType :: AddBaseVar (const ElementType *type)
|
||||||
|
{
|
||||||
|
|
||||||
|
// its not a base type unless we have a model group.
|
||||||
|
if (ElementDefinition::modelGroup !=
|
||||||
|
type->definition()->declaredContent()) return 0x0;
|
||||||
|
|
||||||
|
const ModelGroup * mg;
|
||||||
|
mg = type->definition()->compiledModelGroup()->modelGroup();
|
||||||
|
|
||||||
|
// to be a base type, it must have exactly one member
|
||||||
|
if (1 != mg->nMembers()) return 0x0;
|
||||||
|
|
||||||
|
const ContentToken & token = mg->member (0);
|
||||||
|
|
||||||
|
// anything with a sub-model cannot be a base type
|
||||||
|
const ModelGroup * subModel = token.asModelGroup();
|
||||||
|
if (subModel) return 0x0;
|
||||||
|
|
||||||
|
const LeafContentToken * leaf = token.asLeafContentToken();
|
||||||
|
const ElementType * elementType = leaf->elementType();
|
||||||
|
|
||||||
|
if (!elementType) {
|
||||||
|
char * name = pfxCharify (type->name());
|
||||||
|
|
||||||
|
printf ("Unkonwon, unexpected PCDATA: %s \n", name);
|
||||||
|
return 0x0;
|
||||||
|
}
|
||||||
|
|
||||||
|
// now look to see if we have already processed this one
|
||||||
|
char *vname = pfxCharify (type->name());
|
||||||
|
|
||||||
|
// if its already in out database, just return
|
||||||
|
for (int i = 0; i<nvars; i++) {
|
||||||
|
if (!strcmp (vname, varname[i])) {
|
||||||
|
delete vname;
|
||||||
|
return varname[i];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// look to see if this is a typ[e that we recognize
|
||||||
|
char * vtype = pfxCharify (elementType->name());
|
||||||
|
if (strcmp ("XACC-AMOUNT", vtype) &&
|
||||||
|
strcmp ("XACC-BOOL", vtype) &&
|
||||||
|
strcmp ("XACC-DTTM", vtype) &&
|
||||||
|
strcmp ("XACC-ID", vtype) &&
|
||||||
|
strcmp ("XACC-INT", vtype) &&
|
||||||
|
strcmp ("XACC-PRICE", vtype) &&
|
||||||
|
strcmp ("XACC-RATE", vtype) &&
|
||||||
|
strcmp ("XACC-SRVRID", vtype) &&
|
||||||
|
strcmp ("XACC-STR", vtype) &&
|
||||||
|
strcmp ("XACC-URL", vtype) &&
|
||||||
|
strcmp ("XACC-UUID", vtype)) {
|
||||||
|
|
||||||
|
delete vtype;
|
||||||
|
delete vname;
|
||||||
|
return 0x0;
|
||||||
|
}
|
||||||
|
|
||||||
|
// we haven't encounterd this before. Add it to our list.
|
||||||
|
varname[nvars] = vname;
|
||||||
|
vartype[nvars] = vtype;
|
||||||
|
nvars ++;
|
||||||
|
|
||||||
|
return vname;
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
pfxBaseType :: PrintBaseTypes (int dent)
|
||||||
|
{
|
||||||
|
|
||||||
|
DENT (dent); printf ("// Basic Types \n");
|
||||||
|
DENT (dent); printf ("typedef double bfxAmount; \n");
|
||||||
|
DENT (dent); printf ("typedef int bfxBool; \n");
|
||||||
|
DENT (dent); printf ("typedef long int bfxDttm; \n");
|
||||||
|
DENT (dent); printf ("typedef char * bfxId; \n");
|
||||||
|
DENT (dent); printf ("typedef int bfxInt; \n");
|
||||||
|
DENT (dent); printf ("typedef double bfxPrice; \n");
|
||||||
|
DENT (dent); printf ("typedef double bfxRate; \n");
|
||||||
|
DENT (dent); printf ("typedef char * bfxStr; \n");
|
||||||
|
DENT (dent); printf ("typedef char * bfxSrvrid; \n");
|
||||||
|
DENT (dent); printf ("typedef char * bfxUrl; \n");
|
||||||
|
DENT (dent); printf ("typedef char bfxUuid [36]; \n");
|
||||||
|
printf ("\n\n");
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
pfxBaseType :: PrintBaseDecl (const ContentToken & token)
|
||||||
|
{
|
||||||
|
// print an individual member
|
||||||
|
const LeafContentToken * leaf = token.asLeafContentToken();
|
||||||
|
const ElementType * elementType = leaf->elementType();
|
||||||
|
if (!elementType) return;
|
||||||
|
|
||||||
|
char * varname = pfxCharify (elementType->name());
|
||||||
|
|
||||||
|
if (!varname) return;
|
||||||
|
|
||||||
|
char * vtype = GetBaseType (varname);
|
||||||
|
if (!vtype) return;
|
||||||
|
|
||||||
|
char * decl;
|
||||||
|
|
||||||
|
if (!strcmp ("XACC-AMOUNT", vtype)) {
|
||||||
|
decl = "bfxAmount";
|
||||||
|
} else
|
||||||
|
|
||||||
|
if (!strcmp ("XACC-BOOL", vtype)) {
|
||||||
|
decl = "bfxBool";
|
||||||
|
} else
|
||||||
|
|
||||||
|
if (!strcmp ("XACC-DTTM", vtype)) {
|
||||||
|
decl = "bfxDttm";
|
||||||
|
} else
|
||||||
|
|
||||||
|
if (!strcmp ("XACC-ID", vtype)) {
|
||||||
|
decl = "bfxId";
|
||||||
|
} else
|
||||||
|
|
||||||
|
if (!strcmp ("XACC-INT", vtype)) {
|
||||||
|
decl = "bfxInt";
|
||||||
|
} else
|
||||||
|
|
||||||
|
if (!strcmp ("XACC-PRICE", vtype)) {
|
||||||
|
decl = "bfxPrice";
|
||||||
|
} else
|
||||||
|
|
||||||
|
if (!strcmp ("XACC-RATE", vtype)) {
|
||||||
|
decl = "bfxRate";
|
||||||
|
} else
|
||||||
|
|
||||||
|
if (!strcmp ("XACC-STR", vtype)) {
|
||||||
|
decl = "bfxStr";
|
||||||
|
} else
|
||||||
|
|
||||||
|
if (!strcmp ("XACC-SRVRID", vtype)) {
|
||||||
|
decl = "bfxSrvrid";
|
||||||
|
} else
|
||||||
|
|
||||||
|
if (!strcmp ("XACC-URL", vtype)) {
|
||||||
|
decl = "bfxUrl";
|
||||||
|
} else
|
||||||
|
|
||||||
|
if (!strcmp ("XACC-UUID", vtype)) {
|
||||||
|
decl = "bfxUuid";
|
||||||
|
} else
|
||||||
|
|
||||||
|
printf ("---> unknown type >%s<\n", vtype);
|
||||||
|
|
||||||
|
|
||||||
|
// handle repeated lists
|
||||||
|
pfxLangOutput::occ currance;
|
||||||
|
switch ( token.occurrenceIndicator()) {
|
||||||
|
|
||||||
|
// element *must* occur
|
||||||
|
case ContentToken::none:
|
||||||
|
currance = pfxLangOutput::MUST;
|
||||||
|
break;
|
||||||
|
|
||||||
|
// element may or may not occur
|
||||||
|
case ContentToken::opt:
|
||||||
|
currance = pfxLangOutput::OPT;
|
||||||
|
break;
|
||||||
|
|
||||||
|
// element must occur at least once, maybe more times.
|
||||||
|
case ContentToken::plus:
|
||||||
|
currance = pfxLangOutput::PLUS;
|
||||||
|
break;
|
||||||
|
|
||||||
|
// element may occur zero or more times
|
||||||
|
case ContentToken::rep:
|
||||||
|
currance = pfxLangOutput::REP;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
// printed var names will be lower case
|
||||||
|
char * vname = pfxToLower (varname);
|
||||||
|
|
||||||
|
char * saveprefix = prtout->prefix;
|
||||||
|
|
||||||
|
prtout -> prefix = "";
|
||||||
|
prtout -> PrintMember (currance, decl, vname);
|
||||||
|
prtout -> prefix = saveprefix;
|
||||||
|
|
||||||
|
delete vname;
|
||||||
|
delete varname;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
char *
|
||||||
|
pfxBaseType :: GetBaseType (char * vname)
|
||||||
|
{
|
||||||
|
|
||||||
|
for (int i = 0; i<nvars; i++) {
|
||||||
|
if (!strcmp (vname, varname[i])) return vartype[i];
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0x0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef SP_NAMESPACE
|
||||||
|
}
|
||||||
|
#endif
|
51
src/experimental/ofx/parser/pfxBaseTypes.h
Normal file
51
src/experimental/ofx/parser/pfxBaseTypes.h
Normal file
@ -0,0 +1,51 @@
|
|||||||
|
//
|
||||||
|
// FILE:
|
||||||
|
// pfxBaseTypes.h
|
||||||
|
//
|
||||||
|
// FUNCTION:
|
||||||
|
// Handles OFX base types
|
||||||
|
//
|
||||||
|
// HISTORY:
|
||||||
|
// Written by Linas Vepstas March 1998
|
||||||
|
|
||||||
|
#ifndef __PFX_BASE_TYPES_H__
|
||||||
|
#define __PFX_BASE_TYPES_H__
|
||||||
|
|
||||||
|
#include "config.h"
|
||||||
|
#include "DtdParser.h"
|
||||||
|
|
||||||
|
#include "pfxUtils.h"
|
||||||
|
#include "pfxBaseTypes.h"
|
||||||
|
#include "pfxLangOut.h"
|
||||||
|
|
||||||
|
// ===========================================================
|
||||||
|
// class pfxBaseType stores & handles base types
|
||||||
|
|
||||||
|
// AddBaseVar adds a new variable with a base type.
|
||||||
|
// returns pointer to variable name if a base type, else returns null.
|
||||||
|
|
||||||
|
#define MAXVARS 3000
|
||||||
|
|
||||||
|
class pfxBaseType {
|
||||||
|
public:
|
||||||
|
pfxBaseType (void);
|
||||||
|
|
||||||
|
char * AddBaseVar (const ElementType *);
|
||||||
|
char * GetBaseType (char *varname);
|
||||||
|
void PrintBaseTypes (int dent);
|
||||||
|
void PrintBaseDecl (const ContentToken & token);
|
||||||
|
|
||||||
|
pfxLangOutput *prtout;
|
||||||
|
|
||||||
|
private:
|
||||||
|
char * varname[MAXVARS];
|
||||||
|
char * vartype[MAXVARS];
|
||||||
|
int nvars;
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
#ifdef SP_NAMESPACE
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /* __PFX_BASE_TYPES_H__ */
|
438
src/experimental/ofx/parser/pfxCompTypes.C
Normal file
438
src/experimental/ofx/parser/pfxCompTypes.C
Normal file
@ -0,0 +1,438 @@
|
|||||||
|
//
|
||||||
|
// FILE:
|
||||||
|
// pfxCompTypes.C
|
||||||
|
//
|
||||||
|
// FUNCTION:
|
||||||
|
// Parses OFX dtd's
|
||||||
|
//
|
||||||
|
// HISTORY:
|
||||||
|
// Written by Linas Vepstas March 1998
|
||||||
|
|
||||||
|
#include <ctype.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <string.h>
|
||||||
|
#include <time.h>
|
||||||
|
|
||||||
|
#include "config.h"
|
||||||
|
#include "DtdParser.h"
|
||||||
|
|
||||||
|
#include "pfxBaseTypes.h"
|
||||||
|
#include "pfxCompTypes.h"
|
||||||
|
#include "pfxUtils.h"
|
||||||
|
|
||||||
|
|
||||||
|
// =====================================================
|
||||||
|
|
||||||
|
pfxCompoundType :: pfxCompoundType (void)
|
||||||
|
{
|
||||||
|
nclasses = 0;
|
||||||
|
classname[0] = 0x0;
|
||||||
|
}
|
||||||
|
|
||||||
|
char *
|
||||||
|
pfxCompoundType :: IsClass (char * vname)
|
||||||
|
{
|
||||||
|
for (int i = 0; i<nclasses; i++) {
|
||||||
|
if (!strcmp (vname, classname[i])) return classname[i];
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0x0;
|
||||||
|
}
|
||||||
|
|
||||||
|
char *
|
||||||
|
pfxCompoundType :: AddCompoundType (const ElementType *type)
|
||||||
|
{
|
||||||
|
|
||||||
|
// its not a compound type unless we have a model group.
|
||||||
|
if (ElementDefinition::modelGroup !=
|
||||||
|
type->definition()->declaredContent()) return 0x0;
|
||||||
|
|
||||||
|
// make sure its not a base type
|
||||||
|
char * basename = AddBaseVar (type);
|
||||||
|
if (basename) return 0x0;
|
||||||
|
|
||||||
|
const ModelGroup * mg;
|
||||||
|
mg = type->definition()->compiledModelGroup()->modelGroup();
|
||||||
|
|
||||||
|
char * cname = pfxCharify (type->name());
|
||||||
|
|
||||||
|
classname [nclasses] = cname;
|
||||||
|
nclasses ++;
|
||||||
|
|
||||||
|
char * pname = pfxCapLower (cname);
|
||||||
|
printf ("class cfx%s;\n", pname);
|
||||||
|
delete pname;
|
||||||
|
|
||||||
|
return cname;
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
pfxCompoundType :: PrintMember (const ContentToken & token)
|
||||||
|
{
|
||||||
|
if (!prtout) return;
|
||||||
|
|
||||||
|
// print an individual member
|
||||||
|
const LeafContentToken * leaf = token.asLeafContentToken();
|
||||||
|
const ElementType * elementType = leaf->elementType();
|
||||||
|
if (!elementType) return;
|
||||||
|
|
||||||
|
char * varname = pfxCharify (elementType->name());
|
||||||
|
|
||||||
|
// see if its a base type -- e.g. int, double, etc.
|
||||||
|
char * basetype = GetBaseType (varname);
|
||||||
|
if (basetype) {
|
||||||
|
PrintBaseDecl (token);
|
||||||
|
} else {
|
||||||
|
|
||||||
|
// Not base type. Must be a class
|
||||||
|
char * classtype = IsClass (varname);
|
||||||
|
if (classtype) {
|
||||||
|
char * decl = pfxCapLower (varname);
|
||||||
|
char * var = pfxToLower (varname);
|
||||||
|
|
||||||
|
// look to see if the element occurs
|
||||||
|
// once, more than once, etc.
|
||||||
|
switch ( token.occurrenceIndicator()) {
|
||||||
|
|
||||||
|
// element *must* occur
|
||||||
|
case ContentToken::none:
|
||||||
|
prtout -> PrintMember (pfxLangOutput::MUST, decl, var);
|
||||||
|
break;
|
||||||
|
|
||||||
|
// element may or may not occur
|
||||||
|
case ContentToken::opt:
|
||||||
|
prtout -> PrintMember (pfxLangOutput::OPT, decl, var);
|
||||||
|
break;
|
||||||
|
|
||||||
|
// element must occur at least once, maybe more times.
|
||||||
|
case ContentToken::plus:
|
||||||
|
prtout -> PrintMember (pfxLangOutput::PLUS, decl, var);
|
||||||
|
break;
|
||||||
|
|
||||||
|
// element may occur zero or more times
|
||||||
|
case ContentToken::rep:
|
||||||
|
prtout -> PrintMember (pfxLangOutput::REP, decl, var);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
delete decl;
|
||||||
|
delete var;
|
||||||
|
} else {
|
||||||
|
printf (" this variable has no type -----> %s \n", varname);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
delete varname;
|
||||||
|
}
|
||||||
|
|
||||||
|
int
|
||||||
|
pfxCompoundType :: IsUnion (const ModelGroup * mg)
|
||||||
|
{
|
||||||
|
if (ModelGroup::orConnector == mg->connector()) return 1;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
char *
|
||||||
|
pfxCompoundType :: GetUnnamedClassName (const ContentToken & untoken)
|
||||||
|
{
|
||||||
|
const ModelGroup * mg = untoken.asModelGroup();
|
||||||
|
|
||||||
|
if (!mg) {
|
||||||
|
printf ("Error: GetUnnamedClassName: unexpected non model \n");
|
||||||
|
return 0x0;
|
||||||
|
}
|
||||||
|
|
||||||
|
// The connector *must* be a sequence or a logical-AND type in order
|
||||||
|
// for this to be a struct.
|
||||||
|
if ((ModelGroup::andConnector != mg->connector()) &&
|
||||||
|
(ModelGroup::seqConnector != mg->connector())) return 0x0;
|
||||||
|
|
||||||
|
|
||||||
|
// create a long compound name
|
||||||
|
// first, count the length of that name
|
||||||
|
int i = 0;
|
||||||
|
int namelen = 0;
|
||||||
|
while (i < mg->nMembers()) {
|
||||||
|
const ContentToken & token = mg->member( i);
|
||||||
|
const ModelGroup * subModel = token.asModelGroup();
|
||||||
|
|
||||||
|
if (!subModel) {
|
||||||
|
const LeafContentToken * leaf = token.asLeafContentToken();
|
||||||
|
const ElementType * elementType = leaf->elementType();
|
||||||
|
namelen += (elementType->name()).size() + 1;
|
||||||
|
}
|
||||||
|
i++;
|
||||||
|
}
|
||||||
|
|
||||||
|
// now, build the compund name
|
||||||
|
i = 0;
|
||||||
|
char * name = new char [namelen+1];
|
||||||
|
name[0] = 0x0;
|
||||||
|
while (i < mg->nMembers()) {
|
||||||
|
const ContentToken & token = mg->member( i);
|
||||||
|
const ModelGroup * subModel = token.asModelGroup();
|
||||||
|
|
||||||
|
if (!subModel) {
|
||||||
|
const LeafContentToken * leaf = token.asLeafContentToken();
|
||||||
|
const ElementType * elementType = leaf->elementType();
|
||||||
|
|
||||||
|
char * varname = pfxCharify (elementType->name());
|
||||||
|
char * capname = pfxCapLower (varname);
|
||||||
|
strcat (name, "_");
|
||||||
|
strcat (name, capname);
|
||||||
|
}
|
||||||
|
i++;
|
||||||
|
}
|
||||||
|
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
pfxCompoundType :: PrintMacroDecl (const ContentToken & untoken)
|
||||||
|
{
|
||||||
|
const ModelGroup * mg = untoken.asModelGroup();
|
||||||
|
|
||||||
|
if (!mg) {
|
||||||
|
printf ("Error: PrintMacroDecl: unexpected non model \n");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// If connector is a sequence or a logical-AND type,
|
||||||
|
// then treat as a class.
|
||||||
|
if ((ModelGroup::andConnector == mg->connector()) ||
|
||||||
|
(ModelGroup::seqConnector == mg->connector())) {
|
||||||
|
|
||||||
|
PrintUnnamedClassDecl (untoken);
|
||||||
|
PrintUnnamedInstance (untoken);
|
||||||
|
} else
|
||||||
|
|
||||||
|
// If the connector is a logical-OR connector,
|
||||||
|
// then treat as a union
|
||||||
|
if (ModelGroup::orConnector == mg->connector()) {
|
||||||
|
PrintUnionDecl (untoken);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
pfxCompoundType :: PrintUnnamedClassDecl (const ContentToken & untoken)
|
||||||
|
{
|
||||||
|
const ModelGroup * mg = untoken.asModelGroup();
|
||||||
|
|
||||||
|
if (!mg) {
|
||||||
|
printf ("Error: PrintUnnamedClassDecl: unexpected non model \n");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// The connector *must* be a sequence or a logical-AND type in order
|
||||||
|
// for this to be a struct.
|
||||||
|
if ((ModelGroup::andConnector != mg->connector()) &&
|
||||||
|
(ModelGroup::seqConnector != mg->connector())) return;
|
||||||
|
|
||||||
|
char * name = GetUnnamedClassName (untoken);
|
||||||
|
|
||||||
|
// If the returned name of the thing is null, then
|
||||||
|
// I think we can safely assume that this thing is
|
||||||
|
// the result of a macro expansion in the DTD.
|
||||||
|
// This means that there is no true heirarchy, even
|
||||||
|
// though there is an appearent heirarchy. So,
|
||||||
|
// don't let things nest. Just flatten it.
|
||||||
|
// We flatten by not printing the prolog or epilogue
|
||||||
|
// (since there really isn't a prolog or epilog).
|
||||||
|
|
||||||
|
// now, print the class definition
|
||||||
|
if (name[0]) prtout->PrintClassProlog (name);
|
||||||
|
int i = 0;
|
||||||
|
while (i < mg->nMembers()) {
|
||||||
|
const ContentToken & token = mg->member( i);
|
||||||
|
const ModelGroup * subModel = token.asModelGroup();
|
||||||
|
if (subModel) {
|
||||||
|
printf (" // -------> begin flattening \n");
|
||||||
|
PrintMacroDecl (token);
|
||||||
|
printf (" // -------> end flattening \n");
|
||||||
|
} else {
|
||||||
|
// put the member elements into the class declaration
|
||||||
|
PrintMember(token);
|
||||||
|
}
|
||||||
|
i++;
|
||||||
|
}
|
||||||
|
if (name[0]) prtout->PrintClassEpilog (name);
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
pfxCompoundType :: PrintUnnamedInstance (const ContentToken & untoken)
|
||||||
|
{
|
||||||
|
const ModelGroup * mg = untoken.asModelGroup();
|
||||||
|
|
||||||
|
if (!mg) {
|
||||||
|
printf ("Error: PrintUnnamedInstance: unexpected non model \n");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// The connector *must* be a sequence or a logical-AND type in order
|
||||||
|
// for this to be a struct.
|
||||||
|
if ((ModelGroup::andConnector != mg->connector()) &&
|
||||||
|
(ModelGroup::seqConnector != mg->connector())) return;
|
||||||
|
|
||||||
|
|
||||||
|
char * name = GetUnnamedClassName (untoken);
|
||||||
|
|
||||||
|
// now handle repeated lists
|
||||||
|
pfxLangOutput::occ currance;
|
||||||
|
switch ( untoken.occurrenceIndicator()) {
|
||||||
|
|
||||||
|
// element *must* occur
|
||||||
|
case ContentToken::none:
|
||||||
|
currance = pfxLangOutput::MUST;
|
||||||
|
break;
|
||||||
|
|
||||||
|
// element may or may not occur
|
||||||
|
case ContentToken::opt:
|
||||||
|
currance = pfxLangOutput::OPT;
|
||||||
|
break;
|
||||||
|
|
||||||
|
// element must occur at least once, maybe more times.
|
||||||
|
case ContentToken::plus:
|
||||||
|
currance = pfxLangOutput::PLUS;
|
||||||
|
break;
|
||||||
|
|
||||||
|
// element may occur zero or more times
|
||||||
|
case ContentToken::rep:
|
||||||
|
currance = pfxLangOutput::REP;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
prtout ->PrintMember (currance, name, name);
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
pfxCompoundType :: PrintUnionDecl (const ContentToken & untoken)
|
||||||
|
{
|
||||||
|
|
||||||
|
const ModelGroup * mg = untoken.asModelGroup();
|
||||||
|
|
||||||
|
if (!mg) {
|
||||||
|
printf ("Error: PrintUnionDecl: unexpected non model \n");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// The connector *must* be logical-OR type in order
|
||||||
|
// for this to be a union.
|
||||||
|
if (ModelGroup::orConnector != mg->connector()) return;
|
||||||
|
|
||||||
|
// now handle repeated lists
|
||||||
|
pfxLangOutput::occ currance;
|
||||||
|
switch ( untoken.occurrenceIndicator()) {
|
||||||
|
|
||||||
|
// element *must* occur
|
||||||
|
case ContentToken::none:
|
||||||
|
currance = pfxLangOutput::MUST;
|
||||||
|
break;
|
||||||
|
|
||||||
|
// element may or may not occur
|
||||||
|
case ContentToken::opt:
|
||||||
|
currance = pfxLangOutput::OPT;
|
||||||
|
break;
|
||||||
|
|
||||||
|
// element must occur at least once, maybe more times.
|
||||||
|
case ContentToken::plus:
|
||||||
|
currance = pfxLangOutput::PLUS;
|
||||||
|
break;
|
||||||
|
|
||||||
|
// element may occur zero or more times
|
||||||
|
case ContentToken::rep:
|
||||||
|
currance = pfxLangOutput::REP;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
// if there are any groups that occur,
|
||||||
|
// lets create a name for them, and print
|
||||||
|
// thier declarations
|
||||||
|
int i = 0;
|
||||||
|
while (i < mg->nMembers()) {
|
||||||
|
const ContentToken & token = mg->member( i);
|
||||||
|
const ModelGroup * subModel = token.asModelGroup();
|
||||||
|
if (subModel) {
|
||||||
|
// ack -- its an un-named, compound type
|
||||||
|
PrintUnnamedClassDecl (token);
|
||||||
|
}
|
||||||
|
i++;
|
||||||
|
}
|
||||||
|
|
||||||
|
// OK, now print the union
|
||||||
|
prtout ->PrintUnionProlog (currance, "abcd");
|
||||||
|
|
||||||
|
i = 0;
|
||||||
|
while (i < mg->nMembers()) {
|
||||||
|
const ContentToken & token = mg->member( i);
|
||||||
|
const ModelGroup * subModel = token.asModelGroup();
|
||||||
|
if (subModel) {
|
||||||
|
// ack -- its an un-named, compound type
|
||||||
|
PrintUnnamedInstance (token);
|
||||||
|
} else {
|
||||||
|
// put the member elements into the class declaration
|
||||||
|
PrintMember (token);
|
||||||
|
}
|
||||||
|
i++;
|
||||||
|
}
|
||||||
|
|
||||||
|
prtout ->PrintUnionEpilog (currance, "abcd");
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
pfxCompoundType :: PrintGroupMembers (const ModelGroup * mg)
|
||||||
|
{
|
||||||
|
|
||||||
|
int i = 0;
|
||||||
|
while (i < mg->nMembers()) {
|
||||||
|
const ContentToken & token = mg->member( i);
|
||||||
|
const ModelGroup * subModel = token.asModelGroup();
|
||||||
|
|
||||||
|
if ( subModel) {
|
||||||
|
if (ModelGroup::orConnector == subModel->connector()) {
|
||||||
|
PrintUnionDecl (token);
|
||||||
|
|
||||||
|
} else {
|
||||||
|
if (ContentToken::none == token.occurrenceIndicator()) {
|
||||||
|
PrintGroupMembers (subModel);
|
||||||
|
} else {
|
||||||
|
// ack -- its an un-named, compound type
|
||||||
|
PrintUnnamedClassDecl (token);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
|
||||||
|
// put the member elements into the class declaration
|
||||||
|
PrintMember (token);
|
||||||
|
}
|
||||||
|
|
||||||
|
i++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
pfxCompoundType :: PrintClass (const ElementType *type)
|
||||||
|
{
|
||||||
|
|
||||||
|
// its not a compound type unless we have a model group.
|
||||||
|
if (ElementDefinition::modelGroup !=
|
||||||
|
type->definition()->declaredContent()) return;
|
||||||
|
|
||||||
|
const ModelGroup * mg;
|
||||||
|
mg = type->definition()->compiledModelGroup()->modelGroup();
|
||||||
|
|
||||||
|
// open the class declaration
|
||||||
|
char * cname = pfxCharify (type->name());
|
||||||
|
char * pname = pfxCapLower (cname);
|
||||||
|
|
||||||
|
prtout->PrintClassProlog (pname);
|
||||||
|
|
||||||
|
PrintGroupMembers (mg);
|
||||||
|
|
||||||
|
prtout->PrintClassEpilog (pname);
|
||||||
|
}
|
||||||
|
|
||||||
|
// ===========================================================
|
||||||
|
|
||||||
|
#ifdef SP_NAMESPACE
|
||||||
|
}
|
||||||
|
#endif
|
57
src/experimental/ofx/parser/pfxCompTypes.h
Normal file
57
src/experimental/ofx/parser/pfxCompTypes.h
Normal file
@ -0,0 +1,57 @@
|
|||||||
|
//
|
||||||
|
// FILE:
|
||||||
|
// pfxCompTypes.h
|
||||||
|
//
|
||||||
|
// FUNCTION:
|
||||||
|
// Parses OFX dtd's
|
||||||
|
//
|
||||||
|
// HISTORY:
|
||||||
|
// Written by Linas Vepstas March 1998
|
||||||
|
|
||||||
|
#ifndef __PFX_COMP_TYPES_H__
|
||||||
|
#define __PFX_COMP_TYPES_H__
|
||||||
|
|
||||||
|
#include "config.h"
|
||||||
|
#include "DtdParser.h"
|
||||||
|
|
||||||
|
#include "pfxBaseTypes.h"
|
||||||
|
#include "pfxUtils.h"
|
||||||
|
|
||||||
|
|
||||||
|
// ===========================================================
|
||||||
|
// handles compund types
|
||||||
|
// IsUnion returns true if its pure-or
|
||||||
|
|
||||||
|
class pfxCompoundType :
|
||||||
|
public pfxBaseType
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
pfxCompoundType (void);
|
||||||
|
char * AddCompoundType (const ElementType *);
|
||||||
|
|
||||||
|
void PrintClass (const ElementType *);
|
||||||
|
|
||||||
|
void PrintMember (const ContentToken &);
|
||||||
|
|
||||||
|
int IsUnion (const ModelGroup *);
|
||||||
|
void PrintUnionDecl (const ContentToken &);
|
||||||
|
void PrintMacroDecl (const ContentToken &);
|
||||||
|
|
||||||
|
char * GetUnnamedClassName (const ContentToken &);
|
||||||
|
void PrintUnnamedClassDecl (const ContentToken &);
|
||||||
|
void PrintUnnamedInstance (const ContentToken &);
|
||||||
|
|
||||||
|
void PrintGroupMembers (const ModelGroup *);
|
||||||
|
|
||||||
|
char * IsClass (char *);
|
||||||
|
|
||||||
|
private:
|
||||||
|
char * classname[MAXVARS];
|
||||||
|
int nclasses;
|
||||||
|
};
|
||||||
|
|
||||||
|
#ifdef SP_NAMESPACE
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /* __PFX_COMP_TYPES_H__ */
|
319
src/experimental/ofx/parser/pfxLangOut.C
Normal file
319
src/experimental/ofx/parser/pfxLangOut.C
Normal file
@ -0,0 +1,319 @@
|
|||||||
|
//
|
||||||
|
// FILE:
|
||||||
|
// pfxLangOut.C
|
||||||
|
//
|
||||||
|
// FUNCTION:
|
||||||
|
// Prints the C++ equivalents of the OFX dtd's
|
||||||
|
// The actual implementation of this stuff is very
|
||||||
|
// much of an ugly hack. Sorry.
|
||||||
|
//
|
||||||
|
// HISTORY:
|
||||||
|
// Written by Linas Vepstas April 1998
|
||||||
|
|
||||||
|
#include <ctype.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <string.h>
|
||||||
|
|
||||||
|
#include "config.h"
|
||||||
|
|
||||||
|
#include "pfxLangOut.h"
|
||||||
|
#include "pfxUtils.h"
|
||||||
|
|
||||||
|
pfxLangOutput :: pfxLangOutput (void)
|
||||||
|
{
|
||||||
|
dent = 0;
|
||||||
|
prefix = 0x0;
|
||||||
|
}
|
||||||
|
|
||||||
|
// =======================================================
|
||||||
|
pfxOutDecl :: pfxOutDecl (void)
|
||||||
|
{
|
||||||
|
nelts = 0;
|
||||||
|
doing_union = 0;
|
||||||
|
doing_class = 0;
|
||||||
|
nth_union = 0;
|
||||||
|
prefix = strdup("cfx");
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
pfxOutDecl :: PrintClassProlog (char * decl)
|
||||||
|
{
|
||||||
|
if (0 == doing_class) nth_union = 0;
|
||||||
|
doing_class = 1;
|
||||||
|
|
||||||
|
DENT (dent); printf ("\n\n");
|
||||||
|
DENT (dent); printf ("class cfx%s \n", decl);
|
||||||
|
DENT (dent); printf ("{ \n");
|
||||||
|
DENT (dent); printf (" public:\n");
|
||||||
|
DENT (dent); printf (" cfx%s (void); // constructor \n", decl);
|
||||||
|
DENT (dent); printf (" virtual ~cfx%s (); // destructor \n", decl);
|
||||||
|
DENT (dent); printf ("\n");
|
||||||
|
|
||||||
|
dent +=2;
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
pfxOutDecl :: PrintClassEpilog (char * decl)
|
||||||
|
{
|
||||||
|
doing_class = 0;
|
||||||
|
dent -=2;
|
||||||
|
DENT (dent); printf ("};\n");
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
pfxOutDecl :: PrintUnionProlog (occ rance, char * decl)
|
||||||
|
{
|
||||||
|
doing_union = 1;
|
||||||
|
nth_union ++;
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
pfxOutDecl :: PrintUnionEpilog (occ rance, char * decl)
|
||||||
|
{
|
||||||
|
// not an onion any more, so that PrintMember will revert to normal
|
||||||
|
doing_union = 0;
|
||||||
|
|
||||||
|
// print enumerated type for the union members
|
||||||
|
DENT (dent); printf ("enum Enum%d{\n", nth_union);
|
||||||
|
for (int i=0; i<nelts; i++) {
|
||||||
|
DENT (dent+1); printf ("T_%s,\n", pfxToUpper (varname[i]));
|
||||||
|
}
|
||||||
|
DENT (dent); printf ("};\n\n");
|
||||||
|
|
||||||
|
// print the union declaration
|
||||||
|
DENT (dent); printf ("union Union%d{\n", nth_union);
|
||||||
|
dent ++;
|
||||||
|
for (int i=0; i<nelts; i++) {
|
||||||
|
char * savefix = prefix;
|
||||||
|
prefix = refix[i];
|
||||||
|
PrintMember (currance[i], declaration[i], varname[i]);
|
||||||
|
prefix = savefix;
|
||||||
|
}
|
||||||
|
dent --;
|
||||||
|
DENT (dent); printf ("};\n\n");
|
||||||
|
|
||||||
|
// print the type that will identify the union
|
||||||
|
DENT (dent); printf ("Enum%d utype%d;\n", nth_union, nth_union);
|
||||||
|
|
||||||
|
// print an instance of the union
|
||||||
|
char docl[20];
|
||||||
|
char vor[20];
|
||||||
|
sprintf (docl, "Union%d", nth_union);
|
||||||
|
sprintf (vor, "onion%d", nth_union);
|
||||||
|
char * saveprefix = prefix;
|
||||||
|
prefix = "";
|
||||||
|
PrintMember (rance, docl, vor);
|
||||||
|
prefix = saveprefix;
|
||||||
|
DENT (dent); printf ("\n");
|
||||||
|
|
||||||
|
nelts = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
pfxOutDecl :: PrintMember (occ rance, char * decl, char * var)
|
||||||
|
{
|
||||||
|
// for handling a union, just collect the names
|
||||||
|
if (doing_union) {
|
||||||
|
declaration.insert (declaration.begin()+ nelts, strdup (decl));
|
||||||
|
varname.insert (varname.begin()+ nelts, strdup (var));
|
||||||
|
refix.insert (refix.begin()+ nelts, strdup (prefix));
|
||||||
|
currance.insert (currance.begin()+ nelts, rance);
|
||||||
|
nelts ++;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// for handling ordinary class members, just print them.
|
||||||
|
switch (rance) {
|
||||||
|
case MUST:
|
||||||
|
if (0 < nth_union) {
|
||||||
|
printf ("\n");
|
||||||
|
DENT (dent);
|
||||||
|
printf ("// %s *must* be present \n", decl);
|
||||||
|
}
|
||||||
|
|
||||||
|
DENT (dent);
|
||||||
|
printf ("%s%s *%s; \n", prefix, decl, var);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case OPT:
|
||||||
|
if (0 < nth_union) {
|
||||||
|
printf ("\n");
|
||||||
|
DENT (dent);
|
||||||
|
printf ("// %s may be a null pointer \n", decl);
|
||||||
|
}
|
||||||
|
|
||||||
|
DENT (dent);
|
||||||
|
printf ("%s%s *%s; \n", prefix, decl, var);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case PLUS:
|
||||||
|
if (0 < nth_union) {
|
||||||
|
printf ("\n");
|
||||||
|
DENT (dent);
|
||||||
|
printf ("// %s is a list of one or more items \n", decl);
|
||||||
|
}
|
||||||
|
|
||||||
|
DENT (dent);
|
||||||
|
printf ("%s%s **%s; \n", prefix, decl, var);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case REP:
|
||||||
|
if (0 < nth_union) {
|
||||||
|
printf ("\n");
|
||||||
|
DENT (dent);
|
||||||
|
printf ("// %s is a list of zero or more items \n", decl);
|
||||||
|
}
|
||||||
|
|
||||||
|
DENT (dent);
|
||||||
|
printf ("%s%s **%s; \n", prefix, decl, var);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// =======================================================
|
||||||
|
|
||||||
|
pfxOutConstructor :: pfxOutConstructor (void)
|
||||||
|
{
|
||||||
|
prefix = strdup ("cfx");
|
||||||
|
doing_union = 0;
|
||||||
|
doing_class = 0;
|
||||||
|
nth_union = 0;
|
||||||
|
done_union = 0;
|
||||||
|
nelts = 0;
|
||||||
|
nest = 0x0;
|
||||||
|
scope [0] = 0x0;
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
pfxOutConstructor :: PrintClassProlog (char * decl)
|
||||||
|
{
|
||||||
|
if (0 == doing_class) nth_union = 0;
|
||||||
|
|
||||||
|
// check for subclass nesting
|
||||||
|
if (doing_class) {
|
||||||
|
nest = new pfxOutConstructor ();
|
||||||
|
strcpy (nest -> scope, scope);
|
||||||
|
nest->dent = dent;
|
||||||
|
nest->PrintClassProlog (decl);
|
||||||
|
} else {
|
||||||
|
strcpy (classname, prefix);
|
||||||
|
strcat (classname, decl);
|
||||||
|
strcat (scope, classname);
|
||||||
|
strcat (scope, " :: ");
|
||||||
|
}
|
||||||
|
doing_class = 1;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
pfxOutConstructor :: PrintClassEpilog (char * decl)
|
||||||
|
{
|
||||||
|
// handle subclass nesting
|
||||||
|
if (nest) {
|
||||||
|
nest -> PrintClassEpilog (decl);
|
||||||
|
delete nest;
|
||||||
|
nest = 0x0;
|
||||||
|
}
|
||||||
|
|
||||||
|
doing_class = 0;
|
||||||
|
DENT (dent); printf ("\n\n");
|
||||||
|
DENT (dent); printf ("%s %s (void)\n", scope, classname);
|
||||||
|
DENT (dent); printf ("{\n");
|
||||||
|
dent ++;
|
||||||
|
for (int i=0; i<nelts; i++) {
|
||||||
|
if (override[i][0]) {
|
||||||
|
DENT (dent); printf ("%s", override[i]);
|
||||||
|
} else {
|
||||||
|
PrintMember (currance[i], declaration[i], varname[i]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
dent --;
|
||||||
|
DENT (dent); printf ("}\n");
|
||||||
|
|
||||||
|
nelts = 0;
|
||||||
|
scope[0] = 0x0;
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
pfxOutConstructor :: PrintUnionProlog (occ rance, char * decl)
|
||||||
|
{
|
||||||
|
nth_union ++;
|
||||||
|
doing_union = 1;
|
||||||
|
done_union = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
pfxOutConstructor :: PrintUnionEpilog (occ rance, char * decl)
|
||||||
|
{
|
||||||
|
doing_union = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
pfxOutConstructor :: PrintMember (occ rance, char * decl, char * var)
|
||||||
|
{
|
||||||
|
if (nest) {
|
||||||
|
nest -> PrintMember (rance, decl, var);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (doing_class) {
|
||||||
|
if (doing_union) {
|
||||||
|
if (done_union) return;
|
||||||
|
|
||||||
|
char buff[1000];
|
||||||
|
sprintf (buff,
|
||||||
|
"utype%d = T_%s;\n", nth_union, pfxToUpper (decl));
|
||||||
|
override.insert (override.begin()+ nelts, strdup (buff));
|
||||||
|
nelts ++;
|
||||||
|
|
||||||
|
done_union = 1;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
declaration.insert (declaration.begin()+ nelts, strdup (decl));
|
||||||
|
varname.insert (varname.begin()+ nelts, strdup (var));
|
||||||
|
refix.insert (refix.begin()+ nelts, strdup (prefix));
|
||||||
|
override.insert (override.begin()+ nelts, strdup (""));
|
||||||
|
currance.insert (currance.begin()+ nelts, rance);
|
||||||
|
nelts ++;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
switch (rance) {
|
||||||
|
case MUST:
|
||||||
|
printf ("\n");
|
||||||
|
DENT (dent);
|
||||||
|
printf ("// %s *must* be present \n", decl);
|
||||||
|
|
||||||
|
DENT (dent);
|
||||||
|
printf ("%s = new %s%s; \n", var, prefix, decl);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case OPT:
|
||||||
|
printf ("\n");
|
||||||
|
DENT (dent);
|
||||||
|
printf ("// %s may be a null pointer \n", decl);
|
||||||
|
|
||||||
|
DENT (dent);
|
||||||
|
printf ("%s = 0x0; \n", var);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case PLUS:
|
||||||
|
printf ("\n");
|
||||||
|
DENT (dent);
|
||||||
|
printf ("// %s is a list of one or more items \n", decl);
|
||||||
|
|
||||||
|
DENT (dent);
|
||||||
|
printf ("%s = 0x0; \n", var);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case REP:
|
||||||
|
printf ("\n");
|
||||||
|
DENT (dent);
|
||||||
|
printf ("// %s is a list of zero or more items \n", decl);
|
||||||
|
|
||||||
|
DENT (dent);
|
||||||
|
printf ("%s = 0x0; \n", var);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
107
src/experimental/ofx/parser/pfxLangOut.h
Normal file
107
src/experimental/ofx/parser/pfxLangOut.h
Normal file
@ -0,0 +1,107 @@
|
|||||||
|
//
|
||||||
|
// FILE:
|
||||||
|
// pfxLangOut.h
|
||||||
|
//
|
||||||
|
// FUNCTION:
|
||||||
|
// print language specific output
|
||||||
|
// In this case, this generates C++ output
|
||||||
|
//
|
||||||
|
// HISTORY:
|
||||||
|
// Written by Linas Vepstas April 1998
|
||||||
|
|
||||||
|
#ifndef __PFX_COMP_OUT_H__
|
||||||
|
#define __PFX_COMP_OUT_H__
|
||||||
|
|
||||||
|
#include "config.h"
|
||||||
|
#include <vector.h>
|
||||||
|
|
||||||
|
// virtual base class for output
|
||||||
|
// This is the base class that is used by the parser to
|
||||||
|
// generate output.
|
||||||
|
class pfxLangOutput
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
enum occ {
|
||||||
|
MUST, OPT, PLUS, REP };
|
||||||
|
pfxLangOutput (void);
|
||||||
|
virtual void PrintClassProlog (char *hilo) = 0;
|
||||||
|
virtual void PrintClassEpilog (char *hilo) = 0;
|
||||||
|
virtual void PrintUnionProlog (occ, char *hilo) = 0;
|
||||||
|
virtual void PrintUnionEpilog (occ, char *hilo) = 0;
|
||||||
|
|
||||||
|
virtual void PrintMember (occ, char *hilo, char * lo) = 0;
|
||||||
|
|
||||||
|
char * prefix;
|
||||||
|
|
||||||
|
protected:
|
||||||
|
int dent;
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
// This class prints the class and union declarations
|
||||||
|
class pfxOutDecl :
|
||||||
|
public pfxLangOutput
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
pfxOutDecl (void);
|
||||||
|
virtual void PrintClassProlog (char *hilo);
|
||||||
|
virtual void PrintClassEpilog (char *hilo);
|
||||||
|
virtual void PrintUnionProlog (occ, char *hilo);
|
||||||
|
virtual void PrintUnionEpilog (occ, char *hilo);
|
||||||
|
|
||||||
|
virtual void PrintMember (occ, char *hilo, char * lo);
|
||||||
|
|
||||||
|
private:
|
||||||
|
short doing_union;
|
||||||
|
short doing_class;
|
||||||
|
int nth_union;
|
||||||
|
|
||||||
|
// When a union has been declared, these are used to store
|
||||||
|
// the members of the union. This is needed because
|
||||||
|
// declaring a union requires several repeats of the data,
|
||||||
|
// each in slightly different form.
|
||||||
|
vector<char *> declaration;
|
||||||
|
vector<char *> varname;
|
||||||
|
vector<char *> refix;
|
||||||
|
vector<occ> currance;
|
||||||
|
int nelts;
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
// This class prints the constructors
|
||||||
|
class pfxOutConstructor :
|
||||||
|
public pfxLangOutput
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
pfxOutConstructor (void);
|
||||||
|
virtual void PrintClassProlog (char *hilo);
|
||||||
|
virtual void PrintClassEpilog (char *hilo);
|
||||||
|
virtual void PrintUnionProlog (occ, char *hilo);
|
||||||
|
virtual void PrintUnionEpilog (occ, char *hilo);
|
||||||
|
|
||||||
|
virtual void PrintMember (occ, char *hilo, char * lo);
|
||||||
|
|
||||||
|
private:
|
||||||
|
short doing_union;
|
||||||
|
short doing_class;
|
||||||
|
int nth_union;
|
||||||
|
short done_union;
|
||||||
|
|
||||||
|
pfxOutConstructor *nest;
|
||||||
|
char scope[450];
|
||||||
|
char classname[450];
|
||||||
|
|
||||||
|
// when a class within a class has been dclared, we
|
||||||
|
// can't just create a constructor within the constructor.
|
||||||
|
// Thus, we need to defer the PrintMember() calls until the
|
||||||
|
// call to epilog has shown up.
|
||||||
|
int nelts;
|
||||||
|
vector<char *> declaration;
|
||||||
|
vector<char *> varname;
|
||||||
|
vector<char *> refix;
|
||||||
|
vector<char *> override;
|
||||||
|
vector<occ> currance;
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif /* __PFX_COMP_OUT_H__ */
|
92
src/experimental/ofx/parser/pfxUtils.C
Normal file
92
src/experimental/ofx/parser/pfxUtils.C
Normal file
@ -0,0 +1,92 @@
|
|||||||
|
//
|
||||||
|
// FILE:
|
||||||
|
// utils.C
|
||||||
|
//
|
||||||
|
// FUNCTION:
|
||||||
|
// Handles OFX base types
|
||||||
|
//
|
||||||
|
// HISTORY:
|
||||||
|
// Written by Linas Vepstas March 1998
|
||||||
|
|
||||||
|
#include <ctype.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <string.h>
|
||||||
|
|
||||||
|
#include "StringOf.h"
|
||||||
|
|
||||||
|
#include "config.h"
|
||||||
|
#include "pfxUtils.h"
|
||||||
|
|
||||||
|
#ifdef SP_NAMESPACE
|
||||||
|
namespace SP_NAMESPACE {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// ===========================================================
|
||||||
|
// convert the string type to an ordinary char *
|
||||||
|
|
||||||
|
char *
|
||||||
|
pfxCharify (const String<short unsigned int> &s)
|
||||||
|
{
|
||||||
|
int len = s.size ();
|
||||||
|
|
||||||
|
char * str = new char [len+1];
|
||||||
|
|
||||||
|
for (int i=0; i<len; i++) {
|
||||||
|
str[i] = s[i];
|
||||||
|
}
|
||||||
|
str[len] = 0x0;
|
||||||
|
|
||||||
|
return str;
|
||||||
|
}
|
||||||
|
|
||||||
|
char * pfxToLower (char * str)
|
||||||
|
{
|
||||||
|
int len = strlen (str);
|
||||||
|
|
||||||
|
char * low = new char [len+1];
|
||||||
|
|
||||||
|
for (int i=0; i<len; i++) {
|
||||||
|
low[i] = tolower (str[i]);
|
||||||
|
}
|
||||||
|
low[len] = 0x0;
|
||||||
|
|
||||||
|
return low;
|
||||||
|
}
|
||||||
|
|
||||||
|
char * pfxToUpper (char * str)
|
||||||
|
{
|
||||||
|
int len = strlen (str);
|
||||||
|
|
||||||
|
char * hi = new char [len+1];
|
||||||
|
|
||||||
|
for (int i=0; i<len; i++) {
|
||||||
|
hi[i] = toupper (str[i]);
|
||||||
|
}
|
||||||
|
hi[len] = 0x0;
|
||||||
|
|
||||||
|
return hi;
|
||||||
|
}
|
||||||
|
|
||||||
|
char * pfxCapLower (char * str)
|
||||||
|
{
|
||||||
|
int len = strlen (str);
|
||||||
|
|
||||||
|
char * low = new char [len+1];
|
||||||
|
|
||||||
|
for (int i=0; i<len; i++) {
|
||||||
|
low[i] = tolower (str[i]);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (1 < len) {
|
||||||
|
low[0] = str[0];
|
||||||
|
}
|
||||||
|
|
||||||
|
low[len] = 0x0;
|
||||||
|
|
||||||
|
return low;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef SP_NAMESPACE
|
||||||
|
}
|
||||||
|
#endif
|
40
src/experimental/ofx/parser/pfxUtils.h
Normal file
40
src/experimental/ofx/parser/pfxUtils.h
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
//
|
||||||
|
// FILE:
|
||||||
|
// pfxUtils.h
|
||||||
|
//
|
||||||
|
// FUNCTION:
|
||||||
|
// Assorted utilities
|
||||||
|
//
|
||||||
|
// HISTORY:
|
||||||
|
// Written by Linas Vepstas March 1998
|
||||||
|
|
||||||
|
|
||||||
|
#ifndef __PFX_UTILS_H__
|
||||||
|
#define __PFX_UTILS_H__
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
#include "StringOf.h"
|
||||||
|
|
||||||
|
#include "config.h"
|
||||||
|
|
||||||
|
#ifdef SP_NAMESPACE
|
||||||
|
namespace SP_NAMESPACE {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// ===========================================================
|
||||||
|
// convert the string type to an ordinary char *
|
||||||
|
|
||||||
|
char * pfxCharify (const String<short unsigned int> &s);
|
||||||
|
char * pfxToLower (char * str);
|
||||||
|
char * pfxToUpper (char * str);
|
||||||
|
char * pfxCapLower (char * str);
|
||||||
|
|
||||||
|
#define DENT(dent) { for (int bonk=0; bonk<(dent); bonk++) printf (" "); }
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef SP_NAMESPACE
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /* __PFX_UTILS_H__ */
|
60
src/experimental/ofx/parser/simple.C
Normal file
60
src/experimental/ofx/parser/simple.C
Normal file
@ -0,0 +1,60 @@
|
|||||||
|
//
|
||||||
|
// simple.C
|
||||||
|
//
|
||||||
|
// a direct rip-off of James Clark's sample program
|
||||||
|
// for the generic SP parser.
|
||||||
|
//
|
||||||
|
// The next two lines are only to ensure bool gets defined
|
||||||
|
// appropriately.
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
#include "config.h"
|
||||||
|
#include "Boolean.h"
|
||||||
|
|
||||||
|
#include "ParserEventGeneratorKit.h"
|
||||||
|
|
||||||
|
|
||||||
|
class OutlineApplication : public SGMLApplication {
|
||||||
|
public:
|
||||||
|
OutlineApplication() : depth_(0) { }
|
||||||
|
|
||||||
|
void PrtStr (const CharString &s) {
|
||||||
|
for (size_t i=0; i<s.len; i++) printf ("%c", s.ptr[2*i]);
|
||||||
|
printf ("\n");
|
||||||
|
}
|
||||||
|
|
||||||
|
void data (const DataEvent &event) {
|
||||||
|
PrtStr (event.data);
|
||||||
|
}
|
||||||
|
|
||||||
|
void startElement(const StartElementEvent &event) {
|
||||||
|
for (unsigned i = 0; i < depth_; i++) printf (" ");
|
||||||
|
PrtStr (event.gi);
|
||||||
|
depth_++;
|
||||||
|
}
|
||||||
|
|
||||||
|
void endElement(const EndElementEvent &) { depth_--; }
|
||||||
|
|
||||||
|
void startDtd (const StartDtdEvent &event) {
|
||||||
|
PrtStr (event.name);
|
||||||
|
}
|
||||||
|
|
||||||
|
void endDtd(const EndDtdEvent &event) {
|
||||||
|
PrtStr (event.name);
|
||||||
|
}
|
||||||
|
|
||||||
|
private:
|
||||||
|
unsigned depth_;
|
||||||
|
};
|
||||||
|
|
||||||
|
int main(int argc, char **argv)
|
||||||
|
{
|
||||||
|
ParserEventGeneratorKit parserKit;
|
||||||
|
// Use all the arguments after argv[0] as filenames.
|
||||||
|
EventGenerator *egp = parserKit.makeEventGenerator(argc - 1, argv + 1);
|
||||||
|
OutlineApplication app;
|
||||||
|
unsigned nErrors = egp->run(app);
|
||||||
|
delete egp;
|
||||||
|
return nErrors > 0;
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user