saxon

How to support returning ArrayList in ExtensionFunction Saxon HE 9.7

坚强是说给别人听的谎言 提交于 2019-12-11 14:32:12
问题 I have a program that uses Saxon HE 9.7 for XML transformation. public String transform() throws TransformerException { TransformerFactory factory = TransformerFactory.newInstance(); TransformerFactoryImpl tFactoryImpl = (TransformerFactoryImpl) factory; Configuration saxonConfig = tFactoryImpl.getConfiguration(); Processor processor = (Processor) saxonConfig.getProcessor(); processor.registerExtensionFunction(new Employee()); Source xslt = new StreamSource(new File("mappings.xslt"));

using saxon9he with catalog.xml file

对着背影说爱祢 提交于 2019-12-11 12:29:30
问题 my catalog.xml <?xml version="1.0"?> <catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog"> <public publicId="-//EG//DTD EG DITA Map//EN" uri="dtds/maps.dtd"/> <public publicId="-//EG //DTD EG DITA Composite//EN" uri="dtds/topics.dtd"/> </catalog> the DTDs as they are expected: <!DOCTYPE concept PUBLIC "-//EG//DTD EG DITA Composite//EN" "../../system/dtd/client/eg-dita.dtd"> <!DOCTYPE docmap PUBLIC "-//EG//DTD EG DITA Map//EN" "../../system/dtd/client/eg-docmap.dtd"> the filestore

Why does Saxon evaluate the result-document URI to be the same?

岁酱吖の 提交于 2019-12-11 12:08:43
问题 My XSL source document looks like this <Topology> <Environment> <Id>test</Id> <Machines> <Machine> <Id>machine1</Id> <modules> <module>m1</module> <module>m2</module> </modules> </Machine> </Machines> </Environment> <Environment> <Id>production</Id> <Machines> <Machine> <Id>machine1</Id> <modules> <module>m1</module> <module>m2</module> </modules> </Machine> <Machine> <Id>machine2</Id> <modules> <module>m3</module> <module>m4</module> </modules> </Machine> </Machines> </Environment> <

Saxon Transformation result in Unknown extension instruction

让人想犯罪 __ 提交于 2019-12-11 12:05:45
问题 I am trying to query oracle database from XSLT using sql;query, i am using sql9-sql.jar along with saxon EE 9.6.0.7 version where in i have placed ojdc6.jar also in buildpath of eclipse. I am getting below error queue name is Error in xsl:value-of/@select on line 37 column 65 of pro.xsl: XTDE1450: Unknown extension instruction in built-in template rule ; SystemID: file:/C:/home/oracle/workspace/XSLTsaxonEE/src/com/thbs/viniReq/pro.xsl; Line#: 37 net.sf.saxon.trans.XPathException: Unknown

saxon:indent-spaces attribute is being ignored

时间秒杀一切 提交于 2019-12-11 08:59:27
问题 In my question here I'm trying to pass in a param to my stylesheet so a user can specify the level of indentation desired. Apparently Xalan cannot read the value of a param into its indent-amount attribute, so I'm trying with this version of Saxon-HE instead. Saxon has the attribute indent-spaces which I am trying to use as follows: <xsl:stylesheet version="2.0" xmlns:saxon="http://saxon.sf.net" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <!-- <xsl:param name="indent-spaces" select="0"/

How do I change the XSLT provider for Spring MVC (i.e. Plug in Saxon 9.x)?

泄露秘密 提交于 2019-12-11 04:21:56
问题 I've done a google but can't see anyone talking about a solution. Is there a proper way of plugging in Saxon so that Spring MVC uses it for its XSLT views instead of whatever comes with the JDK, which is still 1.0 ? (Haven't tried myself, in a rush, so just wondered if anyone out there has already done this and if so how). Thanks. 回答1: Its as Michael says. Basically just put the Saxon jar(s) on the classpath. I imagined it could be, but didn't like to assume, and simply couldn't find a

How to pass document type parameter to xslt using saxon?

冷暖自知 提交于 2019-12-11 03:41:00
问题 For sending atomic data types will use like transformer.SetParameter(new QName("", "", customXml), new XdmAtomicValue("true")); how to pass a XML/Node as a param to XSLT from C# ? Can you please help me followed your code it's working fine but i am getting only text inside the xml(what i am passing in parameter) but not Nodes XSLT : <xsl:param name="look-up" as="document-node()"/> <xsl:template match="xpp:document"> <w:document xml:space="preserve"> <xsl:value-of select="$look-up"/> </w

Converting Unicode-escaped characters with XSLT

只愿长相守 提交于 2019-12-11 03:38:04
问题 Can anyone say how I convert Unicode code point escaped characters like \u00e4 to the real character ö in XSLT? I do have... <text>Eine Repr\u00e4sentation des Objektes geh\u00f6rt...<text> ...and I like to have: <text>Eine Repräsentation des Objektes gehört...<text> 回答1: What a fun thing to do... so here's a XSLT 2.0 solution that I came up with: <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema"

Saxon Xpath namespace

不打扰是莪最后的温柔 提交于 2019-12-11 03:32:45
问题 Given the following xml: <Document xmlns="urn:company.com:catalog.01" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <book> <author>Wells</author> </book> </Document> With Xerces the following xpath query works: //urn:company.com:catalog.01:author When I use Saxon (v 8.7) I a StaticError with message 'Invalid QName local part {company.com:catalog....}'. What should the Xpath query look like to get the value of author? 回答1: Xerces should not allow an XPath expression like //urn:company

Sorting words according to letters of an old Semitic language

纵然是瞬间 提交于 2019-12-11 02:19:32
问题 I use XSLT 3.0, Saxon-PE 9.7. I need to sort orth according to the Ugaritic language, close to Hebrew but with additional characters. I have tried: <xsl:sort select="orth" data-type="text" order="ascending" lang="uga"/> But the proposed order is not correct. So I think I need to describe the Ugaritic alphabetic order. How can I do? In advance, thank you very much. 回答1: Saxon allows you to define your own collation in its configuration file, you basically have to set up a configuration file