OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help



   Re: [xml-dev] English sentences, was: Re: [xml-dev] Announce:XML Schema,

[ Lists Home | Date Index | Thread Index ]

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!

See you in San Diego.
Eric van der Vlist       http://xmlfr.org            http://dyomedea.com
(W3C) XML Schema ISBN:0-596-00252-1 http://oreilly.com/catalog/xmlschema


News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS