Hi, I am using the Feb 6 development version. Whenever I try to import an xml file locally or an rdf via the web service I get the error:
"Failed to import any new terms. This may be due to syntax or formattings errors in the import file."
Any idea what might be causing that?
Comments
Comment #1
dman commentedAs the message implies, the first cause may be invalid input.
Does the XML validate in the first case?
The second cause is that the input is not of the expected format, and no term definitions were recognised.
Or is this happening even on the sample files? If which case it may be something deeper - like do you even have XML support on your PHP5 server?
Comment #2
ionchannels commentedThanks for the reply. Yes, I have xml support installed. I am able to import the sample.xml file provided with the module, but imports of rdf, owl etc... do not work. I checked and the xml is valid.
http://www.validome.org/xml/validate/?lang=en&url=http://www.ionchannels...
Here is the head and tail of my rdf:
I can't seem to import any well-formed RDF vocabulary...
Comment #3
dman commentedOK, so with a sample, I see that it's case 2.
Well-formed XML, but using a dialect and namespace within that that we've never seen before.
Compare that to the RDF/XML sample file and you'll probably see that they look nothing alike. Which is why no 'terms' are being recognised.
It looks like that custom schema is trying to express the same sort of concepts, but using different terminology. So you'll need to either :
Transform that file into RDF that expresses its data using actual RDF syntax ( eg
<go:definition>looks like it would be<rdf:description>andgo:termwould berdfs:Class)or
Create a custom syntax reader that can understand that dialect. See the TCS example to work from.
The thing is, that just because that input file includes one RDF tag does not mean that everything else it includes means anything that an RDF parser can understand. In fact, I think the only data that an RDF parser is seeing from that input is:
Everything else that is not in the rdf namespace is not the RDF parsers business.
It looks like it can be translated into something more meaningful... but you will have to create the rules for the translation yourself at some point. I'd use XSL for this.
Comment #4
ionchannels commentedAh, great. Thanks so much for that explanation. That makes a lot of sense. I'll get to work on the xsl.
Cheers,
Christian
Comment #5
dman commentedThis becomes custom development. I'd be interested, but can't solve it from here.
If the target dataset/format is popular and widely useful enough to adopt, I'd consider writing a parser for it - when I have the time/need/money, so I'm always on the lookout if you can point me towards some publically available taxa on the web.
This support request however, is done...