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.3 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,47bc849aad30d586 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-06-06 17:34:04 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!cyclone.bc.net!news.mailgate.org!fr.usenet-edu.net!usenet-edu.net!enst!enst.fr!not-for-mail From: "Robert C. Leif" Newsgroups: comp.lang.ada Subject: RE: XML and Ada was RE: A standard package for config files is needed Date: Thu, 6 Jun 2002 17:33:26 -0700 Organization: ENST, France Sender: comp.lang.ada-admin@ada.eu.org Message-ID: Reply-To: comp.lang.ada@ada.eu.org NNTP-Posting-Host: marvin.enst.fr Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: avanie.enst.fr 1023410042 20718 137.194.161.2 (7 Jun 2002 00:34:02 GMT) X-Complaints-To: usenet@enst.fr NNTP-Posting-Date: Fri, 7 Jun 2002 00:34:02 +0000 (UTC) Return-Path: X-Envelope-From: rleif@rleif.com X-Envelope-To: X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.3416 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 In-Reply-To: Importance: Normal Errors-To: comp.lang.ada-admin@ada.eu.org X-BeenThere: comp.lang.ada@ada.eu.org X-Mailman-Version: 2.0.8 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: comp.lang.ada mail<->news gateway List-Unsubscribe: , Errors-To: comp.lang.ada-admin@ada.eu.org X-BeenThere: comp.lang.ada@ada.eu.org Xref: archiver1.google.com comp.lang.ada:25426 Date: 2002-06-06T17:33:26-07:00 From: Bob Leif To: Georg Bauhaus et al. My comments were specifically directed to XML schema. Therefore, the SGML handbook is only of historical interest. As for floating point types or others used in calculations, it depends who created the schema. If the schema is created by an Ada programmer, one obvious simplification is to make the Ada and XML data types as close as possible. As for further restricting (subtyping) of the Ada data types, this depends entirely on the application. However, most of the time, the simplest approach is to initially create a data type to meet all of one's requirements. If I obtain an XML schema that has not been strongly typed, wherever possible, I create the equivalent of Ada subtypes with explicit ranges. -----Original Message----- From: comp.lang.ada-admin@ada.eu.org [mailto:comp.lang.ada-admin@ada.eu.org] On Behalf Of Georg Bauhaus Sent: Thursday, June 06, 2002 7:15 AM To: comp.lang.ada@ada.eu.org Subject: Re: XML and Ada was RE: A standard package for config files is needed Robert C. Leif wrote: : I think of a schema as the data types in an Ada specification. The XML : document data has to be type compliant with the schema. A second schema : can make subtypes from or extend types present in an imported (withed) : schema. I admit that I have an Ada mind set. Hmm, would that be more than a schema based XML syntax for the creation of Ada syntax based definitions of the same data types? I found this in The SGML Handbook: "The net result of this design [data as text] is that an application is free to define its own semantics and the representation of its data types. The SGML parser can guarantee that the user's specified attribute values will meet the applications's lvength and alphabe restrictions, so they will fit into the application's buffers and be valid input to the application's routines that convert them to internal representations. The application retains the responsibility of determining whether the converted values satisfy its semantic constraints.[4] "[4] There is no intention here to suggest that standardization of processing semantics and data type representations would not be a good thing--only that it should not be the province of SGML. Introducing semantic standards into SGML would only serve to limit the potential processing of a document, as a single semantic standard is no more likely to be optimal for all pllications than a single programming language." What would be the result in case of fpt calculations, e.g.? If, by the schemata, your data tell me to consider X as a float with constraints Y, would there be a requirement to use these constraints in my program? Or would I be free to add precision by asking the compiler for a higher precision? -- Georg