2009年5月25日月曜日

部分 xhtml をとりあえず表示する xsl

部分 xhtml の先頭に一行追加(xml 宣言がある場合はその次の行)
<?xml-stylesheet type="text/xsl" href="transform.xsl"?>
transform.xsl
<?xml version="1.0" encoding="utf-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml"> <xsl:output method="html" encoding="utf-8" omit-xml-declaration="no" doctype-public="-//W3C//DTD XHTML 1.1//EN" doctype-system="http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"/> <xsl:template match="/"> <html xmlns="http://www.w3.org/1999/xhtml" lang="ja"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title></title> <style type="text/css"> /* @import url("./style.css");*/ * { font-size:100%; font-family:Meiryo, MSPGothic, Sans-Serif; } p, pre { font-size:85%; } dd { margin:0; } </style> </head> <body> <xsl:apply-templates select="node()" /> </body> </html> </xsl:template> <xsl:template match="node()"> <xsl:copy> <xsl:apply-templates select="@*|node()" /> </xsl:copy> </xsl:template> <xsl:template match="@*"> <xsl:copy /> </xsl:template> </xsl:stylesheet>

2009年1月12日月曜日

<a> button

<style type="text/css"> a.button { display:inline-block; border:solid 1px gray; vertical-align:middle; background-color:#eee; padding:0.25em 0.5em; } </style> <div> <a class="button" href="javascript:alert('Button A');">Button A</a> <a class="button" href="javascript:alert('Button B');">Button B</a> </div>
実例
Button AButton B

2008年12月31日水曜日

Virtual PC .vhd の圧縮手順

[link] : http://www.atmarkit.co.jp/fwin2k/win2ktips/745vhdcomppc/vhdcomppc.html

要約

  1. Guest OS 起動
  2. Guest OS で一時ファイルや不要なファイルを削除
  3. Guest OS でデフラグ
  4. Guest OS でパーティションの使用していない部分を '\0' で埋め尽くす
    precompact.exe を実行(※1)
  5. Virtual PC コンソールで [バーチャル ディスク ウィザード] を実行
    [Virtual PC コンソール] - [ファイル(F)] - [バーチャル ディスク ウィザード]

(※1) precompact.exe の実行手順

  1. Guest OS 画面の [CD] メニューから [ISO イメージのキャプチャー(i)...] を選択
  2. ファイル選択画面で "\Virtual Machine Additions\Virtual Disk Precompactor.iso" を選択
  3. Guest OS で ":\precompact.exe" を実行