<?xml version="1.0"?>
<poem xmlns="http://poetry.org/ns"
xsi:schemaLocation="http://poetry.org/ns poem.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<author>
<name>Rupert Brooke</name>
<birth>1887-08-03</birth>
<death>1915-04-23</death>
</author>
<date>1912</date>
<title>The Hill</title>
<stanza>
<line>Breathless, we flung us on the windy hill,</line>
<line>Laughed in the sun, and kissed the lovely grass.</line>
<line>You said "Through glory and ecstasy we pass;</line>
<line>Wind, sun, and earth remain, and birds sing still,</line>
<line>When we are old, are old...." "And when we die</line>
<line>All's over that is ours; and life burns on</line>
<line>Through other lovers, other lips" said I,</line>
<line>"Heart of my heart, our heaven is now, is won!"</line>
</stanza>
<stanza>
<line>We are Earth's best, that learnt her lesson here.</line>
<line>Life is our cry. We have kept the faith!" we said;</line>
<line>"We shall go down with unreluctant tread</line>
<line>Rose-crowned into the darkness!".... Proud we were,</line>
<line>And laughed, that had such brave true things to say.</line>
<line>-- And then you suddenly cried, and turned away.</line>
</stanza>
</poem>
サクソンEE 9.2.1.2プロセッサは、次のエラーメッセージを生成します。
SystemID: C:\Books\XSLT 2.0 and XPath 2.0\Downloads\Chapter4\ch04\poem-to-xhtml.xsl
Engine name: Saxon-EE 9.2.1.2
Severity: error
Description: Failed to compile stylesheet. 1 error detected.
SystemID: C:\Books\XSLT 2.0 and XPath 2.0\Downloads\Chapter4\ch04\poem-to-xhtml.xsl
Engine name: Saxon-EE 9.2.1.2
Severity: fatal
Description: Attribute align is not permitted in the content model of the complex type of element h1
Start location: 16:0
URL: http://www.w3.org/TR/xslt20/#err-XTTE1510
結果ドキュメントのXMLスキーマ検証を達成する方法を要約します。
.1。少なくとも1つのスキーマをインポートします。例えば、
<xsl:import-schema namespace="http://www.w3.org/1999/xhtml"
schema-location="http://www.w3.org/2002/08/xhtml/xhtml1-strict.xsd"/>
.2です。 <xsl:result-document>
要素では、次のように厳密な検証を指定します。
<xsl:result-document validation="strict">
良い質問、+1 XSLT 2.0変換の結果のスキーマ検証を実行する方法の例については、私の答えを参照してください。 –
結果ドキュメントの検証に関するDimitreの答え以外にも、これは明確化が必要だと思います。変換は入力から出力への関数です。 1つのタイプの結果(DITA 1.1など)を出力するには、その関数の定義方法に依存します。関数自体が(パラメータで)指定する方法を提供しない場合、関数定義(拡張子、構成など)を変更する必要があります –
@Alejandro:はい、私がやっていることを正確に打つ。私はDITA OTプラグインdocbook2ditaを使用しようとしています。それは数年前に書かれたものです。 DITA 1.2より前。 TODOの部分では「DITA 1.1とDocBook 5へのアップグレード」と書かれています。 dita 1.2にアップグレードするにはどうすればよいですか? – Ace