Questions tagged [fxsl]

18 questions
24
votes
6 answers

Is XSLT a functional programming language?

Several questions about functional programming languages have got me thinking about whether XSLT is a functional programming language. If not, what features are missing? Has XSLT 2.0 shortened or closed the gap?
Eric Weilnau
  • 5,370
  • 4
  • 30
  • 30
16
votes
7 answers

How to call named templates based on a variable?

I don't know if it's possible, but I'm wondering how to do it... Let's say we have the following XSL: Bla bla bla ... Bla bla bla ...
Paulo Santos
  • 11,285
  • 4
  • 39
  • 65
15
votes
5 answers

How to Trim in xslt?

I want to trim whitespace left and right in : How can I do that?
Christophe Debove
  • 6,088
  • 20
  • 73
  • 124
13
votes
6 answers

Random Items in XSLT

I'm customizing a Google Search appliance, which uses XSLT to present results to the user. Our design calls for one of several images to be included randomly on the results page. Is there a way to use randomness in XSLT? (Pseudo-randomness is just…
Sean McMains
  • 57,907
  • 13
  • 47
  • 54
7
votes
5 answers

Can an XSLT parse a string of text?

This is my first time using XSLT. I'm trying to create a file that will convert an XML data file exported from a program I use to an HTML report. One of the element's value is path to an image file, but the path generated is an absolute path such…
Eric Anastas
  • 21,675
  • 38
  • 142
  • 236
6
votes
3 answers

Steps and involvement of implementing a parser (in .Net - and in this case XPath 2.0)

In the lack of any good free XPath 2.0 implementations for .Net build upon Linq to XML I have thought about implementing my own (also for the experience). But just to be clear (and not building something that exists) these are the XPath 2.0…
Lasse Espeholt
  • 17,622
  • 5
  • 63
  • 99
5
votes
3 answers

using '/..' notation in XSLT XPath

Here is a beginner's question. What does this XPath expression /.. mean? Does it always select an empty node-set? I've noticed that this pattern is used extensively in FXSL library, for example:
Gart
  • 2,297
  • 1
  • 28
  • 36
5
votes
2 answers

Most efficient way to store list structure in XML

Starting a new project and was planning on storing all of my web content in XML. I do not have access to a database so this seemed like the next best thing. One thing I'm struggling with is how to structure the XML for links (which will later be…
Mike
  • 139
  • 1
  • 6
4
votes
3 answers

Element selection using variable

Basically I have a small template that looks like: And I'm trying to call it…
Ross Anderson
  • 470
  • 4
  • 15
4
votes
2 answers

XSLT stylesheets design pattern - separate common and specific templates in different stylesheets

I was wondering if there is a good approach in XSLT stylesheet design pattern to separate common and specific data representation. I was trying, but got very confused and lost. I would appreciate any advice, tips, hints where I can read up on how to…
DashaLuna
  • 666
  • 2
  • 12
  • 22
4
votes
4 answers

How to extract unique characters from a string using XSLT 1.0?

one of the toughest challenges I have ever faced in XSLT designing .. How to copy the unique characters in a given string .. Test xml is: aaeerstrst11232434 The output I am expecting is: aerst1234
Rookie Programmer Aravind
  • 11,952
  • 23
  • 81
  • 114
3
votes
19 answers

Prime factor of 300 000 000 000?

I need to find out the prime factors of over 300 billion. I have a function that is adding to the list of them...very slowly! It has been running for about an hour now and i think its got a fair distance to go still. Am i doing it completly wrong or…
xoxo
  • 567
  • 7
  • 25
3
votes
2 answers

XSLT FXSL foldl: list of functions?

I've been learning about using functional programming constructs in XSLT 1.0 lately, due to some legacy work I've been doing. So I've been learning more about FXSL, and have some questions about foldl.
J. Polfer
  • 12,251
  • 10
  • 54
  • 83
2
votes
1 answer

xsl:key key() function lookup greater than/less than

Is there a way to do a key() lookup using greaterthan/ lessthan? example: key('akeyname', <8) would return all nodes with the key string value less than 8.
2
votes
5 answers

Looking for a library of XSLT to create SVG charts

I'm looking for a library of XSLT to create SVG charts. I need pie charts, bar charts, line charts, all the usual suspects. I would hope for a reasonably simple DTD or Schema for the input files. Edit: I have the raw data for the charts and a…
dacracot
  • 22,002
  • 26
  • 104
  • 152
1
2