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,7b97e385047500eb X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news2.google.com!proxad.net!newsfeed.stueberl.de!news-mue1.dfn.de!news-ham1.dfn.de!news.uni-hamburg.de!cs.tu-berlin.de!uni-duisburg.de!not-for-mail From: Georg Bauhaus Newsgroups: comp.lang.ada Subject: Re: Experiences of XML parser generators for Ada? Date: Thu, 9 Dec 2004 12:29:51 +0000 (UTC) Organization: GMUGHDU Message-ID: References: <41b23f73$0$25049$ba620e4c@news.skynet.be> <41b79025$0$1333$636a15ce@news.free.fr> NNTP-Posting-Host: l1-hrz.uni-duisburg.de X-Trace: a1-hrz.uni-duisburg.de 1102595391 20075 134.91.1.34 (9 Dec 2004 12:29:51 GMT) X-Complaints-To: usenet@news.uni-duisburg.de NNTP-Posting-Date: Thu, 9 Dec 2004 12:29:51 +0000 (UTC) User-Agent: tin/1.5.8-20010221 ("Blue Water") (UNIX) (HP-UX/B.11.00 (9000/800)) Xref: g2news1.google.com comp.lang.ada:6861 Date: 2004-12-09T12:29:51+00:00 List-Id: Lionel Draghi wrote: : Adrien Plisson a ?crit : : ... :> well, Ada has nothing to do with w3c. it is the our job, as Ada :> programmers to design and implement a library providing those features :> (as Xml/Ada does). it shall never be part of the standard. : : Yes, but : : type Money is range 1 .. 10; : : becomes : : name="TN" type="xsd:int" : : in WSDL. The range is lost. : : Maybe some more Ada awareness at w3c could have cause this semantics to : be included. (If it is, please let me know) This problem has been discussed during XML Schema design. In XML Schema you have some form of ranges in the type libraries. pro: You don't need to bother to make a good external format, just lazily copy your data definitions to an XML stream medium: If you need to carry type information you can make this explicit in a type="..." attribute. (This is then not standards based, but it gives more flexibility than a parser that says: range error at l.1234, and the just stops.) con: Freezing the range might not meet any expectation but your program's : I don't want client to continuously cause exceptions in my server, just : because there is no way to let them know about the limits. Use 'Valid and so on. Web services or not, I/O is always a possible source of surprises. :-) A secure server cannot rely on external input anyway, I'd guess. : Once more back to strong typing benefits discussion :-) The flexible solution is Relax NG.