I'm stuck with recursion, was wondering if anyone can help me out with it.
I have <Receipts> and <Deposits> elements, that are not verbose, i.e. that a <Receipts> element doesn't have an attribute to show what <Deposit> it is towards. I need to figure out <Deposits> "still amount due" and when a last receipt towards it was paid if any.
...
How do I prevent duplicate entries into a list, and then ideally, sort that list? What I'm doing, is when information at one level is missing, taking the information from a level below it, to building the missing list, in the level above. Currently, I have XML similar to this:
<c03 id="ref6488" level="file">
<did>
<unittit...
I have a group of strings ie g:lines = '9,1,306,LUCY,G,38,12'
I need the output to be in XSLT 1.0:
1,9,12,38,306,G,LUCY
This is my current code:
<xsl:for-each select="$all_alerts[g:problem!='normal_service'][g:service='bus']">
<xsl:sort select="g:line"/>
<xsl:sort select="number(g:line)" data-type="number"/>
<xsl:value-of selec...
I'm having some trouble with XSL-processing when there are stylesheets that include other stylesheets relatively.
(the XML-files may be irrelevant but are included for completeness - code is at the bottom).
Given the XML-file:
<?xml version="1.0" ?>
<famous-persons>
<persons category="medicine">
<person>
<firstname> Edward </fi...
I've created a menu in umbraco using XSLT. The menu is using the usual ul and li elements and I'm displaying only the first level of the menu. The aim is to create a menu that expands to show the sub menu when I click a parent node (in the top level).
I am after the xslt I would need to expose the sub menu when clicked.
I think I w...
Hello guys,
I'm having troubles with the logic and would apprecite any help/tips.
I have <Deposits> elements and <Receipts> elements. However there isn't any identification what receipt was paid toward what deposit.
I am trying to update the <Deposits> elements with the following attributes:
@DueAmont - the amount that is still due...
Hi, i'm using XsltArgumentList.AddExtensionObject with sucess.
The problem is when i call the functions from the xslt, they only get the arguments i pass.
How can i get the context (what node is being processed).
I am using XslTransform.Transform (myXPathDoc, xslArgs, myWriter); to start the transformation..
I heard about SetContext an...
I'm creating something where users can upload an xml and data get's imported to the database.
Now I'm building some kind of a preview page where users will get to see how their input will look once it's stored.
What would be the fastest (in execution time), using XSL to transform the xml to a html page, or using php to render the outp...
I have XML:
<point>
...
<longitude>34.123123</longitude>
</point>
<point>
...
<longitude>11.12534534</longitude>
</point>
<point>
...
<longitude>32.567653</longitude>
</point>
<point>
...
<longitude>33.345345</longitude>
</point>
...
Task:
get values of <longitude> in javascript (in variable).
Whic...
Hi, I have to write a very simple code in xsl:
IF column=0 if result = .34 set background color to green and write $result, but if result = 0.10 set background color to white and write the word "QQQ"
and what doesn't work is:
<xsl:if test="$result = 0.35 and $column = 0">
<xsl:attribute name='background-color'>#669933</xs...
The input to my XSL is an XHTML. After applying the XSL the DOCTYPE declaration that was present in the input XHTML gets lost in the output. Do i have an option to copy/retain the DOCTYPE declaration in the output using XSL. The XSL processor that i am using is SAXON.
...
Hi, I have a RSS feed i need to display in a table (its clothes from a webshop system). The images in the RSS vary in width and height and I want to make a table that shows them all. First off i would be happy just to show all of the items in 3 columns, but further down the road i need to be able to specify through a parameter the amount...
I have an xml like this:
<person name="foo" gender = "male" />
I want to transform it to
<person id="foo" gender="male" />
Is there a way to do that using XSLT?
I will have a lot of child nodes in person
I will have more attributes in the person.
...
I'm developing a skin for DotNetNuke 5 using the Component DNN Done Right menu by Mark Alan which uses XSL-T to convert the XML sitemap into an HTML navigation.
The XML sitemap outputs the following structure:
<Root >
<root >
<node id="40" text="Home" url="http://localhost/dnn/Home.aspx" enabled="1" selected="0" breadcrumb="0" fi...
I am trying to sort by date and get an error message about the stylesheet can't be loaded
I found an answer on how others have suggested but it doesn't work for me
Here is where it is supposed to sort. The commented out line is where the sort should occur
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"...
I'm trying to use classes in XSL (the 'msxsl:script' tag). But I get the 'Syntax error' message when debugging the file. Here's a simple code that I'm using:
function Test1(str)
{
this.str = str;
}
Test1.prototype.getStr = function()
{
return this.str;
}
function test()
{
var newTest1 = new Test1("some string");
return...
I'm trying to create a page like this via XSLT transformation.
Pages
page1
page2
Links
link1
link2
Here is the xml
<siteMenu>
<Pages>
<title>page1</title>
</Pages>
<Pages>
<title>page2</title>
</Pages>
<Links>
<title>link1</title>
</Links>
<Links>
<title>link2</title>
</Links>
</siteMenu>
I tri...
<var>1</var>
<value>not null</value>
<var>2</var>
<value>00FFFFFFF555555000100673</value>
<var>3</var>
<value>9694r</value>
If it were a list of vars I can iterate like
<xsl:for-each select="var">
.. crap code
</xsl:for-each>
But I need to catch the value related to var whenever i catch the var...
How can XSL generate a unique id attribute for every element in an XML document using XSL where the id must be numeric?
The XLS below works except that the generated ids are alphanumeric and I need numeric?
<?xml version='1.0' encoding='utf-8'?>
<xsl:stylesheet version='1.0' xmlns:xsl='http://www.w3.org/1999/XSL/Transform'
xmlns:...
I have a pair of custom self closing tags s1 and s2 defined in namespace x in my xhtml. For each tag pair s1, s2 having the same id, I want to add span tags to all the text nodes between them. Each s1, s2 tag pair have a unique id. i am looking for a XSL based solution for the same. I am using Saxon java processor for XSL.
Sample input...