Print

Print


Hello everyone,

We were having the same problem: we're using A/E to markup EAD documents,
but wanted to comply with having the elements and attributes in lower-case
for better XML compliance/ease of conversion and just plain consistency. Of
course A/E only let us export sgml in uppercase, so we wrote a little MS
Word macro that will take any SGML/XML document and convert all elements
and attributes (but not values) to lowercase. The macro is included below
this message, and should work in Word 6.0 for the Mac or Windows at least.

Anyway, this might be of use to someone who may just want something simple
they can run on their desktop machine in Mac or Windows, or for someone who
wants lowercase, but not necessarily full conversion from SGML to XML. Feel
free to share it, and thanks to Guenter Waibel, project specialist for our
EAD/conceptual art project for writing it!


Richard Rinehart
----------------
Information Systems Manager & Education Technology Specialist
Berkeley Art Museum/Pacific Film Archive
@ University of California
http://www.bampfa.berkeley.edu/
----------------
& President, Museum Computer Network, http://www.mcn.edu/


-------------
Sub MAIN
StartOfDocument
EditFindClearFormatting
EditFind .Find = "<", .Direction = 0, .Format = 1, .Wrap = 0
While EditFindFound()
CharRight
SelectCurWord
ChangeCase 0
CharRight
EditFind .Find = "<", .Direction = 0, .Format = 1, .Wrap = 0
Wend
StartOfDocument
EditFindClearFormatting
EditFind .Find = "</", .Direction = 0, .Format = 1, .Wrap = 0
While EditFindFound()
CharRight 1
SelectCurWord
ChangeCase 0
CharRight
EditFind .Find = "</", .Direction = 0, .Format = 1, .Wrap = 0
Wend
StartOfDocument
EditFindClearFormatting
EditFind .Find = "=", .Direction = 0, .Format = 1, .Wrap = 0
While EditFindFound()
CharLeft 2
SelectCurWord
ChangeCase 0
CharRight 2
EditFind .Find = "=", .Direction = 0, .Format = 1, .Wrap = 0
Wend
End Sub
-------------


>All,
>
>While Els message pretty much covers everything, I'd like to add just a bit
>on the XML case issue.
>
>XML is case-sensitive with respect to SGML "names." This means that if the
>DTD declares the name of an element as scopecontent, then the tag in the
>instance must be in the same case: <scopecontent>. <SCOPECONTENT> and
><ScopeContent> will be flagged as errors by an XML validating parser. SGML
>parsers will not object because SGML is not case-sensitive.
>
>Author/Editor converts are all element names in tags into uppercase. The
>EAD DTD declares all element names (and all names) in lowercase. Obviously
>this will be a problem when using Author/Editor instances as XML instances.
>Fortunatley James Clark's suite of SGML tools now includes a utility for
>converting SGML instances into XML instances. Among other things, it will,
>if issued the right command, convert uppercase element names into lowercase.
>
>See http://www.jclark.com/sp/index.htm
>
>Daniel
>
>At 04:08 PM 11/13/1998 +0100, you wrote:
>>Dear Derrick Clements,
>>
>>At 20:55 12-11-98 -0500, you wrote:
>>>  My problem is that, having downloaded the Version 1.0 files from
>>>the EAD Website, that the first amongst those files, ead.dtd,
>>>will not validate within RulesBuilder.  I immediately get an error
>>>message with regards to the character length of various elements:
>>>
>>>"Error in Document Type Definition: Name too long.  The length of a
>>>name must not exceed NAMELEN (8) characters.  The value of NAMELEN
>>>can be increased using an SGML Declaration."
>>
>>The reason for this error to appear is that apparently your application
>>uses its default declaration file which is set to "NAMELEN 8" (i.a. maximum
>>namelength is 8 characters). You should use the EAD declaration file that
>>is also at the LOC site: "eadsgml.dcl" (NOT the eadsgml.dec!) and make sure
>>SoftQuad Rulesbuilder uses this declaration file. This declaration file
>>gives you a NAMELEN of 128 characters. Also make sure you adjust your
>>catalog file for the ead dtd and entity files(eadbase.ent, eadchars.ent,
>>eadnotat.ent, eadtable.ent).
>>
>>The host domain of the Library Of Congress' FTP server is: ftp.loc.gov
>>ftp://ftp.loc.gov/pub/ead/ gives you all the necessary files.
>>
>>>Is this a problem with SoftQuad?   Someone has described the ".rls"
>>>RulesBuilder file as "notorious".   Is there a 'quick and dirty
>>>solution'?  What about WordPerfect 8 and its sgml capabilities?  Is
>>>this the better way to go?
>>
>>Actually there is an ead.rls file already at the same LOC location. You can
>>use this rules file and start right away in Author Editor (after having
>>adjusted the catalog file).
>>
>>>My other concern is with SoftQuad and XML compliance.  SoftQuad marks
>>>up in UPPER CASE.  It is my understanding that XML compliant markup
>>>must be in lower case, which the EAD DTD (ead dtd?) Version 1.0 is
>>>written in, so as to be XML compliant.  Is this also a problem?
>>>
>>XML is case-sensitive! Markup in the instances should comply with
>>upper/lower case as used in the DTD.
>>
>>Hope this helps,
>>
>>Els van Trigt
>>http://www.alfabase.nl
>>
>>
>Daniel V. Pitti         Project Director
>Institute for Advanced Technology in the Humanities
>Alderman Library        University of Virginia  Charlottesville, Virginia
>22903
>Phone: 804 924-6594     Fax: 804 982-2363       Email: [log in to unmask]



Richard Rinehart
----------------
Information Systems Manager & Education Technology Specialist
Berkeley Art Museum/Pacific Film Archive
@ University of California
http://www.bampfa.berkeley.edu/
----------------
& President, Museum Computer Network, http://www.mcn.edu/