- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
在XPATH中,我正在处理如下所示的源XML,在该XML中,我想用空格定界符将每个editor
的子元素连接起来以创建全名,然后依次将结果全名用逗号连接:
<biblStruct type="book" xml:id="Biller_2011a">
<monogr>
<title>Inquisitors and Heretics in Thirteenth-Century Languedoc: Edition and Translation
of Toulouse Inquisition Depositions, 1273-1282</title>
<editor>
<forename>Peter</forename><surname>Biller</surname>
</editor>
<editor>
<forename>Caterina</forename><surname>Bruschi</surname>
</editor>
<editor>
<forename>Shelagh</forename><surname>Sneddon</surname>
</editor>
<imprint>
<pubPlace>
<settlement>Leiden</settlement>
<country>NL</country>
</pubPlace>
<publisher>Brill</publisher>
<date type="pub_date">2011</date>
</imprint>
</monogr>
</biblStruct>
map
引入定界符:
let $bibref := $bib//tei:biblStruct[@xml:id="Biller_2011a"]
return <editors>{
(for $auth in $bibref//tei:editor
return normalize-space(string-join($auth//child::text()," ")))!(if (position() > 1) then ', ' else (), .)
}</editors>
<editors>Peter Biller , Caterina Bruschi , Shelagh Sneddon</editors>
<editors>Peter Biller, Caterina Bruschi, Shelagh Sneddon</editors>
最佳答案
“我要在其中连接每个editor
的子元素的位置”将转换为$auth/*
而不是$auth//child::text()
。for return
和!
以及string-join
的整体组合看起来有些奇怪,看来您只能使用string-join($bibref//tei:editor/string-join(*, ' '), ', ')
。
关于xpath - XPATH删除元素串联中的多余空格,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53997232/
我正在尝试编写一行简单的代码,用于从各种服务器的 C 盘中删除各种用户文件。如何与 PowerShell 连接以获取到服务器的路径? 例如,这就是我想要做的,但 PowerShell 没有将 + 符号
我一直在尝试合并(连接)两个具有相同高度和宽度的 mp4 视频,但出现了一些错误。 代码是: FFmpeg ffmpeg = FFmpeg.getInstance(EditVideoActivity.
我正在尝试在 PostgreSQL 中进行简单的串联,但它不断抛出一条错误消息。我不明白我在这里做错了什么。 select concat('abcde', 'fgh'); No function ma
我不知道如何从一个函数中获取两个变量,这是我的菜鸟尝试,这可能吗?如果可以,它是如何完成的? #include float seriesParallel (float r1, float r2);/
我有以下代码: char stringHour[50], stringMinute[50], stringSecond[50]; // lots of code... itoa(hour, strin
我是套接字编程的新手,我正在尝试使用 TCP 实现客户端服务器。客户端在 Windows 中用 Java 编写,服务器在 Tandem/Hp-NonStop 中用 C 编写。我能够连接并向服务器发送请
到目前为止,我有以下内容。 DECLARE @Table Table (ID int, Value1 varchar(50), Value2 varchar(50), Value3 varchar(5
我是 Elasticsearch 的新手,想解决以下问题的用例 我有一些格式如下的文件 { "member_id":"number" "e_id":"number", "c_id":"numbe
我有这个功能来懒惰地观看日志文件... follow :: Handle -> IO [String] follow h = unsafeInterleaveIO $ do catch (do l
这个问题已经有答案了: List of lists changes reflected across sublists unexpectedly (17 个回答) 已关闭 3 年前。 我想创建一个没有
我们有一个 XML 文件,我们正试图找出一种动态使用的方法。 基本知识是这样的: 100.00 110.00 120.00 130.00 对于我们拥有的每个零件,我们希望在其上使用 xslt 以
我有一个很奇怪的问题。 下面的所有代码都工作正常: payload.modules.forEach(function(mod) { var modules_path = '..
如何使用 C 预处理自动生成以下代码模式(访问器)? // Immutable accessor. const auto& member1 () const { return _member1;
我有时间值来自数据库:00:30:00 这是我的代码: var gdtesttime = ; // 00:30:00 console.log(gdtesttime); var a = gdt
数据库:MySQL 我有两张表,一张用于用户分配的角色,一张包含角色信息。我的问题是分配的角色存储在单个字段中,用逗号分隔。我需要构建一个按名称而非 ID 列出角色的报告,但仍位于由列分隔的单个字段中
我在 ffmpeg 中使用以下命令,它会在视频开头添加 1 秒的黑帧。但是,我在输出视频中丢失了原始视频中的音频。我如何调整命令以确保原始音频与最终输出保持一致,或者更好的是,开头有 1 秒的“空白”
表 A 有 X 列,它是由表 B 中的 Y 列和 Z 列(均为 float )串联而成的 int。我想以类似于此的方式连接表 A 和 B: select * from tableA a inner j
pd.Series([1,1,1,1, "something", 1]).astype(float).cumsum().fillna(None) 我想在上面的系列中用 None 填充 NaN,但它告诉
在创建显示 OpenFileDialog/SaveFileDialog 的服务时,我正在考虑创建 LINQ 查询/清除 C# 代码到 Concatinate()/Join() 过滤表达式。 根据这个调
我正在尝试从数组中提取值并将所有值连接到一个字符串中,如下所示 var ingredient: String for tag in tags { if let text = tag.titleL
我是一名优秀的程序员,十分优秀!