我正在使用Azure Logic App將CSV檔案轉換為XML,最初在BizTalk中設定了一切,以生成相關的XSD和XSL,效果非常好。 但是當我使用Azure Logic App時,輸出的XML檔案全部都是一行,盡管我確保它在XSL檔案中具有indent="yes"。
我知道我可以使用 notepad 來列印結果并保存檔案,但肯定有一種方法可以在 Logic App 中自動做到這一點?
uj5u.com熱心網友回復:
當使用XSLT 3.0時,我設法獲得縮進,例如,樣式表/地圖做
<?xml version="1.0" encoding="utf-8"? >
<xsl:styleheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"/span>
version="3.0"。
xmlns:xs="http://www.w3.org/2001/XMLSchema"。
exclude-result-prefixes="#all"。
expand-text="yes">>
<xsl: output method="xml" indent="yes"/>
<xsl:mode on-no-match="shallow-copy"/>/span>
<xsl: 模板 match="/" name="xsl:initial-template">
<xsl:next-match/>
<xsl:comment xmlns:saxon="http://saxon.sf.net/">/span>以{system-perty('xsl:product-name')}運行。{system-perty('xsl:product-version')}運行。{system-perty('Q{http://saxon.sf.net/}platform')}</xsl:comment>運行。
</xsl:template>
</xsl:styleheet>/span>
那么一個請求,例如
<root> <item> a< /item><item> b< /item></root> /
被轉化為輸出
<?xml version="1.0" encoding="UTF-8"? >
<root>
<item>/span>a</item>
<item>/span>b</item>
</root>/span>
<!--用SAXON HE 9.8.0.8運行 -->
我不知道他們是如何運行XSLT 1.0處理器來忽略xsl:output設定的,似乎是管道中的缺陷或怪癖。
轉載請註明出處,本文鏈接:https://www.uj5u.com/ruanti/326098.html
標籤:

