XSLTの初心者です。以下のようなCSVファイルから変換されたXMLがあります。値。彼らは皆、自身がfollowing.Iを格納するため使用して、変数「タイプ」を格納する変数を使用してみましたように私は結果を見てみたいxslt変換を使用して別のxmlのヘッダとフッタを使用してxslを変換するxmlを作成する
のみ文字列値で、同じレコードタグと<?xml version="1.0" encoding="utf-8"?>
<Items>
<Row>
<Transaction>Open</Transaction>
</Row>
<Row>
<Transaction>Type plus</Transaction>
</Row>
<Row>
<Transaction>A</Transaction>
</Row>
<Row>
<Transaction>B</Transaction>
</Row>
<Row>
<Transaction>Close</Transaction>
</Row>
<Row>
<Transaction>Open</Transaction>
</Row>
<Row>
<Transaction>Type minus</Transaction>
</Row>
<Row>
<Transaction>C</Transaction>
</Row>
<Row>
<Transaction>D</Transaction>
</Row>
<Row>
<Transaction>Close</Transaction>
</Row>
...
...
...
...
...
</Items>
を区別して を来りますプラスまたはマイナスですが、変数を更新できないようです。誰もが次への変換を行うことができるxslを作成できますか?
<?xml version="1.0" encoding="utf-8"?>
<result>
<message>
<to>plus</to>
<from>A</from>
</message>
<message>
<to>plus</to>
<from>B</from>
</message>
<message>
<to>minus</to>
<from>C</from>
</message>
<message>
<to>minus</to>
<from>D</from>
</message>
...
...
...
</result>
Saxon 9、XmlPrime、AltoなどのXSLT 2.0プロセッサを使用できますかバ? –
また、出力がルート要素のないいくつかの最上位の 'message'要素の断片であることも本当に望みますか? –
整形式のXML入力スニペットを表示すると、現在のところそのすべての 'Transaction'要素が正しく閉じられていない場合にも役立ちます。 –