Skip to content

Instantly share code, notes, and snippets.

@aurimasv
aurimasv / gist:2381784
Created April 14, 2012 02:51
XML with xmlns XPath
ZU.doGet('https://resolve.eidr.org/EIDR/object/10.5240/6F7E-EF59-329B-1F0A-8440-2/?type=Full&followAlias=true',
function(text) {
var d = (new DOMParser()).parseFromString(text, "text/xml");
var nsResolver = function(prefix) {
var ns = {
'n' : 'http://www.eidr.org/schema/1.0',
'md': 'http://www.movielabs.com/md'
};
return ns[prefix] || null;
};
<rdf:RDF
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:z="http://www.zotero.org/namespaces/export#"
xmlns:dcterms="http://purl.org/dc/terms/"
xmlns:bib="http://purl.org/net/biblio#"
xmlns:foaf="http://xmlns.com/foaf/0.1/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:prism="http://prismstandard.org/namespaces/1.2/basic/">
<bib:Article rdf:about="http://www.pnas.org/content/67/2/501">
<z:itemType>journalArticle</z:itemType>
@aurimasv
aurimasv / locales-lt-LT.xml
Created August 11, 2012 01:55 — forked from anonymous/LT_locale
CSL locale for Lithuanian
<?xml version="1.0" encoding="utf-8"?>
<locale xmlns="http://purl.org/net/xbiblio/csl" version="1.0" xml:lang="lt-LT">
<!-- Translation by Valdemaras Klumbys -->
<style-options punctuation-in-quote="false"/>
<date form="text" delimiter=" "> <!-- "2011 m. lapkričio 1 d." -->
<date-part name="year" suffix=" m."/>
<date-part name="month"/>
<date-part name="day" form="numeric" suffix=" d."/>
</date>
<date form="numeric" delimiter="-"> <!-- "2011-11-01" -->
<bindings xmlns="http://www.mozilla.org/xbl"
xmlns:xbl="http://www.mozilla.org/xbl"
xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<binding id="tab-counter" extends="chrome://global/content/bindings/tabbox.xml#tab">
<content>
<xul:hbox class="tab-middle box-inherit" xbl:inherits="align,dir,pack,orient,selected" flex="1">
<xul:image class="tab-icon" xbl:inherits="validate,src=image" role="presentation"/>
<xul:label class="tab-text" xbl:inherits="value=label,accesskey,crop,disabled" flex="1" role="presentation"/>
<xul:label class="tab-counter" xbl:inherits="value=_counterLabel" role="presentation"/>
</xul:hbox>
@aurimasv
aurimasv / refs.rdf
Created January 22, 2013 11:31
References for Zotero testing
<rdf:RDF
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:z="http://www.zotero.org/namespaces/export#"
xmlns:dcterms="http://purl.org/dc/terms/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:prism="http://prismstandard.org/namespaces/1.2/basic/"
xmlns:bib="http://purl.org/net/biblio#"
xmlns:foaf="http://xmlns.com/foaf/0.1/"
xmlns:link="http://purl.org/rss/1.0/modules/link/">
<bib:Article rdf:about="http://www.landesbioscience.com/journals/cc/article/17093/">
@aurimasv
aurimasv / cell-bib-sort.rdf
Created January 26, 2013 05:05
Publications for testing bibliography sorting in Cell
<rdf:RDF
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:z="http://www.zotero.org/namespaces/export#"
xmlns:dcterms="http://purl.org/dc/terms/"
xmlns:bib="http://purl.org/net/biblio#"
xmlns:foaf="http://xmlns.com/foaf/0.1/"
xmlns:link="http://purl.org/rss/1.0/modules/link/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:prism="http://prismstandard.org/namespaces/1.2/basic/">
<bib:Article rdf:about="http://onlinelibrary.wiley.com/doi/10.1111/j.1462-2920.2007.01321.x/abstract">
@aurimasv
aurimasv / annu-rev-sample-refs.rdf
Last active December 13, 2015 22:29
sample references used in author instructions for Annual Reviews
<rdf:RDF
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:z="http://www.zotero.org/namespaces/export#"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:vcard="http://nwalsh.com/rdf/vCard#"
xmlns:foaf="http://xmlns.com/foaf/0.1/"
xmlns:bib="http://purl.org/net/biblio#"
xmlns:dcterms="http://purl.org/dc/terms/"
xmlns:prism="http://prismstandard.org/namespaces/1.2/basic/">
<bib:Manuscript rdf:about="#item_26">
@aurimasv
aurimasv / Cortex.rdf
Created May 5, 2013 07:06
Test data set for the Cortex citation style. Corresponds to examples given at http://www.elsevier.com/journals/cortex/0010-9452/guide-for-authors
<rdf:RDF
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:z="http://www.zotero.org/namespaces/export#"
xmlns:dcterms="http://purl.org/dc/terms/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:prism="http://prismstandard.org/namespaces/1.2/basic/"
xmlns:bib="http://purl.org/net/biblio#"
xmlns:foaf="http://xmlns.com/foaf/0.1/"
xmlns:vcard="http://nwalsh.com/rdf/vCard#">
<bib:Article rdf:about="#item_5">
@aurimasv
aurimasv / ISBNTableGenerator.js
Last active December 23, 2015 20:59
Generates ISBN registrant tables given XML Range Message (from http://www.isbn-international.org/page/ranges) loaded in the browser
/*
***** BEGIN LICENSE BLOCK *****
Generates ISBN registrant tables given XML Range Message
(from http://www.isbn-international.org/page/ranges) loaded in the browser
Copyright © 2013 Aurimas Vinckevicius (aurimas.dev~at~gmail.com)
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
@aurimasv
aurimasv / hyphenateISBN.js
Last active January 2, 2023 01:49
Hyphenates ISBN numbers using tables generated by https://gist.github.com/aurimasv/6693503
/*
ISBN hyphenation using tables generated by https://gist.github.com/aurimasv/6693503
Includes tables generated on 2013-09-24
***** BEGIN LICENSE BLOCK *****
Copyright © 2013 Aurimas Vinckevicius (aurimas.dev~at~gmail.com)
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the