从xsl创建的xml文件中检索数据

时间:2022-10-16 15:41:09

Not sure if the title makes any sense, but I need to read an XML document and retrieve the data created by an XSL XPath query.

不确定标题是否有意义,但我需要读取XML文档并检索由XSL XPath查询创建的数据。

The XML is located here and the XSL here. If that's not possible, I'm assuming that I'll have to write the XPath query manually. So my question is, since XSL already generates the total, any way to parse it out of the XML file?

XML位于此处,XSL位于此处。如果那是不可能的,我假设我必须手动编写XPath查询。所以我的问题是,既然XSL已经生成了总数,那么任何解析XML文件的方法都是如此?

Thank you

1 个解决方案

#1


If I correctly understand your question, you are asking how to take the totals generated by the XSLT.

如果我正确理解您的问题,您就会问如何获取XSLT生成的总数。

I see 2 options:

我看到2个选项:

  1. Reverse engineer the XSLT - try understanding it and produce your own XSLT that calculates the totals you want. Copy the logic from the existing XSLT
  2. 对XSLT进行反向工程 - 尝试理解它并生成自己的XSLT来计算所需的总数。从现有XSLT复制逻辑

  3. Do second XSLT transformation on existing XSLT - take the result of the current XSLT and write your own XSLT that takes the interesting parts from it. For this you need XSLT command line tool.
  4. 对现有的XSLT进行第二次XSLT转换 - 获取当前XSLT的结果并编写自己的XSLT,从中获取有趣的部分。为此,您需要XSLT命令行工具。

#1


If I correctly understand your question, you are asking how to take the totals generated by the XSLT.

如果我正确理解您的问题,您就会问如何获取XSLT生成的总数。

I see 2 options:

我看到2个选项:

  1. Reverse engineer the XSLT - try understanding it and produce your own XSLT that calculates the totals you want. Copy the logic from the existing XSLT
  2. 对XSLT进行反向工程 - 尝试理解它并生成自己的XSLT来计算所需的总数。从现有XSLT复制逻辑

  3. Do second XSLT transformation on existing XSLT - take the result of the current XSLT and write your own XSLT that takes the interesting parts from it. For this you need XSLT command line tool.
  4. 对现有的XSLT进行第二次XSLT转换 - 获取当前XSLT的结果并编写自己的XSLT,从中获取有趣的部分。为此,您需要XSLT命令行工具。