xslt

When is XSLT an appropriate solution for defining XML transforms instead of using a scripting language like Python?

When is XSLT an appropriate solution for defining XML transforms instead of using a scripting language like Python? ...

Display xml feed with xslt

Hi Guys I need to display a xml feed with xslt, the xml feed requires authentication is this possible? How would I get the xml feed into the xslt? ...

XSLT to convert fahrenheit to celsius

Hi, I am new to XSLT and need to know how to convert a fahrenheit value to celsius value. Thanks, ...

How do I render a comma delimited list using xsl:for-each

I am rendering a list of tickers to html via xslt and I would like for the list to be comma deliimited. Assuming I was going to use xsl:for-each... <xsl:for-each select="/Tickers/Ticker"> <xsl:value-of select="TickerSymbol"/>, </xsl:for-each> What is the best way to get rid of the trailing comma? Is there something better than xs...

XSLT for transforming structure + Ruby for transforming values?

We have pretty big (~200mb) xml files from different sources that we want to transform into a common format. For structural transformations (element names, nesting, etc) we decided to use XSLT (1.0). Because it has to be fast (we receive a lot of those files), we chose Apache Xalan as the engine. Structural transformations might be qui...

Save a transformed xml to html

I've got an XML file with XSL, and CSS layers. When I view this in IE it looks exactly how I want it to look. When I try to save the file, I just get the XML document, what I need it a formatted HTML document. I'm using VB.NET 2008, but I'd rather use an external tool, then write more code. I've tried wget and have gotten the same re...

XSL efficiency problem - need solution

Hi there, I've got an interesting XSL scenario to run by you guys. So far my solutions seem to be inefficient (noticable increase in transformation time) so thought I'd put it out there. The scenario From the following XML we need to get the id of latest news item for each category. The XML In the XML I have a list of news items, a l...

XSLT Parameter Value Insertation problem

hello, i want to make that type of xsl file which remove the namespace value as well as adding parameter value in xml file. here is my latest xsl file, which removed the namespace but didn't add param value into "t0019/ifta_account" template. so when data transfer from xml to database at that time file name not set into (xml_ifta_accou...

Xsl how to get next block of text using .NET xslt

I have a document which when simplified looks like this: <?xml version="1.0"?> <document> <br/> <div class="Heading">Introduction</div> <div class="Text">Sed quis malesuada ligula. Aliquam eu felis nulla, ac tempus purus.</div> <br/> <div class="Heading">Background</div> <div class="Text">Curabitur adipiscing tor...

XSLT Paging - default to current Date

I am using an xslt transform to show a long list of events. It has paging, but what I would like is for it to default to the first events that are closest to the current date. ...

XSL Template, some data not being pulled

Hi, I am trying to display xml data in html via XSLT. I am building a simple html table that displays a Name, Address, & Phone Number. The XSL template pulls the Name & Phone Number, but for some reason, it won't grab the Address. Please help, thanks in advance. XML Doc <?xml-stylesheet type="text/xsl" href="testreport.xsl"?> <BpsR...

Quick xsl help: ordering a table by price

Hi, in xsl what code do you type to make the data in ascending or descending order? I'm making an xml document for music that shows the title, genre and price. I wanted to show the data in ascending order by price. How can I do it? I don't have a clue Just so yo know the data is in a table ...

SSIS XSLT Transform

Hello I am using SSIS on SQL Server 2005, VS 2005 SP2. I have created an XSLT to convert XML to CSV format. When I run this through XML Spy it works fine. I have configured an XML Task within and SSIS package to transform the XML file. Unfortunately, when SSIS performs the transform it does not include the CR/LF at the end of each reco...

xsl:for each select command help

<xsl:for-each select="ComputerStoreProducts/List2/Pc"> for this code i need it to show the data for Pc,mouse,keyboard but it only shows Pc how can i make it do that as i have to write the code three times and the xsl:sort code doesnt work on all of the prices for each element as it only does Pc the mouse and then keyboard i want them to...

XSL: How best to store a node in a variable and then us it in future xpath expressions?

I need to be able to store a node set in variable and then perform more filting/sorting on it afterward. All the examples I've seen of this involve either using XSL2 or extensions neither of which are really an option. I've a list of hotels in my XML doc that can be sorted/filtered and then paged through 5 at a time. I'm finding though ...

how to use a variable instead of a string in <xsl:if test="contains(string, searchedforstring)">

The xsl contains function uses string values... but how can the value of the searchedforstring be assigned dynamically? It should be possible to assign the value of a text entry field in an html form to a variable and use this as the value of the searched for string in the xsl document. The following script snippet gets the value of th...

XSLT to convert XML schema to HTML

I've made an XML schema but I don't know if I need an XSL stylesheet to show it in HTML. Do I need one? If I do, has anyone got an example which I could see and learn how to make one for my XML schema? ...

XML and XSL files.

I've got 4 different XML files which I want to join to make one file. How can I do that? Each file contains a parent and at least 4 children. Parents are called genre 1,2,3,4 and the children are artist, name, etc. Each file is shown in an HTML table. Can someone shed some light on this? ...

Flatten XML using multiple XPath expressions

I'm looking for a generic algorithm which can flatten a XML file into a table, given multiple XPath expressions and all things i've tried failed due to the nature of available XPath engines implementations. Given a XML: <A Name="NameA"> <B Name="NameB1"> <C Name="NameC1"/> <C Name="NameC2"/> <C Name="NameC3"/> </B> <B Name="NameB2">...

XML cross-browser support

I need help getting the file to run in Firefox: I have tried adapting scripts so that my file runs in both IE and Firefox but so far it still only works in IE. (The file can be tested at http://www.eyle.org/crosstest.html - simply type the word Mike in the text box using IE (doesn't work in Firefox).The HTML document is: <!DOCTYPE html ...