-1

こんにちは、XSL テンプレートで変換している xml があります。問題は、その中に保存されている多くの属性が、私の変換を失敗させているように見えることです. これらの属性/名前空間プレフィックスを事前に定義して、変換が停止し続け、問題のある名前を手動で削除する必要があるようにする方法はありますか?

変換には Satimage xmlLib を使用しています。

例えば ​​:

<ConstantValue>
     <Value abc:actualType="Int32">2</Value>
</ConstantValue>

また

<OperationDefinition abc:uid="urn:uuid:f9ff09d2-cc85-3d29-a982-a8776842dac0">
   <OperationInputCount>2</OperationInputCount>
</OperationDefinition>

変換を壊している要素名にコロンを含む要素もあります。

 <this:AppCode>14</this:AppCode>

変換のために、これらの属性を保持する必要はなく、要素内の値のみを保持します。

どうもありがとう、

4

1 に答える 1

0

Names with colons are allowed in core XML, but not in XML that is namespace-well-formed, unless the part before the colon is properly declared as a namespace prefix. XSLT and nearly all other modern XML applications require the XML to be namespace-well-formed, so you will not be able to process this XML using XSLT unless you first convert it. You could convert it, for example, by changing all the colons to dots or underscores.

于 2012-08-22T07:05:19.150 に答える