cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

DTD compiling problems: attribute definition lists

UlrikeSchaper
1-Newbie

DTD compiling problems: attribute definition lists

Dear adepters,

first of all: we use Epic 4.3.1.

I'm facing an XML DTD which I want to compile as SGML.

It contains several attribute definition lists with the same values.
E. g.:
print (ja | nein) "ja"
register (ja | nein) "ja"
>

When compiling the DTD Epic complains:
"The JA name token has already been used as a name token in another group in
this attribute definition list. Duplicated entries must be removed"

I can imagine that this makes sense when you want to omit the attribute
name. But since we don't want to do this, I changed our SGML declaration,
and set the feature "SHORTTAG" to "NO".

Does anybody have an idea how to make Epic compile this DTD? After all, it
is a valid XML DTD...

Best regards,
Ulrike.

> Ulrike Schaper
> Application Engineer
>
> NIONEX GmbH
> mailto:ulrike.schaper@bertelsmann.de
>


6 REPLIES 6



Ulrike,

What you are encountering is one of the differences between XML and SGML.
ISO 8879 (the SGML standard) does not allow two attributes in the same
ATTLIST to have the same value.

The reason for this were the "tagging" shortcuts that were allowed in the
SGML standard. When SGML came about, there were no sophisticated tools to
tag data (such as Adept). So for those who tagged with an ASCII editor,
SGML allowed things like tag minimization (for omitting the end tags on
some elements) and for attributes, the author only had to enter the
attribute value, but not the attribute name. So even though SGML requires
a DTD, if the document uses minimization how would the parser know which
attribute value goes to which attribute.

There is one exception to this rule. NUMBERs can be duplicated, any other
attribute value must be unique.

This is not an issue in XML where the W3C standard does not allow any tag
minimization, every element must have an end tag mark of some kind. The
standard also requires that attributes be listed in the start tag with
attribute name and value. The rationale for this is XML does not require a
DTD (or schema), so the parser needs to have values (even if they are
defaults).

Lynn

This is one of the reasons some of us use instead of the (Ja | Nein) or (Yes
| No) or (Si | No), the formula (1 | 0) in SGML, despite the editors hate
it....

-----Mensaje original-----



I love traveling, except when I can't get an email connection. 😞 Anyway I
agree with Gabriel and her editors. I've been working with the 0 | 1
choices for (a long time) and I have gotten them so muddled in my brain
that I have to keep a cheat sheet handy so I know which is which.

But it was a way to work around the problem of no duplicate attribute
values in a single ATTLIST. Imagine what things would be like if we could
not have used the NUMBER.

While I am on this trend. Thought I'd pass out a little comment I heard
the other day while I was at this conference. Seems there is a group that
has a lot of data in SGML and are desirous to convert to XML, but they are
afraid the conversion will be too difficult. I got the impression the
individual didn't know enough about either and thought there were
insurmountable problems because of the INFERIORITY of SGML. Though in a
later discussion, it seems his concern was converting Dorkbook, errr,
Docbook variant SGML to S1000D XML, which could be "fun" (sick).

SGML has some limitations, but from a tagging perspective, I can do the
most of the things in SGML as I do in XML "IF" (you know Kipling's key
word) the final product of the SGML will be processed as XML. In some
instances, SGML is even more powerful than XML (I still miss my
'exclusions' [but not my 'inclusions']). For those of you who have not
worked with SGML and don't know what an 'inclusion' or 'exclusion' is, post
a note and I'll go into the gory, graphic details.

Lynn

Lynn,

Just one "Inclusion" to your mail: in Spanish "Gabriel" is a male name, and
so I am... 🙂

-----Mensaje original-----

Gabriel,

I do apologize for mixing your gender. As several members of Adepters may
tell you, in English Lynn can be either a name given to either a boy or a
girl, though it is more commonly a girl's name, though like you I am not.

Lynn


Return Receipt

Your RE: DTD compiling problems: attribute definition lists
document
:

was Yvonne Haass/VFTIS/SPX
received
by:

at: 08/17/2004 10:56:43 AM



Announcements