xalan

XSLT XALAN Example

Hi, 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 Wind...

JSP XALAN Examlpe

Hey, What I am is trying to do is the following. Pass two parameters to a URL type doc_id Once they are passed to the JSP via the URL I want to apply a the type template to the doc_id xml. So if the type is 001 then the 001.xsl is applied to doc_id.xml. The output of this I don't want stored in a file but rather directley outputed...

Java/XSLT Problem: Cannot find a matching 1-argument

I get the following error: javax.servlet.ServletException: Cannot find a matching 1-argument function named {http://exslt.org/dynamic}evaluate() at org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:841) at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:774) The top...

Saxon Xalan JSP

I have a JSP which attaches a XSL to an XML document pulled from a database. The application is using the Saxon Parser but my XML needs to use the Xalan one. Can a JSP page override which parser to use? ...

XSLT with Xalan vs. STX with Joost

Where can I find performance metrics (memory/time) for a non-trivial example of using XSLT (with Xalan) compared to using STX (with Joost) ...

How to get the unparsed entity attribute's value from XSLT?

I have a problem with XSLT and unparsed entity in XML. Here is a fictional scenario. First I got an XML file named doc.xml: <?xml version="1.0" encoding="UTF-8" standalone="no"?> <!DOCTYPE document [ <!ELEMENT document (employee)*> <!ELEMENT employee (lastname, firstname)> <!ELEMENT lastname (#PCDATA)> <!ELEMENT firstname (#PCDATA)> <!...

How can I change some existing Java XSLT code using Xalan to use Saxon and TinyTree

I have some existing Java code that does an XSLT transform programmatically - originally using Xalan. I have refactored it to be able to use another (externally configured) TransformerFactory. I have tried using the Saxon (v6.5.3 and v8.7) factory, but do not see any perfromance improvements - if anything Saxon is slower and uses more m...

Default support for xinclude in Java 6?

I see in my application that xinclude inside my parsed XML file does not work within my Java XSLT conversion. However, although I do: DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); factory.setXIncludeAware(true); I'm not specifically setting the transformer factory as System.getProperty("javax.xml.transform.Tr...

Using AXSLT Components in Spring MVC

I while ago I wrote a Java application that processes XML with XSLT using Xalan. Now I'm trying to move towards Spring. I've been having trouble accessing components. As far as I can tell my XML, XSLT and Java objects are correct, but Spring cannot seem to find and reference the components I want to access. ... <axslt:component prefix=...

xsl cdata-section-elements output property with Xalan-J

I'm trying to output a CDATA section in the result of XSLT using Xalan 2.7.1. I have applied this XSL to the XML in a tool and the result contains CDATA. In the method below, no CDATA is in the result and no exception is thrown. I feel like I'm missing something here. test.xml <?xml version="1.0" encoding="UTF-8"?> <parentelem> ...

Xalan XSLT multiple output files?

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 ...

XSLT menu generation problem

Here is a template I call to generate a menu, and it kinda breaks. Using Xalan, I get heap size error, so my guess would be that something in it is horribly broken and unholy. I preset the template for the current portion of the website tree, feeding it the path from the root of the site, the language, the current depht (p-i), and a fil...

HTML entities do not render correctly in browser after XSLT transform

I have the following XML: <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <example> <contactInfo> <id>12319221</id> <name>Jerry P</name> <market> <name>Test</name> <phone>800.555.1010</phone> </market> <agent> <name>Test User</name> <emai...

how to create hyperlinks when transforming xml to xsl-fo using xlst?

I would like to transform any http/s based url inside random text to be automatically tagged with xsl-fo , where the random text might contains one or more http/s based url. So the http/s url is not part of an attribute or the only content of a node, but part of text within a node. For example: the source <misc> <comment>Yada..yada....

XSLT / Xalan : calling apply-templates from within a Java extension

I am using Xalan and Java for extending a stylesheet. (Similar example to what I am doing there : Dictionary example) I struggle to make my tag do an <xsl:apply-templates/>. I wish to have this : <xsl:template match="sometag"> <my-java:tag> <xsl:apply-tempates/> </my-java:tag> </xsl:template> My java class containing...

Search XML files with xalan in Java

Hello, I need to write a java application that does a keyword search within the tags and the actual data from many xml files. From my research online I get the feeling i have to use xalan, but I can't figure out how to use it or what it does. Could somebody point me in the right direction? Thanks ...

How to use a parameter in a xslt as a XPath?

I'd like to add an element to a xml document and I'd like to pass as a parameter the path to the element. sample.xml file: <?xml version="1.0"?> <stuff> <element1> <foo>2</foo> <bar/> </element1> <element2> <subelement/> <bar/> </element2> <element1> <foo/> <bar/> </element1> </stuff> Using: xalan.exe -p my...

Has anyone gotten Xalan to build (against Xerces) with VisualStudio .NET?

I have spent hours trying to get the subversion trunk or 1.10 building with both VS.NET 2008 and 2010, to no avail. I'm currently stuck with many link errors. I've read dozens of threads on this and am quite surprised that two major libraries from Apache would essentially be so fraught with problems when it comes to building. I am using ...

How do I make xsl transformation indent the output?

I'm using xalan with the following xsl header: <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" xmlns:redirect="http://xml.apache.org/xalan/redirect" extension-element-prefixes="redirect" xmlns:xalan="http://xml.apache.org/xalan"&gt; <xsl:output method="text" indent="yes" xalan:indent-amount...

A way to split a huge XML file into smaller xml files with XSL

Hi, I get a huge XML file containing a list of TV broadcasts. And I have to split it up into small files containing all broadcasts for one day only. I managed to to that but have two problems with the xml header and a node being there multiple times. The structure of the XML is the following: <?xml version="1.0" encoding="UTF-8"?> <br...