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
23
votes
6 answers

NAMESPACE_ERR: An attempt is made to create or change an object in a way which is incorrect with regard to namespaces

Trying to retrieve the SOAP body from a SOAP response, but getting this error: NAMESPACE_ERR: An attempt is made to create or change an object in a way which is incorrect with regard to namespaces. Document doc =…
Java Guy
  • 3,391
  • 14
  • 49
  • 55
16
votes
5 answers

How do I make XSL transformation indent the output XML?

I'm using xalan with the following xsl header:
Vincent
  • 2,712
  • 5
  • 24
  • 27
13
votes
7 answers

TransformerFactory and Xalan Dependency Conflict

I have the following code: javax.xml.transform.TransformerFactory factory = TransformerFactory.newInstance(); factory.setAttribute(XMLConstants.ACCESS_EXTERNAL_DTD, ""); javax.xml.transform.Transformer transformer = factory.newTransformer(); This…
Velvet Carrot
  • 281
  • 1
  • 3
  • 7
12
votes
3 answers

Is it possible to avoid using xalan TransformerFactory?

I have the following code: final TransformerFactory factory = TransformerFactory.newInstance(); factory.setAttribute(XMLConstants.ACCESS_EXTERNAL_DTD, ""); The second line works fine in modern JDKs (I tried 1.8) with a default TransformerFactory.…
Roman Puchkovskiy
  • 11,415
  • 5
  • 36
  • 72
12
votes
2 answers

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: 2
David
  • 910
  • 1
  • 12
  • 22
11
votes
2 answers

Does setting FEATURE_SECURE_PROCESSING in transformerFactory update other security features as well?

In jdk1.6, while I am setting transformerFactory.setFeature(XMLConstants.ACCESS_EXTERNAL_DTD, false) I am facing the following error: javax.xml.transform.TransformerConfigurationException: Cannot set the feature…
Karthick M Mayan
  • 121
  • 1
  • 1
  • 8
11
votes
3 answers

Saxon 9 XSLT transformer vs Xalan 2.7

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…
Aditya
  • 159
  • 1
  • 1
  • 10
9
votes
1 answer

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…
Roalt
  • 8,330
  • 7
  • 41
  • 53
8
votes
2 answers

XSLT document() : Is it slower when calling it multiple times?

UPDATE 17.Jul.2013: XALAN 2.7 does not cache document() calls within a request. So it is crucial to store each needed document in a variable in the XSL. I have searched for quite a while and didn't find concrete answers to my simple question: Which…
basZero
  • 4,129
  • 9
  • 51
  • 89
8
votes
3 answers

is TransformerFactoryImpl of Xalan is thread safe?

Is the class org.apache.xalan.processor.TransformerFactoryImpl thread safe? Or do I have to a keep local copy for each thread?
Asaf Mesika
  • 1,643
  • 4
  • 20
  • 33
8
votes
2 answers

Xerces2 XML parser and Xalan XSLT processor -- state and replacement?

It is year 2018. What is the state of the Xerces2 XML parser and Xalan XSLT processor libraries for Java? Their last releases appear to be 2.11.0 in 2013 and 2.7.2 in 2014 respectively. Are they still maintained? Are they so perfect that they do…
wilx
  • 17,697
  • 6
  • 59
  • 114
8
votes
5 answers

passing xml nodes/documents/fragments as parameters to xslt

I tried to pass a w3c.dom.Document, Element and NodeList as parameters to a xslt transform. I want to be able to process it within the xslt:
mkm
  • 1,545
  • 1
  • 14
  • 21
8
votes
2 answers

Transforming a StAX Source in Java

I have some code like: XMLInputFactory xif = XMLInputFactory.newInstance() TransformerFactory tf = TransformerFactory.newInstance("org.apache.xalan.processor.TransformerFactoryImpl", null) Transformer t = tf.newTransformer() DOMResult result = new…
arlogb
  • 681
  • 1
  • 9
  • 19
8
votes
2 answers

Using Xalan alongside Saxon

I use Xalan in my application, but need to use Saxon with a reference implementation to generate test output to compare with. I want to use them both during unit tests. However, as soon as I add an dependency on Saxon in the project .pom, the…
Danik
  • 404
  • 3
  • 14
7
votes
3 answers

Why is Apache Xerces/Xalan adding additional carriage returns to my serialized output?

I'm using Apache Xerces 2.11.0 and Apache Xalan 2.7.1 and I'm having problems with additional carriage return characters in the serialized XML. I have this (pseudo) code: String myString = ...; Document doc = ...; Element item =…
Daniel Rikowski
  • 71,375
  • 57
  • 251
  • 329
1
2 3
27 28