local-fulfillment 相关问题


GraphQL API 错误 - 不可哈希类型:“StrawberryAnnotation” - 五十一个应用程序

文件“c:\ Users idan \ AppData \ Local \ Programs \ Python \ Python311 \ Lib \ site-packages \ graphql xecution xecute.py”,第1036行,在await_result中 返回 build_response(等待结果,错误)#...


如何整合两个python文件夹?

我的 OS(C:) 驱动器中的两个位置都有 python。 一个位于 [Folder1] C:\Python38 其他位于 [Folder2] C:\Users\User\AppData\Local\Programs\Python\Python38-32 大部分Folder1和Fol...


当我尝试在 Visual Code Studio 上运行“ts-node index.ts”等代码时,它显示错误消息

/usr/local/lib/node_modules/ts-node/src/index.ts:857 const DiagnosticText = formatDiagnostics(诊断,diagnosticsHost); 类型错误:formatDiagnostics 不是函数 在 createTSError (/usr/loc...


如何修复“找不到 GLEW(缺少:GLEW_INCLUDE_DIR GLEW_LIBRARY)”

看来您正在使用 GCC 为 Linux 原生构建 Linux 上的 Cocos2dx:“cmake -G 'CodeBlocks - Unix Makefiles' -- OpenGL 包含目录:/usr/include CMake 错误位于 /usr/local/share/cmake-3.4/M...


无法在Mac上启动MySQL

我的Mac是以下版本。 产品名称: Mac OS X 产品版本:10.11.6 构建版本:15G20015 我已经通过mysql-5.7.21-1-macos10.13-x86_64.dmg安装了MySQL,并放入:/usr/local/mysq...


无法从“keras.utils.layer_utils”导入名称“CallFunctionSpec”(/usr/local/lib/python3.9/dist-packages/keras/utils/layer_utils.py)

代码昨天运行良好 代码是: 从 sklearn 导入指标 从tensorflow.keras.layers导入密集,辍学,激活,扁平化 从tensorflow.keras.models导入顺序 夫...


Ubuntu 无法将 tar.bz2 解压到 /usr/local

我想在我的 Ubuntu(10.0+ 版本)中安装 boost_1_54_0。我将包下载到/home/Downloas 然后我尝试按照boost官方网站给出的步骤进行操作。 http://www.boost.org/doc/libs/


企业网络VPN:`ddev Composer create`导致“ssl证书问题:自签名证书”

我在 wsl2 下运行 ddev。我在 zscaler 代理后面。我能够将 zscaler 证书复制到 ubuntu“/usr/local/share/ca-certificates”并运行“sudo update-ca-certificates”...


git:在日志和提交中仅使用 UTC

log.date、--date=、...-local、TZ= 等的组合会产生以下预期结果: git log 打印所有提交,在任何时区/DST、UTC 中进行,因此我可以从 --pre 中删除 %z...


没有名为packaging的模块

我在 Ubuntu 14 上工作。我安装了 python3 和 pip3。 当我尝试使用 pip3 时,出现此错误 回溯(最近一次调用最后一次): 文件“/usr/local/bin/pip3”,第 6 行,位于 夫...


绘制越界时出现溢出错误

当我将鼠标移到我在 tkintre 中绘制的边界之外时,会出现错误 > Tkinter 回调异常 回溯(最近一次调用最后一次): 文件“c:\Users\My PC\AppData\Local\Programs\P...


qmake 和 QT_INSTALL_PREFIX。如何为 Qt 库选择新位置?

我是 qmake 的新手,我正在尝试构建一个现有的应用程序。 Qt 最初安装在 /usr/local/lib/Qt-4.3.5 中,“qmake -query QT_INSTALL_PREFIX”返回该路径。 我已经移动了 Qt


在执行任何 Python 代码时将 CMD 窗口带到前台的模板

当我想通过在终端中运行任何Python将VSCode带到前台时,我这样做: 导入子流程 导入操作系统 VS_CODE_PATH = r'C:\Users\Computador\AppData\Local\Programs\Micro...


IntelliJ Idea Spring boot 应用程序在 Temp 中创建 tomcat 文件夹

我在 IntelliJ Idea 中遇到 Spring Boot 项目问题 - 每次我通过 IDE 启动项目时,Tomcat 都会在 appdata\local emp 中创建名为“tomcat.8080.X\work\Tomcat\localhost...”的新工作目录。


如何将 CPAN 的配置从 local::lib 更改为 sudo 首选项

您好,我刚开始使用 Perl,并使用以下代码安装了 CPAN: $ perl -MCPAN -e shell 我收到以下提示: 要安装模块,您需要配置本地 Perl 库目录或 escal...


Python 的语音转文本 API v2 问题(权限被拒绝)

只能在 Google Shell 中使用路径设置命令“exports...”。不要在代码中和我的主平台上使用“PATH”的 shell 工作 Python Local 我面临着一个令人困惑的交通问题...


应用程序关闭时处理电容器本地通知上的点击事件

我在使用 Capacitor 和 Quasar 的应用程序中遇到问题。我们正在利用 @capacitor/local-notifications 插件来处理本地通知,并且我们有一个方法可以获取


无法准备上下文:无法评估 Dockerfile 路径中的符号链接:lstat /var/lib/snapd/void/Dockerfile:没有这样的文件或目录

我在Ubuntu上用snap(snappy?)安装了docker,然后运行了这个: ln -sf /usr/bin/snap /usr/local/bin/docker 当我运行 docker build 时,我得到: 无法准备上下文:无法评估符号...


如何解决我的来自IoT设备的消息正文无法通过vscode/local通过azure函数接收的问题

如何解决这个错误?当我的传感器检测到人员并尝试将数据发送到云端时,会出现此错误。 从天蓝色函数读取正文时出错 错误文本: 这是结果: [2024-01-10T09:57:10.295Z]


显示输入类型日期的占位符文本

占位符不适用于直接输入类型日期和日期时间本地。 占位符不适用于直接输入类型 date 和 datetime-local。 <input type="date" placeholder="Date" /> <input type="datetime-local" placeholder="Date" /> 该字段在桌面上显示 mm/dd/yyy,而在移动设备上则不显示任何内容。 如何显示 Date 占位符文本? 使用onfocus="(this.type='date')",例如: <input required="" type="text" class="form-control" placeholder="Date" onfocus="(this.type='date')"/> 使用onfocus和onblur...这是一个例子: <input type="text" placeholder="Birth Date" onfocus="(this.type='date')" onblur="if(this.value==''){this.type='text'}"> 在这里,我尝试了 data 元素中的 input 属性。并使用 CSS 应用所需的占位符 <input type="date" name="dob" data-placeholder="Date of birth" required aria-required="true" /> input[type="date"]::before { content: attr(data-placeholder); width: 100%; } /* hide our custom/fake placeholder text when in focus to show the default * 'mm/dd/yyyy' value and when valid to show the users' date of birth value. */ input[type="date"]:focus::before, input[type="date"]:valid::before { display: none } <input type="date" name="dob" data-placeholder="Date of birth" required aria-required="true" /> 希望这有帮助 <input type="text" placeholder="*To Date" onfocus="(this.type='date')" onblur="(this.type='text')" > 这段代码对我有用。只需使用这个即可 对于 Angular 2,你可以使用这个指令 import {Directive, ElementRef, HostListener} from '@angular/core'; @Directive({ selector: '[appDateClick]' }) export class DateClickDirective { @HostListener('focus') onMouseFocus() { this.el.nativeElement.type = 'date'; setTimeout(()=>{this.el.nativeElement.click()},2); } @HostListener('blur') onMouseBlur() { if(this.el.nativeElement.value == ""){ this.el.nativeElement.type = 'text'; } } constructor(private el:ElementRef) { } } 并像下面一样使用它。 <input appDateClick name="targetDate" placeholder="buton name" type="text"> 对于 React,你可以这样做。 const onDateFocus = (e) => (e.target.type = "datetime-local"); const onDateBlur = (e) => (e.target.type = "text"); . . . <input onFocus={onDateFocus} onBlur={onDateBlur} type="text" placeholder="Event Date" /> 我是这样做的: var dateInputs = document.querySelectorAll('input[type="date"]'); dateInputs.forEach(function(input) { input.addEventListener('change', function() { input.classList.add('no-placeholder') }); }); input[type="date"] { position: relative; } input[type="date"]:not(.has-value):before { position: absolute; left: 10px; top: 30%; color: gray; background: var(--primary-light); content: attr(placeholder); } .no-placeholder:before{ content:''!important; } <input type="date" name="my-date" id="my-date" placeholder="My Date"> 现代浏览器使用 Shadow DOM 来方便输入日期和日期时间。因此,除非浏览器出于某种原因选择回退到 text 输入,否则不会显示占位符文本。您可以使用以下逻辑来适应这两种情况: ::-webkit-calendar-picker-indicator { @apply hidden; /* hide native picker icon */ } input[type^='date']:not(:placeholder-shown) { @apply before:content-[attr(placeholder)]; @apply sm:after:content-[attr(placeholder)] sm:before:hidden; } input[type^='date']::after, input[type^='date']::before { @apply text-gray-500; } 我使用了 Tailwind CSS 语法,因为它很容易理解。让我们一点一点地分解它: ::-webkit-calendar-picker-indicator { @apply hidden; /* hide native picker icon */ } 使用其 Shadow DOM 伪元素选择器隐藏本机选择器图标(通常是日历)。 input[type^='date']:not(:placeholder-shown) { @apply before:content-[attr(placeholder)]; @apply sm:after:content-[attr(placeholder)] sm:before:hidden; } 选择所有未显示占位符的 date 和 datetime-local 输入,并且: 默认使用 placeholder 伪元素显示输入 ::before 文本 在小屏幕及以上屏幕上切换为使用 ::after 伪元素 input[type^='date']::after, input[type^='date']::before { @apply text-gray-500; } 设置 ::before 和 ::after 伪元素的样式。


XSL/XSLT - 动态获取父节点及其值

有人可以帮助我吗?我有一个 xml,可以在其中获取节点中节点的名称,例如值、宽度、高度、重量…… 例子: 有人可以帮助我吗?我有一个 xml,可以在其中获取节点中节点的名称,例如值、宽度、高度、重量…… 示例: <?xml version="1.0" encoding="utf-8"?> <Data totalExecutionTime="00:00:00.0076034" totalCount="1">   <Features>     <ProductID id="100" language="NLB" caption="Product ID" captionAlternative="Product ID" unit="" help="" abbr="" groupId="73660834-eea8-4d67-8e84-b38e2742706a" group="Alles" groupOrder="0" viewGroupId="" viewGroup="" viewGroupOrder="0" topViewGroupId="b65b432a-1bf1-4fd4-ae92-03418d3204be" topViewGroup="Algemeen" topViewGroupOrder="1" viewOrder="0" form="Complex" dataType="String" readOnly="False" />     <Length id="245" language="NLB" caption="Lengte" captionAlternative="Lengte" unit="mm" help="" abbr="" groupId="73660834-eea8-4d67-8e84-b38e2742706a" group="Alles" groupOrder="0" viewGroupId="28813941-54b4-4511-b91e-d9ae53aa03e9" viewGroup="Afmetingen en gewicht" viewGroupOrder="91" topViewGroupId="590c0ee7-e1eb-4e18-b583-eba8984ffe82" topViewGroup="Specificaties" topViewGroupOrder="4" viewOrder="1" form="Simple" dataType="Number" readOnly="False" />     <Width id="242" language="NLB" caption="Breedte" captionAlternative="Breedte" unit="mm" help="" abbr="" groupId="73660834-eea8-4d67-8e84-b38e2742706a" group="Alles" groupOrder="0" viewGroupId="28813941-54b4-4511-b91e-d9ae53aa03e9" viewGroup="Afmetingen en gewicht" viewGroupOrder="91" topViewGroupId="590c0ee7-e1eb-4e18-b583-eba8984ffe82" topViewGroup="Specificaties" topViewGroupOrder="4" viewOrder="2" form="Simple" dataType="Number" readOnly="False" />     <Height id="244" language="NLB" caption="Hoogte" captionAlternative="Hoogte" unit="mm" help="" abbr="" groupId="73660834-eea8-4d67-8e84-b38e2742706a" group="Alles" groupOrder="0" viewGroupId="28813941-54b4-4511-b91e-d9ae53aa03e9" viewGroup="Afmetingen en gewicht" viewGroupOrder="91" topViewGroupId="590c0ee7-e1eb-4e18-b583-eba8984ffe82" topViewGroup="Specificaties" topViewGroupOrder="4" viewOrder="3" form="Simple" dataType="Number" readOnly="False" />     <Depth id="771" language="NLB" caption="Diepte" captionAlternative="Diepte" unit="mm" help="" abbr="" groupId="73660834-eea8-4d67-8e84-b38e2742706a" group="Alles" groupOrder="0" viewGroupId="28813941-54b4-4511-b91e-d9ae53aa03e9" viewGroup="Afmetingen en gewicht" viewGroupOrder="91" topViewGroupId="590c0ee7-e1eb-4e18-b583-eba8984ffe82" topViewGroup="Specificaties" topViewGroupOrder="4" viewOrder="4" form="Simple" dataType="Number" readOnly="False" />     <Weight id="243" language="NLB" caption="Gewicht" captionAlternative="Gewicht" unit="kg" help="" abbr="" groupId="73660834-eea8-4d67-8e84-b38e2742706a" group="Alles" groupOrder="0" viewGroupId="28813941-54b4-4511-b91e-d9ae53aa03e9" viewGroup="Afmetingen en gewicht" viewGroupOrder="91" topViewGroupId="590c0ee7-e1eb-4e18-b583-eba8984ffe82" topViewGroup="Specificaties" topViewGroupOrder="4" viewOrder="5" form="Simple" dataType="Number" readOnly="False" />     <LoadCapacity id="457" language="NLB" caption="Draagvermogen" captionAlternative="Draagvermogen" unit="kg" help="" abbr="" groupId="73660834-eea8-4d67-8e84-b38e2742706a" group="Alles" groupOrder="0" viewGroupId="c9d7dd7e-8a85-47cc-8542-2695e4615f75" viewGroup="Technische specificaties" viewGroupOrder="15" topViewGroupId="590c0ee7-e1eb-4e18-b583-eba8984ffe82" topViewGroup="Specificaties" topViewGroupOrder="4" viewOrder="6" form="Simple" dataType="Number" readOnly="False" />     <Volume id="435" language="NLB" caption="Inhoud" captionAlternative="Inhoud" unit="l" help="" abbr="" groupId="73660834-eea8-4d67-8e84-b38e2742706a" group="Alles" groupOrder="0" viewGroupId="bfaf678b-8b9d-4cea-aa99-08edd8316dc7" viewGroup="Algemene specificaties" viewGroupOrder="13" topViewGroupId="590c0ee7-e1eb-4e18-b583-eba8984ffe82" topViewGroup="Specificaties" topViewGroupOrder="4" viewOrder="7" form="Simple" dataType="Number" readOnly="False" />     <TireSize id="705" language="NLB" caption="Banden maat" captionAlternative="Banden maat" unit="mm" help="" abbr="" groupId="73660834-eea8-4d67-8e84-b38e2742706a" group="Alles" groupOrder="0" viewGroupId="c9d7dd7e-8a85-47cc-8542-2695e4615f75" viewGroup="Technische specificaties" viewGroupOrder="15" topViewGroupId="590c0ee7-e1eb-4e18-b583-eba8984ffe82" topViewGroup="Specificaties" topViewGroupOrder="4" viewOrder="8" form="Simple" dataType="String" readOnly="False" />     <LoadingScoop id="706" language="NLB" caption="Laadschep" captionAlternative="Laadschep" unit="mm" help="" abbr="" groupId="73660834-eea8-4d67-8e84-b38e2742706a" group="Alles" groupOrder="0" viewGroupId="c9d7dd7e-8a85-47cc-8542-2695e4615f75" viewGroup="Technische specificaties" viewGroupOrder="15" topViewGroupId="590c0ee7-e1eb-4e18-b583-eba8984ffe82" topViewGroup="Specificaties" topViewGroupOrder="4" viewOrder="9" form="Simple" dataType="String" readOnly="False" />   </Features>   <ProductID id="25137" parentId="0" brand="Normal" order="0" createdDate="2020-03-24T15:30:07.21" modifiedDate="2023-11-20T20:01:33.87">     <Value seq="0" modifiedDate="2020-03-24T15:30:10.493">111TA5851</Value>     <Width seq="0" modifiedDate="2020-03-24T15:30:10.493">515</Width>     <Height seq="0" modifiedDate="2020-03-24T15:30:10.493">1100</Height>     <Weight seq="0" modifiedDate="2020-04-02T13:18:09.44">7.7</Weight>     <LoadCapacity seq="0" modifiedDate="2020-03-24T15:30:10.493">150</LoadCapacity>     <LoadingScoop seq="0" modifiedDate="2020-03-24T15:30:10.493">350x170</LoadingScoop>   </ProductID> </Data> 我想要的是动态获取对应父节点的值。我可以获得如下节点名称: <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:template match="/"> <table> <xsl:for-each select="/Data/ProductID/*"> <xsl:variable name="myVariable" select="name(.)"/> <xsl:variable name="HasValue" select="count(/Data/ProductID/*)" /> <tr> <td><xsl:value-of select="name(.)" /></td> <td><xsl:value-of select="local-name()" /></td> <td><xsl:value-of select="name()" /></td> <td><xsl:value-of select="/Data/node($myVariable)/@unit" /></td> </tr> </xsl:for-each> </table> </xsl:template> </xsl:stylesheet> 但我不知道如何获取响应的父节点及其值,例如单位元素。 提前致谢并致以诚挚的问候 我已经尝试过但没用。我会不断收到错误:解析 '' 期间出现意外的标记 '$myVariable'。 我想你想声明一把钥匙 <xsl:key name="element-key" match="Data/Features" use="name()"/> 然后你想使用例如key('element-name', name())/@unit。


程序集绑定重定向到较低版本

我正在尝试降级 NServiceBus 依赖项,因此不要使用 4.0.0.0 而是使用 2.5.0.0 我正在尝试以下方法,但似乎都不起作用。 我正在尝试降级 NServiceBus 依赖项,因此不要使用 4.0.0.0 而是使用 2.5.0.0 我正在尝试以下方法,但似乎都不起作用。 <runtime> <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> <dependentAssembly> <assemblyIdentity name="NServiceBus" publicKeyToken="9fc386479f8a226c" culture="neutral"/> <bindingRedirect oldVersion="4.0.0.0" newVersion="2.5.0.0"/> </dependentAssembly> </assemblyBinding> </runtime> 我也尝试过使用代码库: <runtime> <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> <dependentAssembly> <assemblyIdentity name="NServiceBus" publicKeyToken="9fc386479f8a226c" culture="neutral"/> <codeBase version="2.5.0.0" href="NServiceBus.dll"/> </dependentAssembly> </assemblyBinding> </runtime> 不过,没什么。我浏览了 msdn 文档,没有提到以“向后”的方式使用此功能。这可能吗? 实际上,我正在将您的第一个语句用于某些互操作 DLL,因为我们公司的客户在 Office 更新方面有不同的状态。这是我使用的代码: <runtime> <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> <dependentAssembly> <assemblyIdentity name="office" publicKeyToken="71E9BCE111E9429C" culture="neutral"/> <bindingRedirect oldVersion="0.0.0.0-14.0.0.0" newVersion="11.0.0.0"/> </dependentAssembly> </assemblyBinding> 这提供了从 DLL 版本 14 到版本 11 的向后兼容性。您能提供您正在使用的 DLL 的链接吗? 我已经下载了 NServiceBus 框架(版本 3.3.8)并使用 ILSpy 检查了 DLL。我建议你对你的 DLL 做同样的事情。对于我的 DLL,它显示了与您相同的公钥令牌。您确定使用版本 4.0.0.0 而不是版本 3.3.0.0。或者您可能与公钥令牌不匹配。 根据 MSDN:https://msdn.microsoft.com/en-us/library/eftw1fys(v=vs.110).aspx 该值可以指定比oldVersion更早的版本。 指的是newVersion的bindingRedirect属性。同样在“备注”部分: 您还可以从程序集的较新版本重定向到旧版本。 他们的例子是: <configuration> <runtime> <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> <dependentAssembly> <assemblyIdentity name="myAssembly" publicKeyToken="32ab4ba45e0a69a1" culture="neutral" /> <bindingRedirect oldVersion="1.0.0.0" newVersion="2.0.0.0"/> </dependentAssembly> </assemblyBinding> </runtime> </configuration> 我确实注意到它还提到了一些有关应用程序配置文件中的显式程序集绑定重定向需要安全权限,也许这也会影响您? 上面的答案是很好的答案,但缺少重要的部分。如果你阅读评论,一些开发人员不再相信这是有效的。事实上,这是双向的,向上版本或向下版本 重要:文化 在我的实验中,只有当我将文化设置为中性时它才开始起作用。 (上面的例子有“en-us”) <assemblyIdentity name="..... culture="neutral"/> 在我的设置中,我有 WinApp 引用了 Lib1 和 Lib3。 Lib1参考Lib2和Lib3。 Lib2参考文献Lib3。当我按下按钮时,一个调用从 WinApp 一路传播到 Lib3(直接传播和通过库链传播),并且文本返回显示在屏幕上。 Lib3的名字很强大。 运行 1 - 未设置区域性 [assembly: AssemblyCulture("")],未设置绑定重定向 - 有效! 运行 2 - Lib3 中的较低版本,将绑定重定向设置为“en-us” - 失败! 运行 3 - Lib3 中的较低版本,将绑定重定向设置为“中性” - 有效!适用于向上版本和向下版本。 在其他运行中 - 使用设置 [assembly: AssemblyCulture("en-us")] - 当 AssemblyCulture 不为空时,所有尝试都会失败。事实上,当在WinApp中设置这个属性时,它甚至无法编译 错误CS7059:可执行文件不能是附属程序集;文化应该永远是空的 所以,我们开始吧。由于我不明白 AssemblyCulture 的所有复杂作用,我只声称我的实验仅证明在特定条件下版本重定向工作正常。 如果我没有理解错的话,我对 stimulsoft 报告 DDL 做了同样的事情,我安装了最新版本,但我想在我的应用程序中使用 2010.3。但不是通过配置文件和重定向: 我只是从解决方案资源管理器中删除了引用并添加了旧的 DLL 引用,然后设置了副本 Local 属性并重新编译,以便 DLL 与应用程序一起位于同一目录中,一切正常。也用其他一些 dll 完成了它。


动态获取父节点及其值

我有一个xml,我可以在其中获取节点中节点的名称,例如值、宽度、高度、重量... 例子: 我有一个 xml,可以在其中获取节点中节点的名称,例如值、宽度、高度、重量…… 示例: <?xml version="1.0" encoding="utf-8"?> <Data totalExecutionTime="00:00:00.0076034" totalCount="1">   <Features>     <ProductID id="100" language="NLB" caption="Product ID" captionAlternative="Product ID" unit="" help="" abbr="" groupId="73660834-eea8-4d67-8e84-b38e2742706a" group="Alles" groupOrder="0" viewGroupId="" viewGroup="" viewGroupOrder="0" topViewGroupId="b65b432a-1bf1-4fd4-ae92-03418d3204be" topViewGroup="Algemeen" topViewGroupOrder="1" viewOrder="0" form="Complex" dataType="String" readOnly="False" />     <Length id="245" language="NLB" caption="Lengte" captionAlternative="Lengte" unit="mm" help="" abbr="" groupId="73660834-eea8-4d67-8e84-b38e2742706a" group="Alles" groupOrder="0" viewGroupId="28813941-54b4-4511-b91e-d9ae53aa03e9" viewGroup="Afmetingen en gewicht" viewGroupOrder="91" topViewGroupId="590c0ee7-e1eb-4e18-b583-eba8984ffe82" topViewGroup="Specificaties" topViewGroupOrder="4" viewOrder="1" form="Simple" dataType="Number" readOnly="False" />     <Width id="242" language="NLB" caption="Breedte" captionAlternative="Breedte" unit="mm" help="" abbr="" groupId="73660834-eea8-4d67-8e84-b38e2742706a" group="Alles" groupOrder="0" viewGroupId="28813941-54b4-4511-b91e-d9ae53aa03e9" viewGroup="Afmetingen en gewicht" viewGroupOrder="91" topViewGroupId="590c0ee7-e1eb-4e18-b583-eba8984ffe82" topViewGroup="Specificaties" topViewGroupOrder="4" viewOrder="2" form="Simple" dataType="Number" readOnly="False" />     <Height id="244" language="NLB" caption="Hoogte" captionAlternative="Hoogte" unit="mm" help="" abbr="" groupId="73660834-eea8-4d67-8e84-b38e2742706a" group="Alles" groupOrder="0" viewGroupId="28813941-54b4-4511-b91e-d9ae53aa03e9" viewGroup="Afmetingen en gewicht" viewGroupOrder="91" topViewGroupId="590c0ee7-e1eb-4e18-b583-eba8984ffe82" topViewGroup="Specificaties" topViewGroupOrder="4" viewOrder="3" form="Simple" dataType="Number" readOnly="False" />     <Depth id="771" language="NLB" caption="Diepte" captionAlternative="Diepte" unit="mm" help="" abbr="" groupId="73660834-eea8-4d67-8e84-b38e2742706a" group="Alles" groupOrder="0" viewGroupId="28813941-54b4-4511-b91e-d9ae53aa03e9" viewGroup="Afmetingen en gewicht" viewGroupOrder="91" topViewGroupId="590c0ee7-e1eb-4e18-b583-eba8984ffe82" topViewGroup="Specificaties" topViewGroupOrder="4" viewOrder="4" form="Simple" dataType="Number" readOnly="False" />     <Weight id="243" language="NLB" caption="Gewicht" captionAlternative="Gewicht" unit="kg" help="" abbr="" groupId="73660834-eea8-4d67-8e84-b38e2742706a" group="Alles" groupOrder="0" viewGroupId="28813941-54b4-4511-b91e-d9ae53aa03e9" viewGroup="Afmetingen en gewicht" viewGroupOrder="91" topViewGroupId="590c0ee7-e1eb-4e18-b583-eba8984ffe82" topViewGroup="Specificaties" topViewGroupOrder="4" viewOrder="5" form="Simple" dataType="Number" readOnly="False" />     <LoadCapacity id="457" language="NLB" caption="Draagvermogen" captionAlternative="Draagvermogen" unit="kg" help="" abbr="" groupId="73660834-eea8-4d67-8e84-b38e2742706a" group="Alles" groupOrder="0" viewGroupId="c9d7dd7e-8a85-47cc-8542-2695e4615f75" viewGroup="Technische specificaties" viewGroupOrder="15" topViewGroupId="590c0ee7-e1eb-4e18-b583-eba8984ffe82" topViewGroup="Specificaties" topViewGroupOrder="4" viewOrder="6" form="Simple" dataType="Number" readOnly="False" />     <Volume id="435" language="NLB" caption="Inhoud" captionAlternative="Inhoud" unit="l" help="" abbr="" groupId="73660834-eea8-4d67-8e84-b38e2742706a" group="Alles" groupOrder="0" viewGroupId="bfaf678b-8b9d-4cea-aa99-08edd8316dc7" viewGroup="Algemene specificaties" viewGroupOrder="13" topViewGroupId="590c0ee7-e1eb-4e18-b583-eba8984ffe82" topViewGroup="Specificaties" topViewGroupOrder="4" viewOrder="7" form="Simple" dataType="Number" readOnly="False" />     <TireSize id="705" language="NLB" caption="Banden maat" captionAlternative="Banden maat" unit="mm" help="" abbr="" groupId="73660834-eea8-4d67-8e84-b38e2742706a" group="Alles" groupOrder="0" viewGroupId="c9d7dd7e-8a85-47cc-8542-2695e4615f75" viewGroup="Technische specificaties" viewGroupOrder="15" topViewGroupId="590c0ee7-e1eb-4e18-b583-eba8984ffe82" topViewGroup="Specificaties" topViewGroupOrder="4" viewOrder="8" form="Simple" dataType="String" readOnly="False" />     <LoadingScoop id="706" language="NLB" caption="Laadschep" captionAlternative="Laadschep" unit="mm" help="" abbr="" groupId="73660834-eea8-4d67-8e84-b38e2742706a" group="Alles" groupOrder="0" viewGroupId="c9d7dd7e-8a85-47cc-8542-2695e4615f75" viewGroup="Technische specificaties" viewGroupOrder="15" topViewGroupId="590c0ee7-e1eb-4e18-b583-eba8984ffe82" topViewGroup="Specificaties" topViewGroupOrder="4" viewOrder="9" form="Simple" dataType="String" readOnly="False" />   </Features>   <ProductID id="25137" parentId="0" brand="Normal" order="0" createdDate="2020-03-24T15:30:07.21" modifiedDate="2023-11-20T20:01:33.87">     <Value seq="0" modifiedDate="2020-03-24T15:30:10.493">111TA5851</Value>     <Width seq="0" modifiedDate="2020-03-24T15:30:10.493">515</Width>     <Height seq="0" modifiedDate="2020-03-24T15:30:10.493">1100</Height>     <Weight seq="0" modifiedDate="2020-04-02T13:18:09.44">7.7</Weight>     <LoadCapacity seq="0" modifiedDate="2020-03-24T15:30:10.493">150</LoadCapacity>     <LoadingScoop seq="0" modifiedDate="2020-03-24T15:30:10.493">350x170</LoadingScoop>   </ProductID> </Data> 我想要的是动态获取对应父节点的hte值。我可以获得如下节点名称: <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:template match="/"> <table> <xsl:for-each select="/Data/ProductID/*"> <xsl:variable name="myVariable" select="name(.)"/> <xsl:variable name="HasValue" select="count(/Data/ProductID/*)" /> <tr> <td><xsl:value-of select="name(.)" /></td> <td><xsl:value-of select="local-name()" /></td> <td><xsl:value-of select="name()" /></td> <td><xsl:value-of select="/Data/node($myVariable)/@unit" /></td> </tr> </xsl:for-each> </table> </xsl:template> </xsl:stylesheet> 但是我不知道如何获取相应的父节点及其值,例如单位元素。 我已经尝试过<xsl:value-of select="/Data/$myVariable/@unit" /></td>,但不起作用。我会不断收到错误:Unexpected token '$myVariable' during parsing of '<AnyKindTest>'。 我想你想声明一把钥匙 <xsl:key name="element-key" match="Data/Features" use="name()"/> 然后你想使用例如key('element-key', name())/@unit。 你写道: <xsl:value-of select="/Data/$myVariable/@unit" /> 我认为你的问题可能是重复的 使用 2 个参数进行 xslt 测试 您正在尝试使用 $myVariable,就好像它所保存的字符串可以以文本方式替换到您的 XPath 表达式中一样。您可能想要的是 /Data/*[name()=$myVariable]/@unit 很多人都犯过这个错误,但我不知道为什么。我不认为人们会将变量 $op 设置为“+”或“-”,然后期望 @x $op @y 执行适当的加法或减法。除非他们以前的编程经验完全是用宏语言。


© www.soinside.com 2019 - 2024. All rights reserved.