I have a situation in which all of our tags are in upper case and downstream tools depend on them being that way.
With Adept 8.0 it changes all the tags to lower case when it saves the document. I'd like to avoid this if possible.
I tried editing the SGML declaration, but when I try to save it adept just wants to write out a text file.
Any help on this would be *greatly* appreciated.
- -- Kenneth D. Weinert
It's 106 ms to Chicago, we've got a full disk of GIFs, half a meg of hypertext, it's dark, and we're wearing sunglasses. Click it. (cribbed from Christopher Davis) ** Tag(s) inserted by Bandit Tagger98 - http://www.gbar.dtu.dk/~c918704
At 09:15 1999 07 01 -0600, Kenneth D. Weinert wrote: >I have a situation in which all of our tags are in upper case and >downstream tools depend on them being that way. > >With Adept 8.0 it changes all the tags to lower case when it saves the >document. I'd like to avoid this if possible. > >I tried editing the SGML declaration, but when I try to save it adept >just wants to write out a text file.
In general, Adept reads the character representation of any valid SGML file and produces a logically equivalent internal data structure on which the editing process can occur. When Adept saves the file, it traverses the current data structure and "serializes" it (i.e., produces a character representation of it) as valid SGML. "Insignificant" details of the input format are not represented in the internal data structure and are therefore not represented in the saved file. Here, "insignificant" is used in a technical sense to mean that, per the SGML standard, that that data is not considered to be logically meaningful to the actual information content. So, details of things like omitted tags, shortrefs, omitted quotes around attribute values, and the details of whitespace within markup are lost during a read/write cycle (this process of losing insignificant data is often referred to as "normalization").
Whether element and attribute names are case sensitive or insensitive is determined by the setting of the NAMECASE GENERAL feature in the SGML Declaration. NAMECASE GENERAL YES means that element and attribute names are case insensitive (i.e., case of those names is not significant) whereas NAMECASE GENERAL NO would make the case of those names significant.
When case is not significant, Adept always writes out lower case. That is, Adept's normalization process is to lowercase names where case is insignificant. This is not something that can be changed.
Setting NAMECASE GENERAL NO in the SGML Declaration would say that the case of all element and attribute names is significant. This would mean that any tag entered in all uppercase would stay that way. But it would also mean that you have to be completely consistent in the case you use, since any name entered in a different case will not match (using a different case when NAMECASE GENERAL NO is like spelling something differently--it's a different name). This may or may not be what you really want.
Prior to the upcoming release of Adept, NAMECASE GENERAL NO is not supported, so there is no easy answer using Adept 8.0 itself. The best solution might be to run the resulting file through some other process to uppercase all names you want uppercased. Note that any downstream tool that is SGML-compliant wouldn't care, because case is insignificant, but I realize there are many non-SGML tools that are useful, so I understand your desire.
Note that XML--which doesn't support sgml declarations, so this feature cannot be varied--always behaves as though the setting were NAMECASE GENERAL NO. That is, case is always significant (and therefore preserved) in XML.