From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,d2fdf39976bd1585 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news3.google.com!news.glorb.com!news.tele.dk!feed118.news.tele.dk!news.tele.dk!small.news.tele.dk!lnewsinpeer00.lnd.ops.eu.uu.net!emea.uu.net!peer-uk.news.demon.net!kibo.news.demon.net!news.demon.co.uk!demon!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: ANN: Ada source code decorator Date: Sat, 27 May 2006 18:38:53 +0100 Organization: Pushface Message-ID: References: <447306ee$0$11066$9b4e6d93@newsread4.arcor-online.net> NNTP-Posting-Host: pogner.demon.co.uk Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: news.demon.co.uk 1148751534 26405 62.49.19.209 (27 May 2006 17:38:54 GMT) X-Complaints-To: abuse@demon.net NNTP-Posting-Date: Sat, 27 May 2006 17:38:54 +0000 (UTC) Cancel-Lock: sha1:tvXPi6etC8O/wztpkfHGwczxLV8= User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (darwin) Xref: g2news2.google.com comp.lang.ada:4552 Date: 2006-05-27T18:38:53+01:00 List-Id: Stephen Leake writes: > There seems to be a lot missing. Remember that I have never used XML > in an application, but my impression was that it's supposed to be a > self-documenting format. About as much as Ada is .. > So, for example, I would expect the various > identifiers to be labeled more specifically; "variable_identifier", > "type_identifier". Or have names that match the ASIS query that > returned them. The scheme I adopted was to use the ASIS enumeration names as far as possible: a snippet of the code is case Asis.Elements.Element_Kind (Element) is when A_Defining_Name => -- Asis.Declarations State.Current := DOM.Core.Nodes.Append_Child (State.Current, DOM.Core.Documents.Create_Element (State.Document, To_Tag_Name (Defining_Name_Kinds'Image (Asis.Elements.Defining_Name_Kind (Element))))); Tmp := DOM.Core.Nodes.Append_Child (State.Current, DOM.Core.Documents.Create_Text_Node (State.Document, +Asis.Declarations.Defining_Name_Image (Element))); where To_Tag_Name strips a leading A_ or An_. So if -- for example, I don't know if this is exactly right -- my output contained Basis that would be because I got an element of Element_Kind = A_Defining_Name with Defining_Name_Kind = A_Defining_Identifier. Perhaps I should have said eg ? or, probably better, ?