如何在xslt 1.0中进行模板调用工作(How to make template call work in xslt 1.0)
我有以下模板,我不确定是否正确
<xsl:template match="text()" name="createName"> <xsl:param name="Type"/> <xsl:if test="contains(Type,'NEW')"> <xsl:value-of select="concat('New','Goal')"/> </xsl:if> <xsl:if test="contains(Type,'AMD')"> <xsl:value-of select="concat('Amended','Goal')"/> </xsl:if> </xsl:template>
在这里调用此模板
<xsl:element name="PackageName"> <xsl:call-template name="createName"> <xsl:with-param name="Type" select="s0:PIXField/s0:TransactionID"/> </xsl:call-template> </xsl:element>
s0:PIXField / s0:TransactionID = BPA201605311506452806320060A1AMD
我想创建值为'Amended Goal'的PackageName元素。 但是现在我得到了空的PackageName。 不知道我的代码失败了。 请帮忙。
I have this following template which i am not sure correct or not
<xsl:template match="text()" name="createName"> <xsl:param name="Type"/> <xsl:if test="contains(Type,'NEW')"> <xsl:value-of select="concat('New','Goal')"/> </xsl:if> <xsl:if test="contains(Type,'AMD')"> <xsl:value-of select="concat('Amended','Goal')"/> </xsl:if> </xsl:template>
Calling this template here
<xsl:element name="PackageName"> <xsl:call-template name="createName"> <xsl:with-param name="Type" select="s0:PIXField/s0:TransactionID"/> </xsl:call-template> </xsl:element>
s0:PIXField/s0:TransactionID = BPA201605311506452806320060A1AMD
I want to create PackageName element with value 'Amended Goal'. But for now i am getting empty PackageName. dont know where my code fails. Please help.
原文:https://stackoverflow.com/questions/37730209
最满意答案
如果您使用预构建的ContactUI,请添加用户,而不是选择要显示的字段,它将遵循Apple的Contact App视图。
你可以做的是以编程方式编写,开发自己的UI来添加联系人。
请按照本教程获取更多信息。 请参见4.1节: 教程
If you are using the pre build ContactUI do add the user, than you can't select what fields to show, It will follow the Apple's Contact App view.
What you can do is make it programatically, develop your own UI to add a contact.
follow this tutorial for more info. See section 4.1: Tutorial
相关问答
更多-
离子和ios9错误和问题(Ionic and ios9 bugs and issues)[2022-02-02]
使用此补丁: 角ios9-uiwebview.patch.js Use this patch: angular-ios9-uiwebview.patch.js -
iOS9中的UIDatePicker问题(UIDatePicker issue in iOS9)[2022-07-11]
我认为这是新旧字体旧金山(字体比Helvetica大)和.xib文件的问题。 它可以通过在显示前更改UIDatePicker模式进行修改,然后将其更改回所需的模式: [myDatePicker setDatePickerMode:UIDatePickerModeDateAndTime]; [myDatePicker setDatePickerMode:UIDatePickerModeDate]; 也尝试以编程方式添加DatePicker。 我认为它是一个新的字体在iOS 9中的错误。 I think th ... -
ios9中的google登录问题(google signin issue in ios9)[2022-10-10]
我遇到了同样的问题:通过GIDSignIn登录谷歌非常适合 但是对于iOS9,一旦允许按下就会打开Google.com页面。 如果我按下此页面上的完成按钮,控制将进入上述方法,错误=错误域= com.google.GIDSignIn代码= -5“用户取消了登录流程。” UserInfo = {NSLocalizedDescription =用户取消了登录流程。} 我研究了一下。 找到两种可能的解决方 白名单登录相关网址 - 谷歌登录崩溃iOS 9试图调用canOpenURL 使用handleurl call ... -
如果您使用预构建的ContactUI,请添加用户,而不是选择要显示的字段,它将遵循Apple的Contact App视图。 你可以做的是以编程方式编写,开发自己的UI来添加联系人。 请按照本教程获取更多信息。 请参见4.1节: 教程 If you are using the pre build ContactUI do add the user, than you can't select what fields to show, It will follow the Apple's Contact App ...
-
这个新产品在WWDC会议“核心位置的新功能”中进行了说明 。 如果您链接到iOS 9,默认值为NO 。 如果您的应用程序在后台使用位置(不显示蓝色状态栏),除了在Info.plist中设置后台模式功能之外,还必须将allowsBackgroundLocationUpdates设置为YES 。 否则位置更新仅在前台传送。 优点在于,您现在可以在同一个应用程序中使用位置管理员进行背景位置更新和其他位置管理器,只能使用前台位置更新。 您也可以将值重置为NO以更改行为。 文档很清楚: 默认情况下,对于与iOS 9. ...
-
弃权消息说(强调我的): 使用stringByAddingPercentEncodingWithAllowedCharacters(_ :)代替, 它始终使用推荐的UTF-8编码 ,并且对于特定的URL组件或子组件进行编码 ,因为每个URL组件或子组件对于哪些字符有效会有不同的规则。 所以你只需要提供一个足够的NSCharacterSet作为参数。 幸运的是,对于URL,有一个非常方便的类方法称为URLHostAllowedCharacterSet ,您可以使用如下: let encodedHost = u ...
-
ios9中的facebook登录问题(facebook login issue in ios9)[2022-12-08]
我认为有一些事情可能会导致你的问题。 1)您确定已添加最新的FBSDKCoreKit和FBSDKLoginKit并将这些行添加到swift文件的顶部: import FBSDKCoreKit import FBSDKLoginKit 2)我已经读过这只是模拟器上的一个错误,应该被忽略。 确保您在真实设备上测试此功能。 3)您是否在课程声明的标题中包含了FBSDKLoginButtonDelegate ? 4)我会确保你的info.plist源代码都包含在内并且正确无误。 这是我在我的应用程序中为Faceb ... -
我找到了类似的东西。 这个问题的解决方案似乎正在改变这个: win = window.open('', '_blank', 'width=500,height=700'); 这意味着,省略'about:blank',只需将其留空即可。 也适用于codepen上的代码示例。 我不明白为什么,我的编程技巧有限。 但我在一些论坛软件上遇到了同样的问题,并设法确定了这一点。 干杯,托马斯 I found something similar. A solution to the problem seems to b ...
-
我最终覆盖了layoutSubviews,因为这是一个UIView子类,它现在似乎正在使用此代码 - (void)layoutSubviews { [super layoutSubviews]; static CGSize viewBounds = { 0, 0 }; static CGSize previousViewBounds = { 0, 0 }; [self setNeedsUpdateConstraints]; viewBounds = CGSizeMa ...
-
在嗅探数据包之后,我们意识到Facebook现在使用Safari Web View,而不是通过App开放,Facebook正在使用Safari上另一个帐户的旧缓存会话。 愚蠢的错误 - 但新的Facebook SDK也很奇怪。 希望这有助于其他人。 After sniffing the packets we realized now that Facebook uses the Safari Web View, instead of opening up via App, Facebook was usin ...