XSLT 中文字结果元素的浅拷贝是什么?
关于:
文字结果元素充当 构造元素的指令 结果中同名的节点 树。 XSLT 处理器有效地 创建文字的浅表副本 样式表中的结果元素和 将其插入到结果树中的 结果树中的位置 目前正在建设中。
来源:http://lenzconsulting.com/how-xslt-works/#literal_result_elements
我想知道他说 XSLT 处理器有效地创建了文字结果元素的浅表副本
是什么意思?
在这种情况下,浅拷贝是什么意思?
regarding:
A literal result element acts as an
instruction to construct an element
node with the same name in the result
tree. The XSLT processor effectively
creates a shallow copy of the literal
result element from the stylesheet and
inserts it into the result tree at the
location within the result tree that
is currently being constructed.
Source: http://lenzconsulting.com/how-xslt-works/#literal_result_elements
I'm wondering what does he mean when he say The XSLT processor effectively creates a shallow copy of the literal result element
?
What's a shallow copy mean in this context?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
W3C XSLT 规范,这是唯一的规范性文档规范XSLT 语言的不使用术语“浅复制”
我的猜测此问题中引用的材料想要说明的内容,如以下示例所示:
在输出中,元素
不会被复制。 “浅复制”不复制任何子节点。再次强调,最好忘记字面redult元素的“浅层复制”,而只依赖规范规范。
The W3C XSLT specification, which is the only normative document specification of the XSLT language doesn't use the term "shallow copy"
My guess what the material referenced in this question wanted to state, is illustrated by this example:
In the output, the element
<xsl:value-of select="."/>
isn't copied. A "shallow copy" does not copy any children nodes.Once again, it is best to forget about "shallow copying" of the literal redult element and to rely only on the normative specification.