I have to create one table using XSLT and CSS. The table should look like:
ID FNAME
1 AA
2 BB
My XML is:
<students>
<studentDetails>
<id>1</id>
<fname>AA</fname>
</studentDetails>
<studentDetails>
<id>2</id>
<fname>BB</fname>
</studentDetails>
<students>
And here my XSLT so far:
<xsl:template matc...
I have an xml file which I need to visualize in a pdf file.
I use xslt to do transformations and an svg image in the pdf.
The svg will finally draw some information and also display a tiff image, for which the path and the resolution is in the xml file.
The problem is that the image can have different resolutions which I need to fit int...
I'm working on an application that uses XSLT to transform XML generated by JSP. At the moment no DTD exists to describe the XML format the XSL expects. Does anyone know of a tool that can generate a DTD from a XSL describing the input the XSL is expecting? Is this even feasible?
Result: The accepted answer pointed out that this is in fa...
I have a lots (500ish) xml files from An old ASP and VBscript that was running on an old windows server. The user could click a link to download the requested xml file, or click a link to view how the xml file will look, once its imported into their system...
If clicked to view the output, this opened a popup window were the xml filena...
Hi,
I have a list of items like how its listed below, and I'm trying to get that option selected by default which has a certain tag within the "listing" tag.
<select>
<xsl:attribute name="name"><xsl:value-of select="@id"/>_type</xsl:attribute>
<option><xsl:attribute name="value"><xsl:if test="listing/Chat"><xsl:attribute name="selecte...
I have an XML document that I generate from an Entity Framework object. The generated XML looks like this:
REPOSTED FULL XML
<Task z:Id="i1" xmlns="http://schemas.datacontract.org/2004/07/MCC.DAL" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"
xmlns:z="http://schemas.microsoft.com/2003/10/Serialization/">
<EntityKey z:...
I'm applying an XSLT stylesheet to the following XML file:
<top xmlns="http://www.foo.com/bar">
<elementA />
<elementB />
<contents>
<contentitem>
<id>3</id>
<moretags1 />
<moretags2 />
</contentitem>
<contentitem>
<id>2</id>
...
I have a piece of xml that contains optional non-enumerated elements, so schema validation does not catch invalid values. However, this xml is transformed into a different format after validation and is then handed off to a system that tries to store the information in a database. At this point, some of the values that were optional in...
s0SelectedSite is an attribute of a class or a column of a table.
<xsl:if test="string-length(@s0SelectedSite) > '0'">
<tr>
<td width="50%" bgcolor="#C0C0C0"><font size="2"><b>Selected Site:</b></font></td>
<td><font size="2"> <xsl:apply-templates select="DBE:Attribute [@name='s0SelectedSite']"/></font></td>
</tr>
</xsl:i...
I have a table s0Test1 attached to a class s0Test. The table has 4-5 attributes. I want to display them in HTML. I used:
<xsl:template match="DBE:Object" mode="s0Test">
<table>
<tr>Test1</tr>
<tr>
<td><font size="2"> <xsl:apply-templates select="DBE:Attribute[@name='s0Test1']"/></font></td>
</tr>
</table> ...
I have an XML and an appropriate XSL that I need to provide to a Java application. This Java application is expected to generate a HTML page after XSL transformation. This is not my Java application so I do not know which XSL processor it is using internally.
The problem is that it completely ignores my xsl:output directive; thus, inste...
I have an xml feed and I need to play an mp3 from the feed. I have set up the player
<div class="musicplayer">
<div id="musicplayercontainer060251712481gbakw0201569t"></div>
<script type="text/javascript">
var flashvars = {file:"music/betty.mp3",as:"0"};
var params = {wmode: "transparent"};
var attributes = {};
swfo...
Hello,
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 to do this.
My problem is that when it creates the html file, when you open it you see a blank page but the code is there. The issue is that when the html is created ...
I am using .NET to transform XML from a DataSet to the sitemap format. Here is where I am at right now. As you can see, I create the root element with the correct namespace. I noticed that if I created child nodes, they all got an empty xmls-attribute (<url xmlns="">...</url>), unless I specified the namespace when I create the element i...
Defining a template
xsl:template match="DBE:Object" mode="TestTable"
Delivery Date
Latest Possible Order Date
xsl:apply-templates - select="DBE:Attribute[@name='DeliveryDate']/DBE:Date/>
xsl:apply-templates select="DBE:Attribute[@name='LatestOrderDate']"/>
Now i want to calculate "LatestOrderDate" = "DeliveryDate" - 42...
<module>
<component>
<section>
<ptemplateId root="1.8"/>
<entry>
<observation>
<templateId root="1.24"/>
</observation>
</entry>
</section>
</component>
<component>
<section>
<ptemplateId root="1.10"/>
<entry>
<observation>
<templateId root="1.24"/>
</observation>
...
Hello,
I would like to copy XML using XSLT into JSON.
The JSON result would look like this:
callback( {"xml":"
<?xml version="1.0" encoding="UTF-8"?>
<root>
...
</root>
"})
and my XSLT so far:
<xsl:template match="/">
<xsl:text>callback( {"xml":"</xsl:text>
<xsl:copy-of select="*"/>
<xsl:text>"} )</xsl:text>
<...
I'm using the built-in Java XML Transformer to serialize an XML document into text. I'm having a problem however when I am outputting in HTML mode.
Whenever I insert a head element the built-in transformer decides to insert a META tag with content-type data. I don't want this tag inside my data and I can't seem to find an output paramet...
Suppose a class "test" has an attribute "test1" which itself is a table.
"test1" contains some a1, a2, a3 attributes. I need to display all rows based on the value of an attribute"a1"
<xsl:template name="rowCounter">
<xsl:param name="N" />
<tr>
<xsl:if test="
DBE:Attribute[@name='a1']/
DBE:Object[@Class='test']/
...
Just want to know how to read an attribute of a parent node from a child node in XSLT.
code:
<A>
<b attr1="xx">
<c>
</c>
</b>
</A>
XSLT:
<xsl:template match="c">
<xsl:value-of select="attribute of b node">
</xsl:template>
...