-- -*- c -*- -- formatrc.xsl - (initial) configuration of format.xsl -- Author: klm -- License: Modified BSD stylesheet version="1.0" xmlns:f="http://okowa.org/XSLT/Format" xmlns:xh="http://www.w3.org/1999/xhtml" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" { -- indent depth match f:indent(/) "0"; match f:indent(node()) "1"; match f:indent( xh:html | xh:body | xh:table ) "0"; -- break count match f:break-inside(/) "1"; match f:break-inside(node()) "1"; match f:break-inside(xh:body) "2"; match f:break-outside(node()) "1"; -- xml:space match f:space(/) "default"; match f:space(*) "default"; match f:space(*[@xml:space]) value-of(@xml:space); match f:space( xh:script | xh:style | xh:pre | xh:textarea ) "preserve"; -- empty element? match f:empty(*) "no"; match f:empty(*[not( node() )]) "yes"; match f:empty(*[ namespace-uri() = 'http://www.w3.org/1999/xhtml' ]) priority="9" "no"; match f:empty( xh:hr | xh:param | xh:input | xh:col | xh:meta | xh:link | xh:base | xh:br | xh:img ) priority="10" "yes"; -- block/inline match f:display(/) "block"; match f:display(*) "block"; match f:display(/*) "block"; match f:display( f:xmldecl | f:doctype ) "block"; match f:display( xh:html | xh:head | xh:body | xh:blockquote | xh:div | xh:dl | xh:ol | xh:ul | xh:object | xh:fieldset | xh:form | xh:select | xh:optgroup | xh:colgroup | xh:table | xh:colgroup | xh:tbody | xh:tfoot | xh:tr | xh:thead | xh:script | xh:noscript | xh:style | xh:pre | xh:h1 | xh:h2 | xh:h3 | xh:h4 | xh:h5 | xh:h6 | xh:address | xh:p | xh:dt | xh:dd | xh:li | xh:bdo | xh:hr | xh:param | xh:button | xh:input | xh:legend | xh:option | xh:textarea | xh:caption | xh:col | xh:td | xh:th | xh:area | xh:map | xh:title | xh:meta | xh:link | xh:base ) "block"; match f:display( xh:abbr | xh:acronym | xh:br | xh:cite | xh:code | xh:dfn | xh:em | xh:kbd | xh:q | xh:samp | xh:span | xh:strong | xh:var | xh:a | xh:b | xh:big | xh:i | xh:small | xh:sub | xh:sup | xh:tt | xh:label | xh:img | xh:ruby | xh:rbc | xh:rtc | xh:rb | xh:rt | xh:rp ) "inline"; match f:display( xh:del | xh:ins ) apply-templates f:display(..); match f:display( comment() | processing-instruction() ) apply-templates f:display(..); match f:display( text() ) "inline"; match f:display(f:comment) apply-templates f:display(..); -- inherit -- 属性の改行 ( none / indent / elemname ) -- のとき -- none: そのまま -- indent: match f:attr-align(*) "none"; match f:attr-align(rdf:RDF|rdf:Description) "indent"; }