Hi
I have the following xml to be transformed. But I don't how to get the primary driver tag value in the transformed xml. Primary driver should be based on the driver nodes position. Can somebody help me?
<drivers>
<driver>
<first_name>Doug</first_name>
<last_name>Harry</last_name>
<vehicles>
<vehicle>
...
I know it is so simple to some of you.
All I want to do is look through an xml doc and print out the xml entries that contain specific string fragments. The string value is passed to the xslt and the xml doc is looked at and if a word begins with the string expression it displays it.
What I have errors with the following message...
...
Hi I am using xslt to show the links on my webpart and i have added plus image next to my link.But I would like to add some space between them. I have added ,but this is not really working. Am i missing anything here? Please find my code below.
Thanks.
<xsl:choose>
<!-- do _self -->
<xsl:when test="contains(Link,'x...
How can I dynamically specify the href value in the line
<?xml-stylesheet type="text/xsl" href="first.xsl"?>
in an xml?
I would like to substitute "first.xsl" dynamically.
Thanks for your help.
================== Apologies for messing this up/making it difficult for you to help ====
My XML is:
<?xml version="1.0" encoding="utf-8"...
I just learned about XSL and XSLT a few days ago and now I'm trying to put it to work based on a question I had earlier today (want to have formated XML displayed on my website).
Here is the code I'm trying (in a View):
XDocument xmlInput = XDocument.Parse(item.Action);
XDocument htmlOutput = new XDocument();
using (System.Xml.XmlWrit...
More specifically, is there a somewhat easy streaming solution?
...
I am looking to offload some processing to the client via client side XSLT. If I do this will my current JavaScript and jQuery still work?
...
The examples at
http://en.wikipedia.org/wiki/XSLT
or
http://www.w3schools.com/xsl/tryxslt.asp?xmlfile=cdcatalog&xsltfile=cdcatalog
seem to be independent XML and XSLT files. Don't they have to be linked? Or do you somehow put them into a same file? Otherwise, how does one file know how to suck in data from the other file?
...
I want to use a combination of xml & xslt as a templating system. The question that I want answered is: can xslt and PHP communicate with each other (i.e share variables)?
...
My XML looks like
<xml version="1.0" standalone="no">
<Alerts AlertsName="">
<Alert UserId="13" OwnerId="13" OwnerName="jasprice" OwnerEmail="[email protected]" Scope="I">
<Assets>
<Asset>
<AssetTaxonamy>
<AssetTopics>
<AssetTopic Type="Global business">Globalisation</AssetTopic>
</AssetTopics>
</AssetTaxonamy>
<Asse...
Using the below XML, I need to figure out which person worked more hours in each site. For instance in the below XML, person 1 worked 8 hours in site 1 but person 2 worked only 6 hours. So result should contain person 1 and site 1 in transformed XML. If the hours are equal, select first person.
EDIT: I want this to be implemented using...
Hi!
I have two problems with the below code that I need help fixing:
1) It doesn't include the root node when returning results from the XPath expression. (I've tried a couple things, but it messes up the results even more..)
2) I need help fixing the formatting of the results. I need the same nodes with the same attributes to be list...
This question is related to this post http://stackoverflow.com/questions/3461728/find-maximum-value-of-all-child-elements-and-get-its-parent-element-in-xslt. I asked my question incorrectly. Actually I need output little different. I need to match site node id with worksite node and find out the person who worked more hours for that site...
So I have an input file that uses my company's namespace in the default namespace (xmlns="companyURL") but I want my output file to use something other than the default namespace (xmlns:cmp="companyURL"). So I construct my file using the cmp namespace, but then I want to copy some of the inner elements:
<xsl:element name="cmp:container"...
I have an XML list of "devices".
<devices>
<device>NOKIA-43</device>
<device>HTC-7</device>
<device>SAMSUNG-376</device>
<devices>
Using XSLT, I want to retrieve the first "HTC*" device if there is one, or the first device if there are no HTC devices.
What XSLT code would do this?
Thank you!
...
say, if there is a file that's call data.xml, and a file that is format.xsl (or is it format.xml ?), which is to transform the XML data and format it as well using CSS, then which browser can display it? Which file should be opened? (the .xsl or the .xml?)
Actually I saw in another example that the XSLT file's first line is to href="f...
It looks like if the data files fetched from data source already contain
<?xml version="1.0" encoding="ISO-8859-1"?>
<catalog>
<cd>
<title>Empire Burlesque</title>
...
then the correct way to make the data displayable on a browser is to create a .xsl file, and then make the .xml file contain one more line (the second line below):
...
I just learn of ways to use XML data file and XSLT to create a webpage (transform from XML to HTML or XHTML). But I have never seen a webpage that has the source code of XML with a link to an XSLT file. Is it not a good solution?
...
Hi.
I have a dateTime variable, and I want to convert it to a decimal value of epoch.
How can this be done?
I tried using:
seconds-from-duration($time, xs:dateTime('1970-01-01T00:00:00'))
but it just returns 0.
Please advice.
Thanks.
...
If I have an XML file that includes
<param name="foo" value="5000" >foo is a way of making pasta sauce</param>
<param name="bar" value="3000" >bar is controlling the beer taps</param>
and I want to use XSLT to process this into an HTML file, with the name and value attributes and the text as a description, how can I get the XML node t...