任何一个帮助脚本功能错误? [英] any one help script functiod error?
问题描述
i need someone help,
how to remove the duplicate elements in the destation side , and like
requirment, source file come like this,
<emlpoyees>
<emlpoyees>
<emlpoyees>
<emp>ab3<emp>
but here i want take as per requirment output take <emp>ab3<emp>.
im tried with scrpitfunctiod using xslt this , but not working,
?xml version="1.0" encoding="utf-8"?>
please any one help.
please any provide sample .
im using this xslt coding in inline call script functiod call template, but got the error like , hi 你能尝试吗? / rootnote / employees [last()] Can you try /rootnote/employees[last()] 请参阅 Please see
this page for details about using Xpath Functions HTH Naushad 这篇关于任何一个帮助脚本功能错误?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
hi,
i需要别人的帮助,
如何删除destation端的重复元素,例如
requirment,源文件是这样的,
< emlpoyees>
< emp> ab1< emp>
< employees>
<emp>ab1<emp>
<employees>
< emlpoyees>
< emp> ab1< emp>
< employees>
<emp>ab1<emp>
<employees>
< emlpoyees>
< emp> ab3< emp>
< employees>
<employees>
但在这里我想根据要求采取输出< emp> ab3< emp>。
我尝试使用scrpitfunctiod 使用xslt this,但不能正常工作,
?xml version =" 1.0" encoding =" utf-8"?>
< xsl:stylesheet version =" 1.0" xmlns:xsl =" http://www.w3.org/1999/XSL/Transform "
xmlns:msxsl =" urn:schemas-microsoft-com:xslt" exclude-result-prefixes =" msxsl">
< xsl:output omit-xml-declaration = " yes" indent =" yes" />
< xsl:key name =" group" match =" / rootnode / employees" use =" emp" />
< xsl:template match =" /">
< xsl:for-each select =" / rootnode / employees [generate-id()= generate-id(key('group',emp)[1])] ">
< xsl:if test =" position()= last()"> &
< xsl:copy-of select ="。" />
< / xsl:if>
< / xsl:template>
< / xsl:stylesheet>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:msxsl="urn:schemas-microsoft-com:xslt" exclude-result-prefixes="msxsl">
<xsl:output omit-xml-declaration="yes" indent="yes"/>
<xsl:key name="group" match="/rootnode/employees" use="emp"/>
<xsl:template match="/">
<xsl:for-each select="/rootnode/employees[generate-id()=generate-id(key('group', emp)[1])]">
<xsl:if test="position() = last()">
<xsl:copy-of select="."/>
</xsl:if>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>
please any one帮助。
请提供任何样本。
即时通讯在内联调用脚本函数调用模板中使用此xslt编码,但得到的错误如,
输出验证错误: 根级别的数据
无效。第3行,第5位。
also: < strong style ="border-top-width:0px;右边框宽度:0像素;边界底部宽度:0像素;左边框宽度:0像素;边框样式family:宋体;边框颜色family:宋体;字体重量:粗体;字体风格:继承; FONT-FAMILY:继承;边距:0像素;概括式family:宋体;轮廓色:初始; padding-bottom:0px">输出
验证错误:缺少根元素。
在
之后我发现了一些奇怪的错误: 连接到目标节点'emp'的
Scripting functoid在其'Xslt调用模板'定义中有一个错误:'意外的XML声明.XML声明必须是第一个节点在文档中,并且在
之前不允许出现空格字符。第1行,第81位。'
谢谢
推荐答案
这个页面有关使用Xpath函数的详细信息