> 'stone' wrote:
> > I have a dtd file which uses syntax I don't understand. please help me.
> > They are as follows:
> > <!ELEMENT SVCDEL - - (%ACCTFROMMACRO)>
> > <!ELEMENT (INVSTMTMSGSRQV1, INVSTMTMSGSRQV2) - -
> > ((INVSTMTTRNRQ | INVMAILTRNRQ | INVMAILSYNCRQ)+) >
> > <!ELEMENT UNIQUEID - O %CUSIPTYPE >
> > what does "- -", "- O " mean ?
This is SGML syntax called "omitted tag minimization" and is not a
feature in XML. Since in XML you must always include end tags, it's
always "- -" in XML, and was therefore removed from element declaration
Alex Shevchuk wrote:
> "- -" means you must have both opening and closing tags.
> "- O" - you must have opening tag only.
> Because it is OFX DTD and not XML you can not XML'ize this DTD
> because OFX server will not be able to understand the result.
As Alex states, this is not an XML DTD but an SGML one. But if the
declaration for the element type does not include exclusions (ie.,
after the main content model part you'll find something like "-(foo)"
or "+(foo)") it can be easily transformed into an XML DTD. You could
conceivably author documents in an XML version of this DTD that would
be understandable to an OFX server, depending on the OFX document
In SGML, it was possible to declare more than one element type at
the same time, such as:
<!ELEMENT ( a | b ) - O ( #PCDATA ) >
<!ELEMENT ( a , b ) - O ( #PCDATA ) >
The first uses a 'name group', the second a 'ranked group'. If you're
really interested, check Section 11.2 (page 405) of Goldfarb's "The
SGML Handbook". I assume you're probably not, since these features are
not available in XML. XML is less expressive than SGML, but often the
missing functionality may be considered less than absolutely required.
You could break out the above examples to something like
<!ELEMENT a ( #PCDATA ) >
<!ELEMENT b ( #PCDATA ) >
and not die by fire. Yes, the document model is altered, but unless you
want to go back to using SGML this is your best option. You can usually
(if you're willing to live with an altered document model) modify SGML
DTDs for XML use. See http://www.oasis-open.org/docbook/ for progress
on providing an XML version of the DocBook (SGML) DTD. There are both
inclusion and exclusion exceptions in DocBook, but the DocBook TC is
working out the necessary details to evolve into XML.
But I'd also be surprised if somebody isn't working on an OFX XML DTD
or XML Schema.
BTW, it would be *greatly* appreciated if people used text for email rather
than HTML. Not everyone can read your messages, and I had to jump through
some hoops to figure out who wrote what, and to reply (such as reading
the entire thread to figure out who wrote what, taking the message out
to an editor, adding in quoting marks, loading it back into my mailer
by opening a local web page containing the file, etc.). Use of quoting
conventions would be helpful too. Thanks.
Murray Altheim, SGML Grease Monkey <mailto:email@example.com>
Member of Technical Staff, Tools Development & Support
Sun Microsystems, 901 San Antonio Rd., UMPK17-102, Palo Alto, CA 94303-4900
the honey bee is sad and cross and wicked as a weasel
and when she perches on you boss she leaves a little measle -- archy