I have a series of XSL 2.0 stylesheets that feed into each other, i.e. the output of stylesheet A feeds B feeds C.
What is the most efficient way of doing this? The question rephrased is: how can one efficiently route the output of one transformation into another.
Here's my first attempt:
@Override
public void transform(Source data, ...
hi!
i have to build an XSLT stylesheet that transforms an xml like this:
<message>
<line/>
<silence/>
<dot/><line/><line/>
<silence/>
<dot/>
<silence/>
<line/><dot/><dot/><dot/>
</message>
into something like this:
<complexMessage>
<word code="-"/>
<word code=".--"/>
<word code="."/>
<word code="-..."/>
</compl...
I'm trying to obtain a list of information for the root element of an xml document using a transformation. The pieces I can't figure out are:
How do I obtain the default namespace url?
How can I obtain a list of every xmlns prefix and its related url?
Here's my xml file:
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="t...
Folks,
I have got to work with a new team and design the required skills for each of them, I want to put a compressed training plan for one of them to be the Xml Expert in the team, as part of this I put him to read about XPath, XSLT from W3Schools, but what else he needs to know ? or is there a better source ?
...
Hello,
I have the following XML (partial) document :
<export>
<table name="CLIENT">
<row>
<col name="CODE_CLIENT" type="System.String">1000010026</col>
<col name="LIBELLE" type="System.String">Test|</col>
<col name="PROSPECT" type="System.Decimal">1</col>
</row>
<row>
<col name="CODE_CLIENT"...
I have a C# class that is serialized like this:
<oadResults
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns="http://www.tyr.org.uk/standards"
>
<Link>http://www.tyr.org.uk//290/Data.zip</Link>
<ID>3540</ID>
</oadResults>
And I have a XSLT file:
<xsl:stylesheet ...
I have a situation where I need to increase the space between a table and the header on a PDF that has already been transformed from an XSL template.
I need to insert an address in the newly created space. This part is easy enough and I can do that using a stamper and a new table.
However, I am struggling to find a solution to move the...
I have a piece of XML data which I need to transform into WML.
It's something like this:
<root>
<category name="music"/>
<subcategory name="classic"/>
<subcategory name="rock"/>
<subcategory name="Techno"/>
<node type="music" subtype="classic" name="beethoven"/>
<node type="music" subtype="classic" name="chopin"/>
<recor...
I am processing a soap response file and our requirement is add certain data captured during request to the response. I have this xml reponse here and like a add certain data to the header part of it using a XSLT file. Please advice.
Actual reponse
<soap:Envelope xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wsse...
Take this XML.
Is there a way for me to transform the contents of the CDATA section with XSLT?
...
I am trying to convert some XML with XSL, to make the output look better and more readable for other users. I have some XML along the lines of:
<G>
<OE>
<example1>Sample 1</example1>
<example2>Sample 2</example2>
<var name="name1">
<integer>1</integer>
</var>
</OE>
</G>
I want to get all the details from it a...
In XSLT, what is the preferred way to keep code DRY when it comes to 'if's?
At the moment I am doing this:
<xsl:if test="select/some/long/path">
<element>
<xsl:value-of select="select/some/long/path" />
</element>
</xsl:if>
I would prefer to only write "select/some/long/path" once.
...
Hi All
I have the following XML source structure:
<turnovers>
<turnover repid="1" amount="500" rate="0.1"/>
<turnover repid="5" amount="600" rate="0.5"/>
<turnover repid="4" amount="400" rate="0.2"/>
<turnover repid="1" amount="700" rate="0.05"/>
<turnover repid="2" amount="100" rate="0.15"/>
<turnover repid="1"...
Hi,
I have a list of figure names and width and height informations in separate xml file,
I need to match the figure name in the source xml file and need to insert the width and height information as a attribute in the source xml file.
here the source xml file..
<graphic name="sample.jpg" align="center"/>
expected output xml file
...
Variations on this question have been posted, but I couldn't find any that address the base case. I thought it would be good to have a canonical answer to the simplest version of the problem. This question assumes xslt 1.0.
I have an XML document that contains mixed nodes, e.g.:
<paragraph>
This is some text that is <bold>bold</b...
I have to make the attribute into single element. Please guide me.
Here my input and requirement.
Input:
<book pagenum="01">
<title pagenum="01">Book title</title>
<chapter pagenum="02">
<chaptertitle pagenum="02">CHAPTER TITLE</chaptertitle>
<section pagenum="03">
<sectiontitle pagenum="03">SECTION TITLE</chaptertitle>
<subsection pa...
Hello.
What I am doing is reading in some xml and using xsl to output it in a table to make it more readable.
So some sample xml:
<example1>
<sample name="aaa">
<help1>Help</help1>
<help2>Me</help2>
</sample>
<sample name="bbb">
<noHelp1>No</noHelp1>
<noHelp2>Help</noHelp2>
</sample>
</example1>
So I have a ...
I have a simple xml file that is a list of attributes (Name/Value pairs):
<?xml version="1.0" encoding="ISO-8859-1"?>
<Attrs>
<Attr N="IsValid" V="true" />
<Attr N="ID" V="99099" />
</Attrs>
I want to create an XSLT file that outputs the values but I cant seem to get it to return the Value for the attribute
Here is my xslt:
...
I have an xsl where I want to display a default expiry date (now+1 month)
I can display the current date with this (using: xmlns:date="http://exslt.org/dates-and-times" extension-element-prefixes="date")
<xsl:variable name="currentdate" select="date:date()"/>
<!-- add one month to $currentdate-->
<xsl:value-of select="date:format-date(...
Hi there,
Say I have the following XML
<?xml version="1.0" encoding="utf-8"?>
<Person>
<FirstName>Bjorn</FirstName>
<LastName>Ellis-Gowland</LastName>
</Person>
That is 'governed' by the following XSD (XML Schema)
<?xml version="1.0" encoding="utf-8" ?>
<xs:schema elementFormDefault="qualified"
xmlns:xs="http://www.w3.or...