wax:connect
XUpdateで処理するXMLファイルを指定します。
名前空間 http://www.xmldb.org/xupdate の中で有効なディレクティブです。XUpdate処理時に対象ファイルが指定されていなかった場合はエラーとなります。
Attributes
名前 | 概要 | 初期値 | 必須 |
href | XMLファイルへのパスを指定します。 | None | Yes |
Dependencis
親ディレクティブ
子ディレクティブ
-
Sample
xupdate:modficationsで更新対象となるXMLファイルを指定しているサンプルです。
<xupdate:modifications
xmlns:xupdate="http://www.xmldb.org/update"
version="1.0">
<wax:connect href="target.xml" />
<xupdate:append select="/samples">
<sample>Test</sample>
</xupdate:append>
</xupdate:modifications>
また、以下のような書き方もできます。
<xupdate:modifications
xmlns:xupdate="http://www.xmldb.org/update"
version="1.0">
<wax:connect href="target.xml" />
<xupdate:append select="/itemlist">
<wax:connect href="subtarget.xml" />
<item>Test</item>
</xupdate:append>
<xupdate:insert-after select="/samples">
<sample>Test</sample>
</xupdate:insert-after>
</xupdate:modifications>
この場合、xupdate:appendの処理はsubtarget.xmlに対して行われ、xupdate:insert-afterはtarget.xmlが処理対象となります。
|
|