[BioRuby] GSOC: BioRuby PhyloXML: Validating XML

Christian M Zmasek czmasek at burnham.org
Fri Jul 3 17:33:01 UTC 2009


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



>
> 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.


>
> Have a good 4th July weekend!
Same to you! Thanks for the continued good work!

Christian





More information about the BioRuby mailing list