xalan

Xalan XSLT multiple output files?

旧街凉风 提交于 2019-12-08 02:29:22
问题 I'd just like to know, is it possible to output the processing of a single input XML file to multiple other files using Xalan? I don't necessarily HAVE to do it that way, I know I can use other tools to do it (like Saxon), and/or I could process different files to obtain different outputs. I'd just like to know the options I have to do exactly what I'm asking for with the very tools I'm planning on using. Any reason why I shouldn't use that tool to do this task is also welcome. The context is

jboss 7.1 xalan issue?

落花浮王杯 提交于 2019-12-08 01:30:06
问题 I am attempting to create an Apache Jena based application on JBoss7. Apache Jena uses Xalan 2.11.0 JBoss 7 ships with 2.7.1 When I attempt to call the application I get an exception, the root of which is: org.apache.xerces.impl.dv.DVFactoryException: Schema factory class org.apache.xerces.impl.dv.xs.SchemaDVFactoryImpl does not extend from SchemaDVFactory I suspect this is because of the difference in version. I read through the Module documentation (https://docs.jboss.org/author/display

Get first child node in XSLT using local-name()

梦想的初衷 提交于 2019-12-07 04:26:20
问题 Assume we have this simple xml ... <books> <book> <author/> <title/> </book> <book> <author/> <title/> </book> </books> I'm using this xpath to get the elements of the first book instance. //books[1]/* Returns <author/> <title/> And that works fine, but I have to get it working using local-name(). I've tried the following but none of these work... //*[local-name()='books']/* this returns repeating author and title elements, not good, I only need them from the first child //*[local-name()=

Saxon 9 XSLT transformer vs Xalan 2.7

蹲街弑〆低调 提交于 2019-12-07 02:42:54
问题 I am currently using Xalan 2.7.0 for XSLT transformations over XML, but thinking over to switch to Saxon 9 version for XSLT transformations. So could someone list me the major cons and prons of using Saxon over Xalan . Although i know that Saxon supports XSLT 2.0 and other major changes but instead i would like to know more about personal experiences with Saxon 9 and its prons and cons and other benefits. 回答1: I used Xalan 10 years ago. I have been using Saxon almost exclusively for the last

XALAN register Extension Function like in SAXON

五迷三道 提交于 2019-12-06 13:37:36
问题 i want to transform a XML by XSLT with XALAN. Now i want to use a extension-function, this function have to be added in JAVA source like in SAXON: Method: TransformerFactory tFactory = TransformerFactory.newInstance(); Configuration c = ((net.sf.saxon.TransformerFactoryImpl) tFactory).getConfiguration(); c.registerExtensionFunction(new FooExtension()); FooExtension: public class FooExtension extends ExtensionFunctionDefinition { private static final long serialVersionUID =

jboss 7.1 xalan issue?

寵の児 提交于 2019-12-06 13:08:58
I am attempting to create an Apache Jena based application on JBoss7. Apache Jena uses Xalan 2.11.0 JBoss 7 ships with 2.7.1 When I attempt to call the application I get an exception, the root of which is: org.apache.xerces.impl.dv.DVFactoryException: Schema factory class org.apache.xerces.impl.dv.xs.SchemaDVFactoryImpl does not extend from SchemaDVFactory I suspect this is because of the difference in version. I read through the Module documentation ( https://docs.jboss.org/author/display/MODULES/Introduction ) and attempted to change ot Xalan 2.11.0, but no luck: Jboss just froze on startup.

XSLT Xalan dyn:evaluate example

旧城冷巷雨未停 提交于 2019-12-06 12:13:13
I want yo use the EXSLT - DYN:EVALUATE in a style sheet. I have added the names pace but I don't know where the .xsl file I need to import is. I don't believe I have XALAN installed to point the import to. How would I install this? Once installed and I point it to the .xsl will it pick up the function and apply it? I am running Windows. The XSLT file is included at the top of the XML document. Thanks Pete Xalan has the EXSL dyn:evaluate function built-in, you don't need to import anything in order to use it. You just need to declare the namespace. I'll give a small example: input.xml : <root>

xsl:key not working when looping through nodeset obtained with xalan:nodeset

删除回忆录丶 提交于 2019-12-06 02:42:12
问题 I have found a case where xsl:key seems not to be working. I am using XSLT 1 with Xalan (compiled) and this is what is happening: 1.- This works: key named test1 works fine: <xsl:variable name="promosRTF"> <xsl:copy-of select="promo[@valid='true']"/> </xsl:variable> <xsl:variable name="promos" select="xalan:nodeset($promosRTF)" /> <!-- now the key: when defined and used here it works fine: --> <xsl:key name="test1" match="//promo" use="'anytext'" /> <xsl:for-each select="key('test1','anytext'

Ant <junitreport> fail because of Xalan's (XSLT) secure processing feature

元气小坏坏 提交于 2019-12-06 01:48:40
问题 My junit tests run via ant 1.7 from within my Eclipse environment but the build failes when the junitreport task is performed: BUILD FAILED .../build.xml:222: Errors while applying transformations: javax.xml.transform.TransformerException: java.lang.RuntimeException: Use of the extension function 'xalan://org.apache.tools.ant.util.StringUtils:replace' is not allowed when the secure processing feature is set to true. I tried to figure out how to make the junitreport task disable the secure

Incremental/streaming XSLT transformations?

痞子三分冷 提交于 2019-12-05 23:09:05
I'm normally using the XSLT support in the JDK (JDK 7) for XSLT transformations. Recently I've come across a rather large XML document, and applying XSLT transformations to this (even very basic ones) causes a lot of memory to be used. I've been careful to do all my processing streaming, but it seems the XSLT engine in the JDK (which appears to be a modified Xalan) always builds up a DOM in memory first. Obviously this is not what I want. Now I found out that the Xalan which is available separately (2.7.1 from 2007!) does have an API for doing incremental transformations. So while this does