<?xml version="1.0" encoding="SHIFT_JIS"?>
<!DOCTYPE xml [
<!ELEMENT xml (p,graphic)>
<!ELEMENT p (#PCDATA)>
<!ELEMENT graphic EMPTY>
<!ATTLIST graphic file CDATA #REQUIRED
type CDATA #REQUIRED>
]>
<xml>
<p>会社のロゴマーク</p>
<graphic file="logo.jpg" type="jpg"/>
</xml>
<!DOCTYPE style-sheet PUBLIC "-//James Clark//DTD DSSSL Style Sheet//EN" []>
<style-sheet>
<style-specification>
<style-specification-body>
(root
(make simple-page-sequence
page-height: 297mm
page-width: 210mm
left-margin: 2cm
right-margin: 2cm
top-margin : 10cm
bottom-margin: 3cm
language: 'JA))
(element graphic
(let ((filename (attribute-string "file")) ;属性名「file」の属性値を取得して変数名「filename」に入力する
(filetype (attribute-string "type"))) ;属性名「type」の属性値を取得して変数名「filetype」に入力する
(make external-graphic
display?: #t
space-before: 100pt ;上とのスペース
space-after: 100pt ;下とのスペース
display-alignment: 'center ;出力位置(左[デフォルト]、中央、右)の指定
entity-system-id: filename ;画像ファイル名の指定
notation-system-id: filetype ;画像ファイルの形式の指定
max-width: 300pt ;画像ファイル出力の最大幅
max-height: 30pt ;画像ファイル出力の最大縦
scale: 'max-uniform))) ;縦横等倍出力を行う。
(element p
(make paragraph
font-size: 12pt
quadding: 'center))
</style-specification-body>
</style-specification>
</style-sheet>