|
[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: English sentences, was: Re: Announce:XML Schema,
On Fri, 2002-06-28 at 00:17, Thomas B. Passin wrote: > [Eric van der Vlist > > > > If you are happy with the result of the unix "file" command to determine > > the type of a text and see if it's more likely a Java source code, a > > snippet of Python or an English text, you may want to validate the > > document using its result instead of the code. > > > You mean, try to compile and if it compiles, it's in that language? But > you can't be sure abouta file iwth a bug that prevents compiling. How to > handle that? No, I meant using the unix "file" command which try to guess the "type" of a file using "magic numbers": vdv@ibook:~/wikiml/code/experimental/java$ file README README: ASCII English text vdv@ibook:~/wikiml/code/experimental/java$ file WikiSAXWriter.java WikiSAXWriter.java: ASCII Java program text but also: vdv@ibook:~/4xt/pub/downloads/JrdfDB$ file Test.java Test.java: ASCII C program text, with very long lines Like with any magic, it's not 100% sure and can sometimes be confused like here between Java and C but it's usually working fine! Eric -- See you in San Diego. http://conferences.oreillynet.com/os2002/ ------------------------------------------------------------------------ Eric van der Vlist http://xmlfr.org http://dyomedea.com (W3C) XML Schema ISBN:0-596-00252-1 http://oreilly.com/catalog/xmlschema ------------------------------------------------------------------------
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|
|||||||||






