sách gpt4 ai đã đi

XSLT 管理 - 将元数据附加到输出和参数的样式表

In lại 作者:行者123 更新时间:2023-12-02 11:41:48 28 4
mua khóa gpt4 Nike

我使用大约十几个 XSLT 文件来提供大量输出格式。目前,用户必须知道导出的文件格式的扩展名,例如RTF、HTML、TXT。

我还想使用参数来允许更多选项。如果我可以将元数据嵌入 XSL 文件本身,那么我可以通过扫描文件来获取详细信息。

这是我的想法。在此示例中,程序必须解析注释以获取所需信息。








true




有什么标准吗?我是否需要砍掉多个(带有少量 XML 架构的都柏林核心)?

附注正在应用的项目是 Argumentative .

1 Câu trả lời

Here is what I am thinking about. In this example the program would have to parse the comments for the required information.

Bạn不需要在注释中编写元数据代码。

可以使用普通 XML 标记将元数据指定为 XSLT 样式表的一部分 - 其结构和含义尽可能丰富.

以下是如何执行此操作的示例:


xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:meta="my:meta">



Title: Export to Rich Text Format

This Stylesheet converts to a Rich Text
Format format which may be used in a word processor
such as Word

RTF


Description="Company name to be inserted in the footer"/>


Description="Date Due"/>


Description="Do you want to include a graphical representation?"/>








"document('')/*/meta:metadata"/>


This is a demo how we can access and use the metadats.

Metadata --> Description:

""


当此转换应用于任何 XML 文档(未使用)时,结果为:

  This is a demo how we can access and use the metadats.

Metadata --> Description:

"
This Stylesheet converts to a Rich Text
Format format which may be used in a word processor
such as Word
"

请注意:

  1. 命名空间(当然不是无命名空间和 xsl 命名空间)中的任何元素都可以在任何 xslt 样式表的全局级别指定。

  2. 可以使用 xslt 函数 document() 访问此类元素。

关于XSLT 管理 - 将元数据附加到输出和参数的样式表,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3473546/

28 4 0
行者123
Hồ sơ cá nhân

Tôi là một lập trình viên xuất sắc, rất giỏi!

Nhận phiếu giảm giá Didi Taxi miễn phí
Mã giảm giá Didi Taxi
Giấy chứng nhận ICP Bắc Kinh số 000000
Hợp tác quảng cáo: 1813099741@qq.com 6ren.com