Questions tagged [xalan]

Xalan is an open source XSLT 1.0 processor with implementations in Java and C++.

Xalan is an open source XSLT 1.0 processor with implementations in Java and C++.

409 questions
3
votes
1 answer

How to tell Xalan to escape characters in HTML attributes

The result of the Java code below is What I want is The code is Document doc = DocumentBuilderFactory.newInstance().newDocumentBuilder().newDocument(); Element…
user1206217
3
votes
1 answer

Unexpected behavior of xsl:apply-templates/xsl:with-param with Xalan-J and saxon compared to xsltproc

I'm trying my best to learn how to use XSLT 1.0 from java code but am starting to loose my mind bit by bit slowly over time. I have Xalan-J (both xalan.jar and xsltc.jar with all dependency jars), saxon and jing (the latter two are used elswhere in…
predi
  • 5,528
  • 32
  • 60
3
votes
2 answers

ISO-8859-1 characters treated as UTF-8 in XSLT attributes

The ¬ character (0xAC in ISO-8859-1) works for normal text if I ensure that ISO-8859-1 is always used as the encoding throughout. However, when using it in attributes it is escaped to: %C2%AC. I understand that it needs to be escaped for urls, but…
Matt
  • 7,100
  • 3
  • 28
  • 58
3
votes
2 answers

XSLT: XPath context and document()

I have an XSLT like this:
flyx
  • 35,506
  • 7
  • 89
  • 126
3
votes
1 answer

How do I do a str:replace in XSLT/XPATH 1.0?

In XPATH 2.0 there is a function that allows me to replace a substring in a string with another string. I'd like to do this using xalan. Unfortunately, it doesn't support the EXSLT method str:replace and it only uses XSLT 1.0 stylesheets. …
Jason Thompson
  • 4,643
  • 5
  • 50
  • 74
3
votes
3 answers

How to catch a nested exception in java

I'm using Apache Xalan (v.2.7.1) to translate XML to XHTML in Apache Tomcat (v6.0.32). Sometimes the loading gets cancelled by the client and the following exception is thrown: javax.xml.transform.TransformerException:…
brunnsbe
  • 86
  • 2
  • 7
3
votes
0 answers

com.sun.deploy.net.jarsigningexception could not verify signing in resource: xalan.jar, 2.7.1

Our JNLP client application contains different JAR's. We sign all these JAR's at build-process. Now, we have one Jar which can not be verified, but only under Windows! (xalan-2.7.1.jar) If we run the JNLP under windows, we get this…
Stefan
  • 31
  • 1
  • 3
3
votes
1 answer

java exslt date-time() producing unintended output

While doing xslt transformation the timezone is serialized in a weird way I tried switching implementations between xalan and jaxen but no change was observed. Tried to look into formatting the date manualy but can't seem to find the way to add time…
Lakshay Chhikara
  • 186
  • 2
  • 12
3
votes
2 answers

XSLT processing recursion depth

First of let me state that I have no clue of XSLT at all. I was given a task to investigate some JVM dumps of a Java OutOfMemory exception that occurred during XSLT processing. I have found that the OutOfMemory occurred during recursive XSLT…
finrod
  • 367
  • 2
  • 13
3
votes
1 answer

TransformerConfigurationException: Cannot set the feature for Transformer

i'm getting below error while setting the feature for TransformerFactory. javax.xml.transform.TransformerConfigurationException: Cannot set the feature 'http://apache.org/xml/features/disallow-doctype-decl' on this TransformerFactory. at…
Manjunath H M
  • 818
  • 1
  • 10
  • 25
3
votes
2 answers

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:
jscoot
  • 2,019
  • 3
  • 24
  • 27
3
votes
2 answers

Xerces and Xalan-C for windows

Would like to port Xerces and Xalan to latest Microsofy Visual Studio (2010). For Xerces, all I have to do is download from site Xcerces version 3.1.1. But it is not preintegrated with Xalan-C. only Xalan-C 1.10 and Xerces 2.7 are pre…
3
votes
1 answer

Getting "UTFDataFormatException: encoded string too long" while doing XML transform

I am trying generate an HTML file using XML transform (I have an XSL and XML files as input). I am using the standard API (javax.xml.transform.*) from Java 8 to initialize the transformer: String xslFile = "my_file.xsl"; // Create…
3
votes
4 answers

Read XML, Replace Text and Write to same XML file via Java

Currently I am trying something very simple. I am looking through an XML document for a certain phrase upon which I try to replace it. The problem I am having is that when I read the lines I store each line into a StringBuffer. When I write the it…
Bilzac
  • 555
  • 3
  • 9
  • 23
3
votes
1 answer

Check whether a string is a valid date or not in XSLT

I am having an xml document in which there are some date nodes and I am trying to get their values if the values are valid dates otherwise empty string. XML:
Abhishekh Gupta
  • 6,206
  • 4
  • 18
  • 46