xslt « xslt « Java XML Q&A

Home
Java XML Q&A
1.convert
2.Development
3.document
4.dom
5.dom4j
6.dtd
7.element
8.jaxb
9.jaxp
10.jdom
11.jsoup
12.namespace
13.Node
14.parse
15.parser
16.pdf
17.sax
18.schema
19.stax
20.tag
21.transform
22.Validation
23.xalan
24.xmlbeans
25.xpath
26.xsd
27.xslt
28.xstream
Java XML Q&A » xslt » xslt 

1. What xml/xslt library(ies) currently work well for java?    stackoverflow.com

I need to apply some xml templates to various streams of xml data (and files, on occasion) and there seem to be a large number of xml libraries for java out ...

2. How do I generate RTF from Java?    stackoverflow.com

I work on a web-based tool where we offer customized prints. Currently we build an XML structure with Java, feed it to the XMLmind XSL-FO Converter along with customized XSL-FO, ...

3. How do I pass an error message generated by xslt to java application caller    stackoverflow.com

I use a java application to call a xslt to do a xml transformation. The xslt file will generate a message and terminate the process if some condition happens. However, my ...

4. Is it possible to transform javabeans with XSLT and JXPath?    stackoverflow.com

Suppose I have a vanilla javabean:

class Person {
  String firstName;
  String lastName;
  ...
}
Now suppose I want to transform this into another javabean:
class Human {
  String name;
  ...

5. Why choose an XSL-transformation?    stackoverflow.com

For a current project the decision has to be made whether to use XML and an XSL-transformation to produce HTML or to directly use HTML-templates. I'd be interested in arguments for or ...

6. Does the Java URIResolver concept exist in C# and .NET?    stackoverflow.com

In the Java XML transformation package, there is a concept known as a URIResolver, which is "An object that implements this interface that can be called by the processor ...

7. java xslt tutorial    stackoverflow.com

Can any one suggest good XSLT with java tutorials?

8. Dynamic xml filtering and transform (in Java)    stackoverflow.com

I have an XML file that looks like

<?xml version='1.0' encoding='UTF-8'?>
   <root>
      <node name="foo1" value="bar1" />
      <node name="foo2" value="bar2" />
 ...

9. Using Java to change xml to html    stackoverflow.com

I am using java code to create a html document. I have an xsl stylesheet and some xml that I want to create the html from. I am using the TransformerFactory method ...

10. Java, xml, XSLT: Prevent DTD-Validation    stackoverflow.com

I use the Java (6) XML-Api to apply a xslt transformation on a html-document from the web. This document is wellformed xhtml and so contains a valid DTD-Spec (<!DOCTYPE html PUBLIC ...

11. How to use an incremented counter to provide a unique id in XSLT?    stackoverflow.com

I am using XSLT to convert a very large XML document into (X)HTML. For some of the tags I am converting them to a <div>. I would like to be able ...

12. How to edit XML with XSL?    stackoverflow.com

I'm writing a dummy "MyAgenda" application in Java which has to allow maintenance of the XML file that stores the data. Say I have a XML file like:

<myagenda>
  <contact>
   ...

13. How to call XSL template from java code?    stackoverflow.com

How to call XSL template from java code ? Please note that, I don't need to know how to transform xml docuemnt by XSL in Java. What I need exactly is that, I ...

14. Debugging by outputting the full XML of a variable in xslt using xml:message    stackoverflow.com

I have a variable called $statuses. I want to output the full xml rather than just the values in the nodes so I tried to do the following:-

<xsl:message>Contents of the nodeset_statuses:-
  ...

15. Error accessing w3.org when applying a XSLT    stackoverflow.com

I'm applying a xslt to a HTML file (already filtered and tidied to make it parseable as XML). My code looks like this:

TransformerFactory transformerFactory = TransformerFactory.newInstance();
this.xslt = transformerFactory.newTransformer(xsltSource);
xslt.transform(sanitizedXHTML, result);
However, I receive error ...

16. Getting a specific value from xml using Digester and XSLT transform to filter out    stackoverflow.com

I am processing an xml file using apache.commons.digester The xml is, for instance, structured as < Files > < File Name="ABC.EXE" Version="1.0" Size="3954174" > < File Name="XYZ.EXE" Version="2.0" Size="11833856" > < File Name="RST.exe" Version="3.0" Size="32768" > < ...

17. Is there a way to seek a specific location in an xml by knowing the index relative to the text nodes in java?    stackoverflow.com

I have a xml document. I know the index where i need to insert the new node. The index that i have is the position considering only the text nodes and ...

18. What processor is javax.xml.transform Using?    stackoverflow.com

I've implented a simple webapp that transforms XML based on an XSTL stylesheet. It works fine on all the Windows servers I've deployed it on (to Tomcat), but on all ...

19. XSLT parameter not replaced    stackoverflow.com

Could someone advise me what's wrong with the XSLT transformation below? I have stripped it down to a minimum. Basically, I would like to have a parameter "title" replaced, but I cannot ...

20. Xslt external parameter    stackoverflow.com

In my server side

    TransformerFactory tfactory = TransformerFactory.newInstance();
Transformer transformer = tfactory.newTransformer( 
             ...

21. Apply XSLT on XML to get Formatted (colour) Output    stackoverflow.com

How can I apply XSLT on following XML so string between ~ and $ becomes Red in output. The following XSLT work when you have only one string which contains ~ ...

22. XML to XLS using java    stackoverflow.com

How can I map the metadata to data. For example I only want LastName and Email from the xml file into the xls file. How can I select LastName and email ...

23. Java code generator from XSLT    stackoverflow.com

Is there any tool that can generate java code from XSLT? UPD I want to generate java source or byte code, which does the similar transformation, as the XSLT does. I want to ...

24. Write at the end of an xml    stackoverflow.com

i have multiple Xml files, in a <List> Files . What i want is to transform those xml into one Xml with an Xsl :

<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0"
  ...

25. XSLT Transform with Character 8221    stackoverflow.com

I'm transforming an XML document using javax.xml.transform.Transformer and XSLT. The document contains the characters “ and ” (Java Integer Code 8220 and 8221). These are not the normal quotation marks. When I ...

26. Interesting Java code generation issue using XSLT    stackoverflow.com

I am in the process of writing a code generation XSL and have a sticky issue with which I need some expert help. The XML defines a messaging object and its members. ...

27. How to apply xsl to xml in Java    stackoverflow.com

This is problaby been asked a bunch of times, but I didn't really find what I was looking for exactly. I don't normally code in Java, but in C# so I am ...

28. XSLT not calling method belonging to Java parent class: ClassNotFoundException & NoClassDefFoundError    stackoverflow.com

I am trying to make a call to a method, let's say getFullName() within an XSL stylesheet. The method belongs to a class Person, which is a superclass of Student. I ...

29. XSLT Problem Using Muenchian Method of Grouping    stackoverflow.com

I'm having a very odd problem with grouping a set of nodes in a document and getting a unique list based on a set of contained values. Given the following XML:

<Person>
  ...

30. xslt could not transform if there is german character    stackoverflow.com

I am working with xslt version 1.0 and I have a problem about german characters. If there is any German character in element data in xml, xslt could not transform anything ...

31. XSL Sort for XML    stackoverflow.com

Please find the input and output xml files. The XML is sorted on "Code" node ( sorted on CodeValue). INPUT XML

<?xml version="1.0" encoding="UTF-8"?>
<Service>
    <Account>
      ...

32. XSLT to generate sequential numbers which can be reset    stackoverflow.com

<?xml version="1.0" encoding="UTF-8" ?>
<FMPXMLRESULT xmlns="http://www.filemaker.com/fmpxmlresult">
    <ERRORCODE>0</ERRORCODE>
    <PRODUCT BUILD="01-25-2011" NAME="FileMaker" VERSION="Pro 11.0v3"/>
    <DATABASE DATEFORMAT="M/d/yyyy" LAYOUT="Export to Ledes" NAME="StateFarmLedes1998b.fp7" RECORDS="27" TIMEFORMAT="h:mm:ss a"/>
   ...

33. exclude-result-prefixes="xmlns"    stackoverflow.com

In .net, the following xslt is right.

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main"
exclude-result-prefixes="table xmlns">
but in java, if I use saxon,
exclude-result-prefixes="xmlns"
will generate the following error: Error at xsl:stylesheet on line 52 of worksheets.xsl: XTSE0165: Namespace ...

34. How do I allow/deny specific java method call from an XSL in Java?    stackoverflow.com

Main goal: I would like to control which classes and or methods that are allowed to be called when parsing an XSL-file via Java. Using a TransformerFactory:

TransformerFactory factory = TransformerFactory.newInstance();
StreamSource xslStream = ...

35. Java, CData and multiple xslt transformations    stackoverflow.com

I've read/googled a lot on xslt and CDATA. I have no control over the original data (in the database). Here is my problem, as the data flows:
A) The xslt file (when loaded by ...

36. Execute XSLT Transform from Java with parameter    stackoverflow.com

I am executing an XSLT transform from within my java web application with no problems, as follows:

Transformer transformer = TransformerFactory.newInstance().newTransformer(xslSource);
transformer.transform(xmlInput, xmlOutput);
In my XSLT transform I am now adding a call to ...

37. Alternative to XSLT?    stackoverflow.com

on my project I have a huuuuge XSLT used to convert some XML files to HTML. The problem is that this file is growing up day by day, it's hard to read, ...

38. How to generate full List and selected Details from XML using XSLT?    stackoverflow.com

I have all the data in XML files, well tagged. The data is of resumes, 1000s of them. I have to build a front end in Java, in which I will display ...

39. How to invoke a method on an existing java object in xsl?    stackoverflow.com

I'm working on ESB SOA 10g and I want to get the time and date from Java. I wanna use Oracle namespace for my project. I managed to create date and ...

40. Replacing the XML Node text using XSLT and Java?    stackoverflow.com

XML file -

<Remarks>
 <Remark>
 <Cid>2009-1</Cid>
 <Date>3-11-2011 2:55:0</Date>
 <Title>Book</Title>
 <Comment>XXX</Comment>
 </Remark>
 <Remark>
 <Cid>2009-2</Cid>
 <Date>3-12-2011 2:55:0</Date>
 <Title>Song</Title>
 <Comment>XXX</Comment>
 </Remark>
</Remarks>
I want to replace the text of <Comment> for particular <Cid>. For example; for Cid ...

41. Replace xmlns attribute of root node using xslt    stackoverflow.com

I have xml like below

<rnp xmsns="v1">
  <ele1 line="1">
    <ele2></ele2>
  </ele1>
</rnp>
I want to change it to
<rnp xmsns="v2">
  <ele1 line="1">
    <ele2></ele2>
  </ele1>
</rnp>
using ...

42. Tool to get data from dita xmls    stackoverflow.com

Please suggests to best open source tool for to get data from dita xmls.

43. Advanced XSLT processing    coderanch.com

I'm not sure if my question belongs here though it is an advanced question. Feel free to move it to XML land if necessary. Anyhow, I'm attempting the next stage of a rather complicated project involving XML transforms. The big idea is this. I take an object (any arbitray object), convert it to XML and use a pre-authored XML template (not ...

45. xslt sorting    coderanch.com

47. web start and xslt processing    forums.oracle.com

Hi Forum, I'm trying to deploy an existing app using java web start, and I've noticed something I can't explain: the app does a little XSLT processing, and in the web start version, any template I have that includes is ignored. Remove the s, and the template is processed. Obviously, this doesn't happen when the app is started from a ...

48. Create XML with XSLT help    forums.oracle.com

Hi, I would like to create an XML which map to XSLT. The data that I have to produce XML is just a very small data, for example ArrayList myList. So I need to create an XML from myList. I'm not sure what technology solution I should choose. But it'll be great if I can produce my XML map with my ...

49. XSLT Processing from DOMSource not working    forums.oracle.com

50. xslt cannot compile stylesheet    forums.oracle.com

51. Pass object to xslt stylesheet and invoke its methods    forums.oracle.com

I'd like to pass an external created object to a xslt stylesheet to dynamically modify the xslt file at run time. After searching around for weeks, I'm really desperate. I used Xalan transformer's method setParameter(name, obj) to initialize a variable in xslt file with this object. Then the object's method was invoked. The class that I want to invoke the method: ...

52. How to call java code from xslt.    forums.oracle.com

53. How to attach xslt????    forums.oracle.com

54. anyone can check my xslt code ?    forums.oracle.com

i'm not sure whether it'll be the case, but you migt be right. i posted my java source code here: public class FileDownload { public static void download(String address, String localFileName){ OutputStream out = null; URLConnection conn = null; InputStream in = null; StringBuffer xmlContentBuffer = new StringBuffer(); String temp = new String(); String xmlContent; try { URL url = new ...

55. Regarding special characters in XSLT    forums.oracle.com

java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.