.
The Open Protein Structure Annotation Network
PDB Keyword
.

ListReferences

    Table of contents
    No headers
    template('PubMed/Styles');
    /* Config */
    var ReferenceArticlesRoot = 'Pubmed/Articles';
    
    var refs = wiki.page($0 ?? $path ?? page.path)['//a[contains(@class, \'reference\')]'];
    var uniquerefs = []; 
    var reflookup = { }; 
    foreach(var ref in refs) { 
        var key = xml.text(ref['@id']); 
        if(!reflookup[key]) { 
            let reflookup ..= { (key): true }; 
            let uniquerefs ..= [ ref ]; 
        } 
    }
    
    if(#uniquerefs) {
        <ol>
            foreach(var ref in uniquerefs) {
                var pmid = string.substr(xml.text(ref['@id']), 5);
                var article = wiki.appendpath(ReferenceArticlesRoot, pmid);
                var exists = wiki.pageexists(article);
                <li>
    		<a id=('ref-' .. pmid)></a>
    		template('PubMed/ESummary', [pmid, _, "single"]); // force single
                    <br />
                    if(exists) {
                        web.link(wiki.uri(article), 'Discuss this publication');
                    }
                    /* } else {
                        web.link(uri.build(wiki.uri(article), _, { template: 'PubMed/DiscussionStub', pmid: pmid }), 'Create a discussion page');
                    }
                    */
                </li>
            }
        </ol>
    } else {
    // unsafe?
        <p> "No references found." </p>
    }
    

    Reviews

    References

     

    No references found.

    Tag page
    • No tags

    Files (0)

     
    You must login to post a comment.
    All content on this site is licensed under a Creative Commons Attribution 3.0 License
    Powered by MindTouch