8 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi,
I am a mid-career programmer with extensive experience in object-oriented design and development in C, C++, and C#. I've written a number of multi-threaded server applications and background services, although my grasp of networking protocols is a bit weak: my current job drifted away from... (2 Replies)
Discussion started by: TheTaoOfPhil
2 Replies
2. What is on Your Mind?
I would love the idea to develop games. How can I teach myself computer programming? What programs or software must I use? I have the new iMac? (5 Replies)
Discussion started by: Anna Hussie
5 Replies
3. Web Development
I am learning Web Development, so far i am learning html,xhtml, css, java script....
What I want to know is what other Web Development languages should i learn? (1 Reply)
Discussion started by: Anna Hussie
1 Replies
4. What is on Your Mind?
Post what languages (including scripting) you know, why and where you think that language is most usable. Also include libraries in which you're really good at (libusb, gtk, qt, etc).
assembly?
C or C++?
perl or python?
pascal?
bash or csh/tcsh?
opengl?
gtk or qt?
mono? (27 Replies)
Discussion started by: redoubtable
27 Replies
5. UNIX for Advanced & Expert Users
Hello All.
Everyday at work I have to fill a big .xls spreadsheet with process chains start and end time information. The thing is that it takes too long and a lot of boring work. :(
I was wondering if I could link this with a tool in java that would export this information into a .xls... (1 Reply)
Discussion started by: pingosa
1 Replies
6. UNIX for Dummies Questions & Answers
Which languages would, in the long run, be best to learn on a UNIX environment
for kernel work, every day programs, and overall UNIX programming? I've been learning C for over a year now (which I'm pretty confident with) and decided I want to look into some other languages.
I'll mainly be... (1 Reply)
Discussion started by: tjinr
1 Replies
7. UNIX for Advanced & Expert Users
I'm trying to create an operating system.
Just as a small hobby, it will not be anything big I am trying to get some practice.
Does anyone reccomend a certain programming language because I dont know which one to use.
Any help please? (2 Replies)
Discussion started by: jacx2
2 Replies
8. UNIX Desktop Questions & Answers
If I want to do high-end 3d animation, what skell scripting languages, and programming languages shoul I learn?
If you know any good resources for learning these languages they would be appreciated. (1 Reply)
Discussion started by: aloysius1001
1 Replies
xmerl_xs(3erl) Erlang Module Definition xmerl_xs(3erl)
NAME
xmerl_xs -
Erlang has similarities to XSLT since both languages
have a functional programming approach.
DESCRIPTION
Erlang has similarities to XSLT since both languages have a functional programming approach. Using xmerl_xpath it is possible to write XSLT
like transforms in Erlang.
XSLT stylesheets are often used when transforming XML documents, to other XML documents or (X)HTML for presentation. XSLT contains quite
many functions and learning them all may take some effort. This document assumes a basic level of understanding of XSLT.
Since XSLT is based on a functional programming approach with pattern matching and recursion it is possible to write similar style sheets
in Erlang. At least for basic transforms. This document describes how to use the XPath implementation together with Erlangs pattern match-
ing and a couple of functions to write XSLT like transforms.
This approach is probably easier for an Erlanger but if you need to use real XSLT stylesheets in order to "comply to the standard" there is
an adapter available to the Sablotron XSLT package which is written i C++. See also the Tutorial .
EXPORTS
built_in_rules(Fun, E) -> List
The default fallback behaviour. Template funs should end with:
template(E) -> built_in_rules(fun template/1, E) .
select(String::string(), E) -> E
Extracts the nodes from the xml tree according to XPath.
See also: value_of/1 .
value_of(E) -> List
Types E = unknown()
Concatenates all text nodes within the tree.
Example:
<xsl:template match="title">
<div align="center">
<h1><xsl:value-of select="." /></h1>
</div>
</xsl:template>
becomes:
template(E = #xmlElement{name='title'}) ->
["<div align="center"><h1>",
value_of(select(".", E)), "</h1></div>"]
xslapply(Fun::Function, EList::list()) -> List
Types Function = () -> list()
xslapply is a wrapper to make things look similar to xsl:apply-templates.
Example, original XSLT:
<xsl:template match="doc/title">
<h1>
<xsl:apply-templates/>
</h1>
</xsl:template>
becomes in Erlang:
template(E = #xmlElement{ parents=[{'doc',_}|_], name='title'}) ->
["<h1>",
xslapply(fun template/1, E),
"</h1>"];
AUTHORS
<>
xmerl 1.2.8 xmerl_xs(3erl)