[MOBY-dev] xml:lang the story isn't pretty...

Paul Gordon gordonp at ucalgary.ca
Fri Jun 22 18:05:16 UTC 2007


Just throwing this out there:

I like option 3 (requiring xml:lang in the description tags).  It may 
seem like a kludge, but we decided that the
multilinguality is only supported at the description level in MOBY, 
right?  We assume that all other fields (such as
object name) are opaque tokens in the ontology, and these tokens happen 
to mostly be in semi-intelligible English.
I don't think we want to start supporting synonyms for object names yet, 
as this would require quite a bit of work.
Maybe in MOBY 1.5? :-)

An analogy might be sheet music.  Everyone who reads music knows the 
instruction keywords, which happen to be in Italian
(like biologists usually know key concepts in English, as well as their 
native tongue).  In the short term, option 3
sounds reasonable to me.
> Hi all,
>
> One of the TODO's that was assigned to me was the task of getting MOBY  
> Central prepared for multi-lingual support.  I've been investigating how  
> to do this, and it looks like it is going to be a bit of a blocker.
>
> According to the XML specification, the xml:lang attribute is supposed to  
> apply to the node it is in, and any sub-node until another xml:lang  
> attribute is encountered.  Unfortunately, most of the XML parsing  
> libraries in Perl do not even notice the xml:lang attribute as "special",  
> so you only have access to it as a normal attribute in the node where it  
> is included.
>
> There is one XML parsing library in Perl that does keep track of this  
> attribute (XML::LibXML::Reader); however that is not available on Windows  
> using ActiveState's Perl and PPM, which is what most Windows users will be  
> using, I suspect.. (though I know it is possible to use Cygwin also).  I  
> also looked at the "theoryx" PPM repository in Winnipeg, which usually has  
> some odd modules that you can't get anywhere else, but it isn't there  
> either.
>
> So... I guess there are several possibilities:
>
> 1)  we attempt to compile XML::LibXML::Reader on Windows and distribute it  
> as part of Moby
>
> 1a)  we modify XML::LibXML such that it does recognize and make note of  
> this attribute, and contribute that back to the authors
>
> 2)  I re-code Moby such that it traverses back up the XML tree looking for  
> the last xml:lang attribute for every node that has content.
>
> 3)  We put an additional constraint on the rules of XML, requiring that  
> the xml:lang attribute must be present in the same node in which the  
> multilingul content is present.
>
> 4)  ??? give up :-)
>
>
> Can someone have a quick look at how well xml:lang is supported on the  
> Java side, since that will help us make the decision on what to do.  If it  
> isn't supported in the Java libraries either, then maybe #3 is the only  
> rational (ugly) solution?
>
> M
>
>
>
>
>   




More information about the MOBY-dev mailing list