xslt

exclude javascript code from print function

I have a print function on a page in my website. the problem is, when it hits this line: <script type="text/javascript" src="http://cdn.powerreviews.com/repos/12564/pr/pwr/engine/js/full.js"&gt;&lt;/script&gt;, it tries to load it, and just never finishes. Any ideas on how to get around that? ...

Improving the performance of XSL

I am using the below XSL 2.0 code to find the ids of the text nodes that contains the list of indices that i give as input. the code works perfectly but in terms for performance it is taking a long time for huge files. Even for huge files if the index values are small then the result is quick in few ms. I am using saxon9he Java processor...

XSLT - Catching parameters

The situation is I have two xslt files: one is called from my ASP.NET code, and there, the second xslt file is imported. What I'd like to accomplish is to pass a parameter to the first one so the second xslt(the one that is imported at the first xslt) can read it. My c# code looks like this: var oArgs = new XsltArgumentList(); ...

Get current node's local-name in XSL

Here's the structure of my XML <FileRoot> <UserSet1> <User> <FirstName></FirstName> <LastName></LastName> </User> <User> <FirstName></FirstName> <LastName></LastName> </User> ... </UserSet1> <InactiveUsers> <User> ...

XSL transformation in Firefox, how to omit xmlns in returned trasnform?

I am trying to do xsl transformation in javascript in firefox 3.5. The transformed value has something like this: <span xmlns="http://www.w3.org/1999/xhtml/"&gt;...&lt;/span&gt; How can I ensure that the xmlns isn't set here? This happens only in Firefox and not IE. ...

does XSLT transformation triggered by a C# code create any dll files ?

I have been facing an error when I trigger XSLT from a C# code, It mentions something about dll file access failure every time, so just want to know whether this transformation code creates any dll files (in C:\Windows\temp directory) as such?? (I have mentioned the error and triggering program in my previous question), ...

Is it possible to come over the time out issue for a function call in C#?

In my program I call a method xslTransform.Load(strXmlQueryTransformPath, xslSettings, new XmlUrlResolver()); The problem I am facing is: sometimes this function doesn't execute well within the time. Sometimes compiler raises the time out issue after a long time of trial.. which inturn causes this part of application to shut. That i...

XSLT Built-in Template Rules for attributes

I'm sure that this is an extremely basic question but here goes anyway! I have read that the built in template rule for text and attribute nodes in XSLT is <xsl:template match="text()|@*"> <xsl:value-of select="."/> </xsl:template> However for the source document <?xml version="1.0"?> <booker> <award> <author blah="test">Aravi...

XSLT templates and recursion

Hi All, Im new to XSLT and am having some problems trying to format an XML document which has recursive nodes. My XML Code: Hopefully my XML shows: All <item> are nested with <items> An item can have either just attributes, or sub nodes The level to which <item> nodes are nested can be infinently deep <?xml version="1.0" encodin...

XSL Transform SVG to VML

I don't know anything about VML except that Internet Explorer and other Microsoft products use it and that it is a vector graphics format. Can one use XSLT to transform an SVG document to VML? Or are they too different from one another to make this possible? I know that there exist XSLT documents to transform SVG to XAML. ...

Writing JSON with XSLT

Hi, I'm trying to write XSLT to transform a specific web page to JSON. The following code demonstrates how Ruby would do this conversion, but the XSLT doesn't generate valid JSON (there's one too many commas inside the array) - anyone know how to write XSLT to generate valid JSON? require 'rubygems' require 'nokogiri' require 'open-uri'...

Nokogiri (Ruby) and XPath

Does Nokogiri only support XPath 1.0? I'm trying to do simple string replacement in a value-of cell, like so (where element contains something like '* My string (useless text)') <xsl:value-of select="replace(element,'^\*\ (.+)\ \(.*\)$','\\1')"> Is this poorly formed XSL? Or is there a limitation with Nokogiri? ...

Combine XML elements with xsl

I have the following xml: <RowSet> <Row> <Number>12345</Number> <Quantity>42</Quantity> </Row> <Row> <Number>12345</Number> <Quantity>12</Quantity> </Row> <Row> <Number>54321</Number> <Quantity>37</Quantity> </Row> </RowSet> I want to use an xsl to combine the elements with the same Number and the r...

Is there any application to generate XSL for XML?

Hi all is there any application to generate a XSL Stylesheet from a XML file, I have a very complex XML file with me here which is a well-formed SVG file. Is there any software application to convert XML to XSL?? ...

How to call an xslt transform into an xsl stylesheet

I have written an xslt that reads some xml file names and does some operations on them. I use a for-each to work them one-by-one. I have each path inside a parameter $path. But now I would like to output the result of applying an external stylesheet to those files. I would write something like <div> <something like xsl-transform($exter...

Cannot get XML to Transform with XSLT

Hi All, I've been trying things for the last 3 days to figure this out, and just can't seem to get it! I am loading an XML response from a third party, which I can receive and strip to just text to display on a div. But, when I try to transform it with an xslt into the div, it doesn't work! Nothing shows up in the div. I just want it t...

Ignoring 'A' and 'The' when sorting with XSLT

I would like to have a list sorted ignoring any initial definite/indefinite articles 'the' and 'a'. For instance: The Comedy of Errors Hamlet A Midsummer Night's Dream Twelfth Night The Winter's Tale I think perhaps in XSLT 2.0 this could be achieved along the lines of: <xsl:template match="/"> <xsl:for-each select="play"/> <x...

How to add a WhiteSpace in <td> using xslt ?

If i try to use <xsl:text>&#160;</xsl:text> to add a white space in my xslt code a question mark is displayed after it converted to html. Please help to solve this issue. Thanks Pradeep ...

Comma separated string parsing XSLT

How can I loop through a Comma separated string which I am passing as a parameter in XSLT 1.0? Ex- <xsl:param name="UID">1,4,7,9</xsl:param> I need to loop the above UID parameter and collectd nodes from within each of the UID in my XML File ...

Producing a static HTML site from XML content

I have a long document in XML from which I need to produce static HTML pages (for distribution via CD). I know (to varying degrees) JavaScript, PHP and Python. The current options I've considered are listed here: I'm not ruling out JavaScript, so one option would be to use ajax to dynamically load the XML content into HTML pages. Edit:...