使用 xslt functoid

发布于 2024-12-22 04:01:29 字数 1275 浏览 4 评论 0原文

我的输入就像

<Loop2300>
    <HD></HD>
    <DTP>
        <DTP1></DTP1> 
        <DTP2></DTP2> 
        <DTP3></DTP3>
   </DTP> 
   <DTP>
        <DTP1></DTP1> 
        <DTP2></DTP2> 
        <DTP3></DTP3>
   </DTP> 
</Loop2300>
<Loop2300>
    <HD></HD>
    <DTP>
        <DTP1></DTP1> 
        <DTP2></DTP2> 
        <DTP3></DTP3>
    </DTP>
    <DTP>
        <DTP1></DTP1> 
        <DTP2></DTP2> 
        <DTP3></DTP3>
    </DTP> 
</Loop2300>

我将所有 DTP 的值放入 SQL 表中一样。除了 DTP 之外,我在目标模式中还有一个 id 元素,我必须在其中放置 HD 的序列号。

所以它将输出如下:

1    DTP1 DTP2 DTP3

1     DTP1 DTP2 DTP3

2    DTP1 DTP2 DTP3

2    DTP1 DTP2 DTP3

我正在使用 XSLT functoid 内联 xslt 调用模板。

在其中,我使用的

<xsl:template>
    <xsl:for-each select="TS834_2300_Loop/HD_HealthCoverage">
        <xsl:number value="position()" format="1. "/>
    </xsl:for-each>
</xsl:template>

代码没有输入,只有一个输出到 Id

但它给出的错误转换失败。

那么我需要做什么改变才能获得合适的 id 呢?

I have input like

<Loop2300>
    <HD></HD>
    <DTP>
        <DTP1></DTP1> 
        <DTP2></DTP2> 
        <DTP3></DTP3>
   </DTP> 
   <DTP>
        <DTP1></DTP1> 
        <DTP2></DTP2> 
        <DTP3></DTP3>
   </DTP> 
</Loop2300>
<Loop2300>
    <HD></HD>
    <DTP>
        <DTP1></DTP1> 
        <DTP2></DTP2> 
        <DTP3></DTP3>
    </DTP>
    <DTP>
        <DTP1></DTP1> 
        <DTP2></DTP2> 
        <DTP3></DTP3>
    </DTP> 
</Loop2300>

I am putting the value of all DTP in SQL Table. Along with DTP I have one id element in the destination schema where I have to put the sequence number of HD.

So it will output like this:

1    DTP1 DTP2 DTP3

1     DTP1 DTP2 DTP3

2    DTP1 DTP2 DTP3

2    DTP1 DTP2 DTP3

I am using XSLT functoid inline xslt call template.

Inside that I am using

<xsl:template>
    <xsl:for-each select="TS834_2300_Loop/HD_HealthCoverage">
        <xsl:number value="position()" format="1. "/>
    </xsl:for-each>
</xsl:template>

code with no input and one output to the Id

But its giving error transform fail.

So what change do I need to do get the appropriate id?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

风吹短裙飘 2024-12-29 04:01:29

尝试将您的 源节点连接到
迭代 functoid

要在 下展平您的值,您需要
表循环 functoid

我现在还没有准备好 BizTalk 开发机器来构建完整的原型,但这应该可以为您提供一个起点。

Try connecting your <HD> source node to an
Iteration functoid.

To flatten your values under <DTP> you will need the
Table Looping functoid.

I don't have my BizTalk dev machine ready right now to build a complete prototype but this should give yo a starting point.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文