簡単に論文リストのウェブ表示
Endnoteなどのレファレンスマネージャソフトはエクスポート昨日により、XML形式のファイルが簡単に作れる。この書式に対応したXSLファイルを作ることで、簡単に管理論文のブラウザ表示をすることができる。
実例はこちら
- 上記サイトの表示は、次の3ファイルを同一ディレクトリに置いてアクセス。
- 作成方法
<?xml version="1.0" encoding="Shift_JIS" ?> <?xml:stylesheet type="text/xsl" href="Article.xsl"?> <Article> <title>Article</title> <tbl href="fromEndnote.xml"/> </Article>
<?xml version="1.0" encoding="Shift_jis"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:template match="/"> <html> <body> <xsl:apply-templates/> </body> </html> </xsl:template> <xsl:template match="Article"> <xsl:apply-templates select="title"/> <xsl:apply-templates select="tbl"/> </xsl:template> <xsl:template match="title"> <h3><xsl:value-of select="."/></h3> </xsl:template> <xsl:template match="tbl"> <table border="3"> <tr> <th>Year</th> <th>Title</th> <th>Journal</th> <th>Volume</th> <th>Number</th> <th>Pages</th> <th>Authors</th> </tr> <xsl:variable name="t" select="document(@href)"/> <xsl:for-each select="$t//RECORD"> <tr> <td><xsl:value-of select="YEAR"/></td> <td><a><xsl:attribute name="href"><xsl:value-of select="URL"/></xsl:attribute><xsl:value-of select="TITLE"/></a></td> <td><xsl:value-of select="SECONDARY_TITLE"/></td> <td><xsl:value-of select="VOLUME"/></td> <td><xsl:value-of select="NUMBER"/></td> <td><xsl:value-of select="PAGES"/></td> <td><xsl:value-of select="AUTHORS"/></td> </tr> </xsl:for-each> </table> </xsl:template> </xsl:stylesheet>