[BioRuby] GSOC: BioRuby PhyloXML: Validating XML
Diana Jaunzeikare
rozziite at gmail.com
Fri Jul 3 17:40:12 UTC 2009
On Fri, Jul 3, 2009 at 1:33 PM, Christian M Zmasek <czmasek at burnham.org>wrote:
> Hi, Diana:
>
>
> I have a question, if the libxml validator finds something wrong with the
>> xml file (and in general), where errors should go? Should exception be
>> raised, printed on stdout, or on error output?
>>
> I strongly recommend that a exception be raised. It is the responsibility
> of the parsers clients to deal with the exception.
>
>
>
> Another question is where should phyloxml.xsd schema file go? Is
>> lib/bio/db/phyloxml.xsd fine? (the same place where phyloxml_parser.rb and
>> phyloxml_elements.rb are).
>>
> What about not placing it anywhere and just using the one at:
> http://www.phyloxml.org/1.00/phyloxml.xsd
I was considering it, but then that means that parser is dependent on the
computer being online and accessing it through internet. If thats fine, then
I can do that.
> Using the validator I understood that in xml elements have to go in
> specified order. (like name element of phylogeny should go before the clade
> element of phylogeny). (Correct me if I am wrong). If thats the case, it
> will allow me to simplify some code.
>
Yes, the order of elements is defined by the xsd. I never understood how the
> designers of xml/xsd came to the conclusion that this was useful.
>
I find it really useful. It simplifies parsing. :)
>
>
>
>> Have a good 4th July weekend!
>>
> Same to you! Thanks for the continued good work!
>
> Christian
>
>
>
More information about the BioRuby
mailing list