利用者:Hiro3600/extract0.xsl
<?xml version="1.0" encoding="utf-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output method="html" encoding="utf-8" indent="yes" /> <xsl:variable name="more">» 詳細</xsl:variable> <xsl:variable name="error">エラー: </xsl:variable> <xsl:variable name="copyright"> © <a href="http://ja.wiktionary.org/wiki/">wiktionary</a>。<a href="http://creativecommons.org/licenses/by-sa/3.0/deed.ja" rel="license copyright">クリエイティブ・コモンズ (表示-継承)</a>による</xsl:variable> <xsl:variable name="pageName" select="concat('http://', ja, '.wiktionary.org')"/> <xsl:template match="/"> <html> <head> <base target='_blank' href="{$pageName}" /> <title>wiktionary</title>
<style> #wordThisIsFor { font-weight:bold;} a.wtif1 { color: black; text-decoration: none;} a.wtif1:hover {text-decoration: underline;} .disambig-see-also, .disambig-see-also-2 {display:inline;} #container {background-color:white; padding: 0.5em; border: solid black thin;} #more-link {cursor: pointer; background-color: olive;} a.new {color: red;} #error {color: red;font-size:larger;} </style> <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js" /> <script type='text/javascript'> /*<![CDATA[*/
$(document).ready( function(){
var src = $("#src").text(); $("#src").html(src);
$("#more-link").click( function(){
$("#src").show();
});
var stroke = "総画数:"+$("#kanji-stroke").html(); var radical = "部首:"+$("#kanji-radical").html()+"+"+$("#radical-stroke").html()+"画"; $("#kanji-basis").append(stroke+"、"+radical);
});
/*]]>*/ </script>
</head> <body>
wiktionaryのデータ
<xsl:call-template name="src" /> </body> </html> </xsl:template>
<xsl:template name="src" >
</xsl:template> <xsl:template match='page'> <xsl:value-of select="@title"/> </xsl:template> <xsl:template match='api/error'> <xsl:value-of select="$error"/> <xsl:value-of select='@info'/> </xsl:template>
</xsl:stylesheet>