Not Reading COINS on XHTML+RDFa pages?

Hi,

I'm working on adding some RDFa on Open Context. However, it seems Zotero has a problem reading COINS expressed metadata on XHTML+RDFa pages.

Here's an example:
http://opencontext.org/subjects/30C3F340-5D14-497A-B9D0-7A0DA2C019F1

These pages validate (according to the W3C) just fine, but Zotero no longer sees the COINS. Everything works OK with Zotero reading COINS on plain vanilla XHTML without the RDFa (example: http://opencontext.org/media/6C5EE4B4-8F50-466A-CB00-086C091DC812)

Any work suggestions for relatively simple (please) ways of dealing with this?

Thanks!
-Eric
  • Sorry about the double post. I wasn't sure where to send this query.

    Anyway, I'm experimenting with unAPI, and I still don't see Zotero seeing bibliographic metadata in XHTML+RDFa pages. The unAPI service I just set up validates OK too.

    Here's an example that links to the unAPI service:
    http://opencontext.org/subjects/30C3F340-5D14-497A-B9D0-7A0DA2C019F1

    Here's an example showing the unAPI service is valid:
    http://validator.unapi.info/validate/results?url=http%3A%2F%2Fopencontext.org%2Fsubjects%2F30C3F340-5D14-497A-B9D0-7A0DA2C019F1&commit=validate!
  • OK both unAPI and COINS seem to fail on XHTM+RDFa pages. Anybody have ideas for what I'm doing wrong, or is this a Zotero issue?

    Thanks!
    -Eric
  • document.evaluate doesn't work on those pages with standard parameters, which is why unAPI and COinS are both failing. I need to look into this further.
  • Thanks Simon.

    Any suggested work around that let's me keep my RDFa?

    Best!
    -E
  • Just wanting to check about this. I'm interested in using RDFa, but I don't want to continue to have Zotero not working on my site.

    Thanks!
    -Eric
  • Could this be an issue with the use of namespaces? We usually pass a stub function for resolving namespaces to document.evaluate, but your pages are quite namespace-rich, and perhaps that isn't enough for them.

    We would very much like to have Zotero work correctly on your site, so hold on tight for now. It would also be possible to write a translator in the interim-- it would be trivial to do so for a site that embeds COinS already.
  • Just a guess, but it might be because you have the XHTML namespace both as the default namespace and prefixed to 'xhtml'. Try taking out the prefixed one.
  • Thanks for the suggestions.

    I took out the prefixed XHTML namespace, but no luck on Zotero seeing the unAPI service or COINS. I can't really reduce the number of namespaces since I need to reference different namespaces with different semantics for the RDFa.

    I'll follow this thread and try other suggestions. Thanks!
  • The two namespace declarations shouldn't make any difference in any case, at least from the standpoint of the XML spec.
  • (I understand that. Just debugging.)

    So the problem here almost certainly stems from your serving the page as application/xhtml+xml, which for some reason is breaking document.evaluate(). When I copy the page to another server that serves it as text/html (and then adjust the <script/> tags to be valid HTML), it works.

    We'll look into this.
  • OK, I put in a fix for this—an issue with default namespace handling on XML documents—but it definitely requires testing to make sure it doesn't break COinS and unAPI handling on other pages (particularly those not served as application/xhtml+xml).

    To test, download the latest COinS and unAPI translators into the 'translators' directory in your Zotero data directory, overwriting the current versions, and restart Firefox.
Sign In or Register to comment.