XSLT is a transformation language for XML designed to transform structured documents into other formats (such as XML, HTML, and plain text). Questions should use the xslt-1.0, xslt-2.0, or xslt-3.0 tag as appropriate.
0
votes
1answer
3 views
How to apply xml-stylesheet to JDOM2 Document
Suppose you have built your XML document using JDOM2 library. What is the API for adding xml-stylesheet to get something like:
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet ...
0
votes
1answer
11 views
XSLT insert subset of source
I am having trouble with a XSLT: Need to simply copy-of the children of a source node into the result structure.
<source>
<sub1>
<id>val</id>
...
0
votes
1answer
14 views
System cannot find DTD referenced by XSL
I have a webapplication which uses XSLT transformation (Java 6). The XSL file (basic.xsl) references a DOCTYPE DTD, like so:
Basic.xsl
<!DOCTYPE stylesheet SYSTEM "MyXslt.dtd">
When I hit the ...
1
vote
1answer
11 views
How to keep text formating in a call to a template in XSL?
I have the following code who calls a template :
<xsl:call-template name="LigneDonnee">
<xsl:with-param name="text">Les émissions de CO<fo:inline ...
0
votes
1answer
14 views
Can I use XSLT to make separate output files(like xhtml) from a single XML file?
I'm new to XML with experience with css. I have a single XML file that I am trying to style for the web. The file can be kind of complex so I would like to display it in separate pages so users can ...
0
votes
0answers
10 views
perform XSLT Transform in intelliJ on files with other extension (e.g. DITA, HTML)
As said in title, I want to be able to do XML transformation with XSLT 2.0 in intelliJ.
I know IntelliJ can do transformation, but it only recognize .xml files.
I want to transform (in essence) XML ...
1
vote
1answer
17 views
lxml: Converting XML to HTML through XSLT and get HtmlElements
I have data that comes as an XML file. I have also been provided an XSLT to transform the XML to HTML. I can use lxml to perform the conversion, however, I want to alter some of the HTML tags after ...
0
votes
1answer
25 views
XML Key/Value manipulation using XSLT
I have data like this -
<item>
<name>Bob</name>
<fav_food>pizza</fav_food>
<key>{Salary}</key>
<value>1000</value>
</item>
...
0
votes
1answer
13 views
Applying a XSLT on multiple files as if they were merged
I have a question regarding the capabilities of xslt. I have a bunch of different xml files that all share a common xslt transformation which converts them to html. However, just applying the ...
0
votes
1answer
8 views
Using XSLT to transform ReqIF to UML
I'm trying to transform one XML document (REQ-IF) into another XML document (UML-Class-Diagram document) using XSLT.
My Problem now is the following:
REQ-IF provides datatypes as:
<Datatypes>
...
0
votes
0answers
17 views
Grouping in Mule to write to different files
I'm using MuleStudio to pull data from a database using JDBC. I'd like to write to different XML files depending on the records. Is there any way to use an aggregator to do this?
My data looks like ...
0
votes
0answers
6 views
XSL FO Docbook content left margin
I'm using Docbook 5 (docbook-xsl-ns), generating PDF with Apache FOP and I would like to move all text to the left.
How can I do it?
Source XML is:
<section>
...
0
votes
1answer
19 views
XSLT transform single attribute to element
I am trying to transform single attribute to an element.
The XSL I use is :
<xsl:template match="TextView/@*">
<xsl:element name="{name()}">
<xsl:value-of select="."/>
...
0
votes
1answer
15 views
How to convert a Document-Fragment to string content in JavaScript?
I am doing XSLT transformation in the Safari browser using Javascript.
The final output of my transformation is a document-fragment object whose content is as below
<chart>
<dataset> ...
0
votes
0answers
40 views
xslt empty tag check
I have the following structure:
<?xml version="1.0" encoding="UTF-8"?>
<Legs>
<Leg>
<LegNo>1</LegNo>
<RaceInfo>
<RaceNo>1</RaceNo>
...
0
votes
0answers
15 views
Externalize XSL stylesheets for generating excel
I am trying to generate a excel sheet from a xml file by applying xsl transforms.My problem is that I want to define all the tags in an external file instead of inside the xsl file.Is there any way ...
1
vote
1answer
22 views
Select only the first element from a list matching on attribute value
I want to be able to select the first XML element from a set which match on attribute values. To explain more, suppose we have the following XML:
<events>
<event date="2013-06-17">
...
0
votes
2answers
26 views
XSLT not encoding double byte characters
I'm working on a viewer to display xml log files as html using xslt. Everything is going fine exception my localization. The resulting HTML file has a 'ó' where some double byte characters should be. ...
0
votes
1answer
41 views
Aggregate by certain characteristic in Mule using XSLT
I'm using Mule to pull info from a database and format it like this -
<item>
<id>1</id>
<group_id>1</group_id>
<color>blue</color>
...
0
votes
1answer
13 views
Transform encoded XML element using XSLT
XML File
<article>
<paragraph>
Stack Overflow is a question and answer site for
<b>professional</b> and enthusiast programmers.
...
1
vote
2answers
31 views
XSL 2.0 Transform XML files while preserving folder structure
I have the following XSL to transform a bunch of XML files from one format to another.
The transformation is working fine though I have two issues unresolved so far:
1) First when transforming the ...
0
votes
1answer
27 views
xslt sort and sum of nodes basing on the sort ..?
<fo:block start-indent="5mm">
<xsl:for-each select="//policyResult[not(AgentNumber=preceding-sibling::policyResult/AgentNumber)]" >
<xsl:variable ...
1
vote
3answers
31 views
How to sum different fields in XSL when some might be null?
I have the following XSL :
<xsl:value-of select='translate(format-number(
Gaz/Baf/CH4
+ Gaz/Std/CH4
+ Gaz/Bsa/CH4
+ Gaz/Bbs/CH4
+ Gaz/Bhf/CH4
+ ...
0
votes
2answers
17 views
How to perform recursive delete in xslt at last elements of string
In one of my xml message i have a particular tag in which some(unknown) of last positions are filled with a particular character(/).But during XSLT i want to remove this character and generate another ...
0
votes
1answer
17 views
Calling Java Function from XSLT gives “Could not compile stylesheet”
I've gone through all the post of similar issues, but couldn't resolve my problem. I've XSLT as shown below:
XSLT:
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0"
...
0
votes
2answers
29 views
Parsing nested tags through XSLT
I have a XML file like this -
<item>
<item>
<tag>value</tag>
<tag2>value</tag2>
</item>
</item>
I'd like to extract out the ...
0
votes
3answers
25 views
XSLT - xsl choose
I have a problem i need to match two parameters in xsl choose clause, is there a way to achieving this?
for example: xsl:when test= i need to check two parameters, so then i can check for the
same ...
0
votes
1answer
48 views
Transforming xml to xml using XSLT
I am very much beginner in XSLT. I am trying to transform this XML :
<A>
<B>
<C>
<A id="1">
<I/><T/>
</A>
...
0
votes
1answer
23 views
xsl fill table by column
I need to do something like that
this is my xml:
<TSRslt>
<TSExpectedResult Expected = "result : 42.7400131226"></TSExpectedResult>
<TSActual Actual = "result : 42.7400131226" ...
-1
votes
1answer
22 views
How add id with XSLT
i have a file xml and i want convert that to html & i want add ID to my tag html with value of tags for example :
<Root>
<row>
<WID>10</WID>
...
-1
votes
2answers
23 views
How to set attribute in XML using xslt?
For example, I want to add attribute to this node:
<Party>
So it will look like:
<Party role="this should be set using xpath">
Attribute value has to be get from xpath
This will ...
1
vote
2answers
23 views
Getting the Pre-mature End of file error
This is my XSL:
<?xml version="1.0" encoding="iso-8859-1"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.abc.org/1999/XSL/Transform">
<xsl:key name="effectLookup"
...
1
vote
1answer
31 views
why id() in my xslt does not work?
Hi first excuse my english ;D
i've the following problem:
XML
<?xml version="1.0" encoding="utf-8" ?>
<HYDRO_P xmlns="http://www.hydro.ch" ...
0
votes
2answers
39 views
Combine XML element nodes through xslt transformation
I need to transform a XML where transformation rules should be applied only for certain elements and rest should be copied same as it is.
Below are source and expected xml blocks.
<Object ...
0
votes
0answers
18 views
Read XML data from external file and transform it using XSLT in javascript / jQuery
I have this requirement in my purely client-side application -- i.e its purely HTML,CSS,JS/jQuery and no server side code / ASP or C#
1> XML data is stored in external files like ColumnViewData.XML ...
0
votes
1answer
26 views
Couldn't get the value to the xslt variable
I have a stored procedure which returns item names as xml.I use this in xslt code to return the names.and I want to get the names to a xslt variable.I tried my code like
<xsl:variable name="Item" ...
1
vote
1answer
21 views
In XSLT, how do I get a character's hex code as literal text?
I'm finding all sorts of conversions, but I'm trying to get the actual string of characters that make up a found character's hex string. So, if the XSLT
<xsl:analyze-string select="Message" ...
1
vote
1answer
23 views
pros and cons of saving XSL to file vs. db
If I had a dynamically generated XSL document and needed to persist it, would there be any pros or cons to writing it to a file or saving it in a DB? Feels like a coin toss at the moment (although db ...
0
votes
1answer
9 views
XSL node selection by attribute value
I am having some problem with the following xsl command:
<xsl:value-of select="./a/b/c[@code='$codeVal']" />
codeVal is a variable which holds the value of another attribute from some other ...
0
votes
1answer
17 views
XSLFO overlay image
I'm using ApacheFOP to create a pdf which has multiple pages of content and a watermark (semi-transparent) on every page. I'm struggling quite a bit with XSLFO and got a proof of concept working using ...
0
votes
1answer
36 views
Change flat XML structure
My client always send me a flat XML file as shown below:
<Root>
<ROW>
<KIND>A</KIND>
<DATA>Produc 1</DATA>
<DATA>Details</DATA>
...
0
votes
2answers
27 views
XSLT issue with default namespace in XML
This is hairdressing stuff! :)
What will it take to get those two node values out from the following XML doc?
<?xml version="1.0" encoding="utf-8"?>
<AlarmSummaryMessage
...
0
votes
0answers
8 views
getMedia returns empty string in umbraco
i am making a website in umbraco. In this i am rendering image using umbraco.library.getMedia method. Here i am facing a very strange behaviour of umbraco. Sometimes images get rendered and some times ...
0
votes
2answers
26 views
Include Inline JavaScript with Curly Brackets {} in XSL
I am attempting to transform XML to HTML via an XSL file. Unfortunately, it does not allow me to use JavaScript curly Brackets {}. The following is a trivial example, but my actual code is much ...
0
votes
1answer
37 views
Parsing XML through XSLT Transforms
I have some XML in this format
<items>
<item>
<float>0.75</float>
<string>NAME</string>
<string>Bob</string>
...
0
votes
0answers
13 views
Asp.net XSLT and Enity Framework
I am new to this or may be i am dumb .Please give me some way to achieve this .I have a table place holder to which output from a service need to bind to XSLT.
The return from a service is as a ...
0
votes
3answers
25 views
XSLT - Iterating through inconsistent structures
If we have the following XML structure:
<Tree>
<Apple>
<Size>6</Size>
</Apple>
<Apple>
<Size>4</Size>
</Apple>
<Apple>
...
0
votes
0answers
16 views
SharePoint Designer XSLT - Different values for Drop-down list
I am trying to host a SharePoint list as an aspx page.
Requirement is to create multiple rows for insertion. There are two drop-down field in the list.
Issue:
1. For the first row insert, the drop ...
0
votes
0answers
22 views
Is it possible to get a running total to display in XSLT/XSL FO?
I am trying to format a report and I have tables that will span multiple pages with various items/fees, and what i would like to do ideally is to display a running total for each page in the table ...
0
votes
0answers
13 views
Transform an element with attributes to element names in a 2 level structure?
I have an XML Structure that is output by Microsoft Reporting Services the structure has Attributes that I need to transform into elements.
Here is an example of the XML to Transform
<Report>
...