saxon

Saxon-HE Integrated Extension Functions

泄露秘密 提交于 2021-01-28 06:54:05
问题 I should have originally posted my question by stating that our code was using an embedded saxon extension function - saxon:parse($xml) which returned the root element/node of the xml. However, in Saxon-HE that extension is no longer available - so I am trying to write an Integrated extension that parses an xml string into a document and returns the root element. I am using Saxon-HE 9.5.1.6 - I am trying to write an Integrated Extension Function that returns the ROOT Node of a Document. The

SaxonApiException: The context item for axis step ./CLIENT is absent

那年仲夏 提交于 2021-01-27 19:46:55
问题 I am trying to convert and XML to an XML using XSLT 2.0 in saxon/java. I am using a sample XML I found on stack overflow thread "Applying Muenchian grouping for a simple XML with XSLT" However I am getting an error : XPDY0002: The context item for axis step ./CLIENT is absent. My test XSL: <?xml version="1.0" encoding="utf-8"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0"> <xsl:output omit-xml-declaration="no" indent="yes" /> <xsl:strip-space elements="*" />

SaxonApiException: The context item for axis step ./CLIENT is absent

时间秒杀一切 提交于 2021-01-27 19:22:41
问题 I am trying to convert and XML to an XML using XSLT 2.0 in saxon/java. I am using a sample XML I found on stack overflow thread "Applying Muenchian grouping for a simple XML with XSLT" However I am getting an error : XPDY0002: The context item for axis step ./CLIENT is absent. My test XSL: <?xml version="1.0" encoding="utf-8"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0"> <xsl:output omit-xml-declaration="no" indent="yes" /> <xsl:strip-space elements="*" />

How to use XSLT 3.0 using Saxon-HE 9.8 in .NET

拜拜、爱过 提交于 2021-01-27 07:04:03
问题 I'm using Win7 and set my VSC# project to .NETFramework4. Then download SaxonHE9-8-0-7N-setup.exe and install. Then reference saxon9he-api.dll to C# project and using Saxon.Api; And here's my program.cs : static void Main(string[] args) { var xslt = new FileInfo(Path.GetFullPath(Path.Combine(Environment.CurrentDirectory.ToString(), @"..\..\..")) + @"\TEST.xslt"); var input = new FileInfo(Path.GetFullPath(Path.Combine(Environment.CurrentDirectory.ToString(), @"..\..\..")) + @"\TEST.xml"); var

Remove certain nodes from an xml using xslt3.0

女生的网名这么多〃 提交于 2021-01-07 02:33:00
问题 Currently i am trying to remove certain nodes from an xml using xslt3.0 using identity template. But this is taking long processing time. need some suggestion to improve performace using Xslt30Transformer. <xsl:stylesheet version="3.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:saxon="http://saxon.sf.net/"> <xsl:output method="xml" indent="yes"/> <xsl:variable name="pathexcluded" select="'CATALOG/CD1 | CATALOG/CD2 '"/> <xsl:variable name="changed-nodes" as="node()*" > <xsl

Remove certain nodes from an xml using xslt3.0

跟風遠走 提交于 2021-01-07 02:32:58
问题 Currently i am trying to remove certain nodes from an xml using xslt3.0 using identity template. But this is taking long processing time. need some suggestion to improve performace using Xslt30Transformer. <xsl:stylesheet version="3.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:saxon="http://saxon.sf.net/"> <xsl:output method="xml" indent="yes"/> <xsl:variable name="pathexcluded" select="'CATALOG/CD1 | CATALOG/CD2 '"/> <xsl:variable name="changed-nodes" as="node()*" > <xsl

XPath 3.1 in XSL-T 3.0 How to parse free format String to DateTime as in java.text.SimpleDateFormat?

早过忘川 提交于 2021-01-06 06:04:06
问题 I would like to parse almost free format String to DateTime in XSL-T 3.0 as one can do it in Java using java.text.SimpleDateFormat. Is it possible? I am using the latest Saxon HE 9.7.0.1 for Java and consulting it with the W3C CR 3.1 "XPath and XQuery Functions and Operators 3.1". There is the function "fn:parse-ietf-date" in W3C CR 3.1, but it does not look like it can parse String like "6.1.94 7:29" - the Exception: Error at char 17 in xsl:value-of/@select on line 20 column 47 of tr.xsl:

Finding all XPaths in a XQuery using Saxon-HE with C#

 ̄綄美尐妖づ 提交于 2020-12-07 04:57:26
问题 Situational Background: XSD with SCH XML Schema (XSD) I have an XML schema definition ("the schema") that includes several other XSDs, all in the same namespace. Some of those import other XSDs from foreign namespaces. All in all, the schema declares several global elements that can be instantiated as XML documents. Let's call them Global_1 , Global_2 and Global_3 . Business Rules (SCH) The schema is augmented by a Schematron file that defines the "business rules". It defines a number of

【生信】简单的 GDS (GEO DataSets) 查询统计工具

旧时模样 提交于 2020-11-18 00:05:16
背景 写了个 GDS 的查询工具,主要用于检索式检索结果的空间与数量分析,毕竟循证理念嘛,荟萃全球资源,自己是否已经做到了呢?这就需要对自己检索到的数据集的源头进行定位、统计和分析,通过喜闻乐见的 html 可视化报表形式呈现,以确定是否需要对检索式进行改进。 功能 根据检索式检索 GSE 数据集并批量查询元数据,统计 GSE 数据集所来自的国家和城市。高级功能正在逐步开发。 食用方式 从 我的仓库 下载好项目文件。 任意文本编辑器打开 XML 文件进行编辑,按照示例格式填入自己的检索式,支持多条。需要注意的是浏览器有迭代次数的限制(比如3000),检索的结果数不宜过千,否则被浏览器检测到潜在的“无限循环”,可能会启动保护机制终止程序运行,得到空白网页。目前还没有研究解法。 xsltApplySequenceConstructor: A potential infinite template recursion was detected. You can adjust xsltMaxDepth (--maxdepth) in order to raise the maximum number of nested template calls and variables/params (currently set to 3000). Chrome 浏览器关闭安全模式( chrome