Need help with xml and xsl design

Hi all
This is what I have in mind and I will appreciate any suggestions.

I am trying to create a xml help system for my application. The schema of
the xml file will be
<helpsystem>
    <help id="unique id">
        <text>text data</text>
        <link
            href="optional tag which will hold a reference to a uri"
            helpanchor="this is also a optional attribute which will point
to a helpid in the same document or a different document"
            helpanchorhtmlfile=" this attribute will only be present if the
helpachor attribute is there and basically will include a html file name"
        >some text data </link>
    </help>
    (any number of help tags)
</helpsystem>

At runtime this xml will be read and it will be transform to html. Each help
tag will become a html table and each child of the help tag will become a
row for the html table.

The link tag will either have href attribute or helpanchor attribute but not
both. The link tag trasform to a html <a> tag. The href attribute of the
link tag transform to the href attribute of <a>and the <link> text becomes
the text for the <a> tag. When the helpanchorhtmlfile attribute is present,
the href attribute of <a> will hold the reference given by this tag.

All this is very easy( have already written the xsl stylesheet for it) when
the link tag has the attribute href. My difficulty comes when the link tag
has helpanchor attribute because for this attribute I have to generate a
seperate html file with the name given in the helpanchorhtmlfile attribute.
Since the help id which the helpanchor is pointing  itself could have any
number of link, I have to build html files for any number of nested levels.

In a traditional programming I would have accomplish this task using
recursion but how can I do this using xsl. If any of you have any
suggestions please let me know and I will greatly appreciate your help.

Rafia Tapia

Rafia Tapia


0
rafiat1 (1)
9/1/2003 12:26:09 PM
dotnet.xml 7266 articles. 0 followers. Follow

22 Replies
864 Views

Similar Articles

[PageSpeed] 33

Rafia Tapia wrote:

> All this is very easy( have already written the xsl stylesheet for it) when
> the link tag has the attribute href. My difficulty comes when the link tag
> has helpanchor attribute because for this attribute I have to generate a
> seperate html file with the name given in the helpanchorhtmlfile attribute.
> Since the help id which the helpanchor is pointing  itself could have any
> number of link, I have to build html files for any number of nested levels.
Does this explanation mean you need to produce multiple outputs from single 
transformation and that's your problem?

> In a traditional programming I would have accomplish this task using
> recursion but how can I do this using xsl.
Never heard of any problem with recursion in XSLT.
-- 
Oleg Tkachenko
http://www.tkachenko.com/blog
Multiconn Technologies, Israel

0
oleg7603 (294)
9/1/2003 3:11:06 PM
Hello Oleg,

> > In a traditional programming I would have accomplish this task using
> > recursion but how can I do this using xsl.
> Never heard of any problem with recursion in XSLT.

Although if you're going to want to maintain state (e.g. recursion level)
you'll need to get creative. XSL is not very friendly toward state
maintenance since templates aren't supposed to produce any side effects
other than their transformation output.

- Joe Geretz -


0
jgeretz (30)
9/1/2003 7:56:22 PM
> Still, if you attempt to "maintain a state," it is a problem.

You shouldn't.

In XSLT one does not attempt to maintain state -- and this is not a problem.
If you want to use XSLT like you are using Fortran, then it is better for
you to continue to use Fortran.


=====
Cheers,

Dimitre Novatchev.
http://fxsl.sourceforge.net/ -- the home of FXSL


0
dnovatchev (74)
9/1/2003 9:13:23 PM
"Dimitre Novatchev" <dnovatchev@yahoo.com> wrote in message
news:bj0brn$e2gsl$1@ID-152440.news.uni-berlin.de...
> > Still, if you attempt to "maintain a state," it is a
problem.
>
> You shouldn't.
>
> In XSLT one does not attempt to maintain state -- and this is
not a problem.
> If you want to use XSLT like you are using Fortran, then it
is better for
> you to continue to use Fortran.

You've made this point repeatedly clear.


0
grinder (4)
9/1/2003 9:32:54 PM
Hello Dimitre,

> > Still, if you attempt to "maintain a state," it is a problem.
>
> You shouldn't.

Hmm, I daresay that I'm not the first or only developer to use XSL to
produce a 'tree-like' HTML structure (e.g. menu) by recursing through the
nodes of an XML DOM. But even if I were, this would still be a good
practical example, as you requested. As far as a practical example to 'prove
my statement' all you need to know is that you can initialize a variable but
you can't make further asignment to change its value. Thus, it's obviously
difficult to track state.

If you'd like to see how I solved this problem, here's a nice practical
template which demonstrates A - the possibility of tracking the recursion
level and B - the difficulty in doing so. (No, I did not come up with this
technique myself, I read it in a book.)

 <xsl:template name="indent">
  <xsl:param name="nodenum"/>
  <xsl:param name="pos"/>
  <xsl:if test="substring($nodenum, $pos, 1) = '.' ">
   <img border="0" src="images/pixel.gif" width="15" height="9"/>
  </xsl:if>
  <xsl:if test="$pos != string-length($nodenum)">
   <xsl:call-template name="indent">
    <xsl:with-param name="nodenum" select="$nodenum"/>
    <xsl:with-param name="pos" select="$pos + 1"/>
   </xsl:call-template>
  </xsl:if>
 </xsl:template>

In a nutshell, $nodenum gives you the number of the node you're on (e.g.
3.4.6). By parsing this and counting dots, you can figure our the level of
recursion.

I think that we can all agree that state maintenance is difficult with XSLT.
And purists can argue all they want that you shouldn't be tracking state,
and I agree that 97% of all my XSLT hasn't needed state maintenance, but it
is sometimes necessary and when it is, it is difficult.

- Joe Geretz -


0
jgeretz (30)
9/1/2003 9:46:30 PM
I don't think you explained clearly what is the problem.

From the little I can guess it seems to me that there can be a much more
straightforward solution than "counting the dots via recursion". And no
state maintaining (modification) will be necessary.

However, these are just guesses.

Could you, please, formulate your problem precisely:

  1. XML source document

  2. The exact wanted result

  3. Description of what requirements should the transformation satisfy.


Once again, "state maintenance" meaning the capability to alter the contents
of a variable, the value of which is some current state, is only needed by
people, who want to solve a problem in a procedural/imperative
(non-functional) way.



=====
Cheers,

Dimitre Novatchev.
http://fxsl.sourceforge.net/ -- the home of FXSL



"Joseph Geretz" <jgeretz@nospam.com> wrote in message
news:ubG5FKNcDHA.2632@TK2MSFTNGP12.phx.gbl...
> Hello Dimitre,
>
> > > Still, if you attempt to "maintain a state," it is a problem.
> >
> > You shouldn't.
>
> Hmm, I daresay that I'm not the first or only developer to use XSL to
> produce a 'tree-like' HTML structure (e.g. menu) by recursing through the
> nodes of an XML DOM. But even if I were, this would still be a good
> practical example, as you requested. As far as a practical example to
'prove
> my statement' all you need to know is that you can initialize a variable
but
> you can't make further asignment to change its value. Thus, it's obviously
> difficult to track state.
>
> If you'd like to see how I solved this problem, here's a nice practical
> template which demonstrates A - the possibility of tracking the recursion
> level and B - the difficulty in doing so. (No, I did not come up with this
> technique myself, I read it in a book.)
>
>  <xsl:template name="indent">
>   <xsl:param name="nodenum"/>
>   <xsl:param name="pos"/>
>   <xsl:if test="substring($nodenum, $pos, 1) = '.' ">
>    <img border="0" src="images/pixel.gif" width="15" height="9"/>
>   </xsl:if>
>   <xsl:if test="$pos != string-length($nodenum)">
>    <xsl:call-template name="indent">
>     <xsl:with-param name="nodenum" select="$nodenum"/>
>     <xsl:with-param name="pos" select="$pos + 1"/>
>    </xsl:call-template>
>   </xsl:if>
>  </xsl:template>
>
> In a nutshell, $nodenum gives you the number of the node you're on (e.g.
> 3.4.6). By parsing this and counting dots, you can figure our the level of
> recursion.
>
> I think that we can all agree that state maintenance is difficult with
XSLT.
> And purists can argue all they want that you shouldn't be tracking state,
> and I agree that 97% of all my XSLT hasn't needed state maintenance, but
it
> is sometimes necessary and when it is, it is difficult.
>
> - Joe Geretz -
>
>


0
dnovatchev (74)
9/2/2003 4:43:36 AM
"Dimitre Novatchev" <dnovatchev@yahoo.com> wrote in message
news:bj167q$e7oo6$1@ID-152440.news.uni-berlin.de...
> I don't think you explained clearly what is the problem.
>
> From the little I can guess it seems to me that there can be
a much more
> straightforward solution than "counting the dots via
recursion". And no
> state maintaining (modification) will be necessary.
>
> However, these are just guesses.
>
> Could you, please, formulate your problem precisely:
>
>   1. XML source document
>
>   2. The exact wanted result
>
>   3. Description of what requirements should the
transformation satisfy.
>
>
> Once again, "state maintenance" meaning the capability to
alter the contents
> of a variable, the value of which is some current state, is
only needed by
> people, who want to solve a problem in a
procedural/imperative
> (non-functional) way.

The original poster has not responded yet.  So far, all but one
of the messages in this conversation is amongst respondents.
It's my best guess that Joseph and I both understand the
stateless nature of XSLT -- so mission accomplished.


0
grinder (4)
9/2/2003 6:49:42 AM
Joseph Geretz wrote:

> Hmm, I daresay that I'm not the first or only developer to use XSL to
> produce a 'tree-like' HTML structure (e.g. menu) by recursing through the
> nodes of an XML DOM. But even if I were, this would still be a good
> practical example, as you requested. As far as a practical example to 'prove
> my statement' all you need to know is that you can initialize a variable but
> you can't make further asignment to change its value. Thus, it's obviously
> difficult to track state.
Actually that's really bad idea to to solve any problem in XSLT by emulating 
assignable variables. Obviously it's difficult to go against the way a 
language is designed to be used.

> In a nutshell, $nodenum gives you the number of the node you're on (e.g.
> 3.4.6). By parsing this and counting dots, you can figure our the level of
> recursion.
All we know educational samples sometimes are really weird :) I'm sure there 
is a better way to solve that problem. If the level of recursion cannot be 
calculated using usual means, why not merely to pass it as a parameter?

> I think that we can all agree that state maintenance is difficult with XSLT.
> And purists can argue all they want that you shouldn't be tracking state,
> and I agree that 97% of all my XSLT hasn't needed state maintenance, but it
> is sometimes necessary and when it is, it is difficult.
Well, may be that's not so bad if only 3% of activity can be somewhat difficult?
-- 
Oleg Tkachenko
http://www.tkachenko.com/blog
Multiconn Technologies, Israel

0
oleg7603 (294)
9/2/2003 7:52:07 AM
Hi all
Thanks for all your post. I was able to accomplish my task using dom. I am
not even sure what you mean by state maintainence. but below I am producing
the simplified version of my xml and xsl

helpsystem.xml

<helpsystem>
    <help id="a">
        <text>A text</text>
        <link href="abc.com">B text</link>
    </help>
    <help id="b">
        <text>C text</text>
        <link href="xyz.com">D text</link>
        <link helpanchor="a" href="myhtmlfile.html"> E text </link>
    </help>
    <help id="c">
        <link helpachor="b" href="myotherhtml.html" >F text </link>
    </help>
</helpsystem>

helpsystem.xsl

<xsl:template match="Link">
     <xsl:element name="a">
          <xsl:attribute name="href">
               <xsl:value-of select="@href"/>
          </xsl:attribute>
          <xsl:value-of select="." />
    </xsl:element>
 </xsl:template>

 <xsl:template match="Text">
     <xsl:value-of select="."/>
  </xsl:template>

Now I start by looking at help id ="c" which will produce the following html
<a href="myotherhtml.html>F text </a>

The problem is myotherhtml.html file has to be generated dynamically. This
html will look like
C text
<a href="xyz.com">D text</a>
<a href="myhtmlfile.html"> E text </a>

and again in this dynamically created html above, there is another link for
a dynamically created html. When I said recusion, what I meant that the html
generation should happen at each nested level.

I am not sure if this could be accomplish by plain xslt. I am using xslt
with dom and it is working. but anyway thanks a lot to all of you for your
input.

Rafia

"Grinder" <grinder@no.spam.maam.com> wrote in message
news:ubR9k5RcDHA.456@TK2MSFTNGP10.phx.gbl...
>
> "Dimitre Novatchev" <dnovatchev@yahoo.com> wrote in message
> news:bj167q$e7oo6$1@ID-152440.news.uni-berlin.de...
> > I don't think you explained clearly what is the problem.
> >
> > From the little I can guess it seems to me that there can be
> a much more
> > straightforward solution than "counting the dots via
> recursion". And no
> > state maintaining (modification) will be necessary.
> >
> > However, these are just guesses.
> >
> > Could you, please, formulate your problem precisely:
> >
> >   1. XML source document
> >
> >   2. The exact wanted result
> >
> >   3. Description of what requirements should the
> transformation satisfy.
> >
> >
> > Once again, "state maintenance" meaning the capability to
> alter the contents
> > of a variable, the value of which is some current state, is
> only needed by
> > people, who want to solve a problem in a
> procedural/imperative
> > (non-functional) way.
>
> The original poster has not responded yet.  So far, all but one
> of the messages in this conversation is amongst respondents.
> It's my best guess that Joseph and I both understand the
> stateless nature of XSLT -- so mission accomplished.
>
>


0
rafiat (3)
9/2/2003 11:09:06 AM
> I don't think you explained clearly what is the problem.

There is no problem at all. You asked for a practical example of where state
maintenance would be desirable during a transformation. I've given it to
you. In order to properly indent, you need to know the level of recursion
you are on.

> From the little I can guess it seems to me that there can be a much more
> straightforward solution than "counting the dots via recursion". And no
> state maintaining (modification) will be necessary.
>
> However, these are just guesses.

Yes, just guesses. Come up with a better solution and post it. The code I
presented is based on the solution from XSLT 2nd Edition by Kay.

> Once again, "state maintenance" meaning the capability to alter the
contents
> of a variable, the value of which is some current state, is only needed by
> people, who want to solve a problem in a procedural/imperative
> (non-functional) way.

OK, so show us how to solve this in the functional way.

- Joe Geretz -


0
jgeretz (30)
9/2/2003 12:08:36 PM
> Well, may be that's not so bad if only 3% of activity can be somewhat
difficult?

Not so bad? Who said it was bad? It's EXCELLENT!

- Joe Geretz -

"Oleg Tkachenko" <oleg@NO_SPAM_PLEASEtkachenko.com> wrote in message
news:eKyoj4RcDHA.3044@TK2MSFTNGP11.phx.gbl...
> Joseph Geretz wrote:
>
> > Hmm, I daresay that I'm not the first or only developer to use XSL to
> > produce a 'tree-like' HTML structure (e.g. menu) by recursing through
the
> > nodes of an XML DOM. But even if I were, this would still be a good
> > practical example, as you requested. As far as a practical example to
'prove
> > my statement' all you need to know is that you can initialize a variable
but
> > you can't make further asignment to change its value. Thus, it's
obviously
> > difficult to track state.
> Actually that's really bad idea to to solve any problem in XSLT by
emulating
> assignable variables. Obviously it's difficult to go against the way a
> language is designed to be used.
>
> > In a nutshell, $nodenum gives you the number of the node you're on (e.g.
> > 3.4.6). By parsing this and counting dots, you can figure our the level
of
> > recursion.
> All we know educational samples sometimes are really weird :) I'm sure
there
> is a better way to solve that problem. If the level of recursion cannot be
> calculated using usual means, why not merely to pass it as a parameter?
>
> > I think that we can all agree that state maintenance is difficult with
XSLT.
> > And purists can argue all they want that you shouldn't be tracking
state,
> > and I agree that 97% of all my XSLT hasn't needed state maintenance, but
it
> > is sometimes necessary and when it is, it is difficult.
> Well, may be that's not so bad if only 3% of activity can be somewhat
difficult?
> -- 
> Oleg Tkachenko
> http://www.tkachenko.com/blog
> Multiconn Technologies, Israel
>



0
jgeretz (30)
9/2/2003 12:09:47 PM
> > I don't think you explained clearly what is the problem.
> 
> There is no problem at all. You asked for a practical example of where state
> maintenance would be desirable during a transformation. I've given it to
> you. In order to properly indent, you need to know the level of recursion
> you are on.

No, you haven't provided:

  1. XML source document

  2. The exact wanted result

  3. Description of what requirements should the transformation satisfy.




> 
> > From the little I can guess it seems to me that there can be a much more
> > straightforward solution than "counting the dots via recursion". And no
> > state maintaining (modification) will be necessary.
> >
> > However, these are just guesses.
> 
> Yes, just guesses. Come up with a better solution and post it. 

Better solution to what? To the unspecified problem?

> The code I
> presented is based on the solution from XSLT 2nd Edition by Kay.

You presented just one template with two xsl:param elements with undefined values...

   No source xml document.

   No desired output.

   Really no formulation of the problem.


Shall I beg for you to specify the problem you want solved?

> 
> > Once again, "state maintenance" meaning the capability to alter the
> contents
> > of a variable, the value of which is some current state, is only needed by
> > people, who want to solve a problem in a procedural/imperative
> > (non-functional) way.
> 
> OK, so show us how to solve this 

What is "this"?

> in the functional way.
> 
> - Joe Geretz -
> 
>
0
dimitren (11)
9/2/2003 12:54:45 PM
> No, you haven't provided:
>
>   1. XML source document
>
>   2. The exact wanted result
>
>   3. Description of what requirements should the transformation satisfy.

Like, do I owe you something dude? Get a job. You'll find that your
fascination with the thoeretical will diminish once you have something
practical to spend your time on.

- Joe Geretz -


0
jgeretz (30)
9/2/2003 2:23:35 PM
Hi Chris,

> As Dimitre does point out (although not particularly clearly in the midst
of
> the rising flames) it is nearly always possible [I think Dimitre usually
> asserts that it *is* always possible] to achieve something in XSLT without
> state that would otherwise in a scripted environment require it.
> Dimitre's reference to XSLT as a functional language is correct but
> unfortunately the solutions are sometimes so esoteric and bloody difficult
> to fathom (nevermind code) that they are usually missed.

Which was exactly my point. I never said that anything was impossible to
accomplish. Just pointed out that sometimes certain tasks are difficult to
accomplish. This is true of any development environment I've ever worked
with. Why choose VB for one task and C++ for another? It's not that
windowing is impossible in C++ or that pointers and callbacks are impossible
with VB. It's just that windowing is more convenient with VB and pointers
and callbacks are more convenient with C++.

The fact that XSL works in a functional, rather than in a procedural manner,
is simply that - a fact. It neither condemns, nor recommends the language.
What it does mean though is that XSL is more suitable to those problems
which can be conveniently solved in a functional manner, and less suitable
to those tasks which cannot be conveniently solved in this manner.

- Joe Geretz -


0
jgeretz (30)
9/2/2003 5:28:40 PM
So you failed to provide any concrete problem that requires maintaining
/altering state.

Although expected it's a pity.


"Joseph Geretz" <jgeretz@nospam.com> wrote in message
news:%230e6izVcDHA.2960@tk2msftngp13.phx.gbl...
> > No, you haven't provided:
> >
> >   1. XML source document
> >
> >   2. The exact wanted result
> >
> >   3. Description of what requirements should the transformation satisfy.
>
> Like, do I owe you something dude? Get a job. You'll find that your
> fascination with the thoeretical will diminish once you have something
> practical to spend your time on.
>
> - Joe Geretz -
>
>


0
dnovatchev (74)
9/2/2003 7:26:32 PM
> So if you want
> to go ahead and develop a word processor or spreadhseet application in
XSLT
> go ahead, I won't attempt to stop you. It's probably even 'possible'. Let
us
> know when you're done.

No need to let you know.

Much more challenging applications have already been developed with
functional languages by people with imagination.


=====
Cheers,

Dimitre Novatchev.
http://fxsl.sourceforge.net/ -- the home of FXSL


0
dnovatchev (74)
9/3/2003 5:27:06 AM
"Dimitre Novatchev" <dnovatchev@yahoo.com> wrote in message
news:bj3t5c$f1064$1@ID-152440.news.uni-berlin.de...
> > So if you want
> > to go ahead and develop a word processor or spreadhseet
application in
> XSLT
> > go ahead, I won't attempt to stop you. It's probably even
'possible'. Let
> us
> > know when you're done.
>
> No need to let you know.
>
> Much more challenging applications have already been
developed with
> functional languages by people with imagination.

Sincerely, I would like to see a word processor or spreadsheet
that's been written in a functional language, or something much
more challenging -- what did you have in mind when you wrote
this?


0
grinder (4)
9/3/2003 8:23:12 AM
"Grinder" <grinder@no.spam.maam.com> wrote in message news:<eHVgfSfcDHA.2460@TK2MSFTNGP10.phx.gbl>...
> "Dimitre Novatchev" <dnovatchev@yahoo.com> wrote in message
> news:bj3t5c$f1064$1@ID-152440.news.uni-berlin.de...
> > > So if you want
> > > to go ahead and develop a word processor or spreadhseet
>  application in
>  XSLT
> > > go ahead, I won't attempt to stop you. It's probably even
>  'possible'. Let
>  us
> > > know when you're done.
> >
> > No need to let you know.
> >
> > Much more challenging applications have already been
>  developed with
> > functional languages by people with imagination.
> 
> Sincerely, I would like to see a word processor or spreadsheet
> that's been written in a functional language, or something much
> more challenging -- what did you have in mind when you wrote
> this?

  Compilers and compiler-writing systems

  Natural Language Recognition and Speech Recognition Systems

  Theorem Provers

  Computer Algebra

  Games (a chess program, Quake, etc.), a games development kit

  Animation

  Reactive animation

  Musical Composition.

  Robotic Control systems

  Web Servers

  Operating system (smart-card)


See for example:

  http://www.research.avayalabs.com/user/wadler/realworld/index.html

and

  http://www.haskell.org/practice.html




=====
Cheers,

Dimitre Novatchev.
http://fxsl.sourceforge.net/ -- the home of FXSL
0
dimitren (11)
9/3/2003 1:45:31 PM
Heh,

> See for example:
>
>   http://www.research.avayalabs.com/user/wadler/realworld/index.html

And every one a best seller!

Just for kicks I took a look at the link

Functional Programming in the Real World
Here is a list of functional programs applied to real-world tasks...

OK, but is anyone in the real world actually using any of these programs? I
see here that there's a neat FTP client. Hmm, let's check it out:

http://www.research.avayalabs.com/user/wadler/realworld/anonftp.html

LOL, it says here that as of September 1994 there was one person using this.
I bet by now millions of people are using this. Probably the author is too
busy distributing this popular FTP client to update the page since 1994.

ROTFLMHO!

Bottom line - it's important not to confuse possibility with suitability.
Unless of course, you live in an ivory tower.

(It's an odd sort of agenda, to be promoting functional programming as being
suitable for as broad a range of development tasks as are declarative
languages.)

- Joe Geretz -

"Dimitre Novatchev" <dimitren@eurosport.com> wrote in message
news:5f726582.0309030545.15018198@posting.google.com...
> "Grinder" <grinder@no.spam.maam.com> wrote in message
news:<eHVgfSfcDHA.2460@TK2MSFTNGP10.phx.gbl>...
> > "Dimitre Novatchev" <dnovatchev@yahoo.com> wrote in message
> > news:bj3t5c$f1064$1@ID-152440.news.uni-berlin.de...
> > > > So if you want
> > > > to go ahead and develop a word processor or spreadhseet
> >  application in
> >  XSLT
> > > > go ahead, I won't attempt to stop you. It's probably even
> >  'possible'. Let
> >  us
> > > > know when you're done.
> > >
> > > No need to let you know.
> > >
> > > Much more challenging applications have already been
> >  developed with
> > > functional languages by people with imagination.
> >
> > Sincerely, I would like to see a word processor or spreadsheet
> > that's been written in a functional language, or something much
> > more challenging -- what did you have in mind when you wrote
> > this?
>
>   Compilers and compiler-writing systems
>
>   Natural Language Recognition and Speech Recognition Systems
>
>   Theorem Provers
>
>   Computer Algebra
>
>   Games (a chess program, Quake, etc.), a games development kit
>
>   Animation
>
>   Reactive animation
>
>   Musical Composition.
>
>   Robotic Control systems
>
>   Web Servers
>
>   Operating system (smart-card)
>
>
> See for example:
>
>   http://www.research.avayalabs.com/user/wadler/realworld/index.html
>
> and
>
>   http://www.haskell.org/practice.html
>
>
>
>
> =====
> Cheers,
>
> Dimitre Novatchev.
> http://fxsl.sourceforge.net/ -- the home of FXSL


0
jgeretz (30)
9/3/2003 2:56:08 PM
> OK, but is anyone in the real world actually using any of these programs?

Of course, there are bestsellers.

Millions of people are using Ericsson telecommunications products. All
communications software of Ericsson is written in the functional programming
language ERLANG.

ERLANG is a dynamically typed concurrent functional programming language for
large industrial real-time systems. Erlang is a powerful development
environment for real time applications. Ericsson's own telephony switches
are programmed in the language.
ERLANG provides facilities for developing fault-tolerant, distributed
applications.

Because this software is used by so many clients, the fault tolerant
requirements are extremely important -- AFAIK the downtime allowed is a few
minutes per year. And they are successfully met by the software produced
using this FP language.

Another massively used product is GHC (Glasgow Haskell Compiler).
The Glasgow Haskell Compiler is a robust, fully-featured, optimising
compiler and interactive environment for Haskell 98, GHC compiles Haskell to
either native code or C.  It implements numerous experimental language
extensions to Haskell 98; for example: concurrency, a foreign language
interface, multi-parameter type classes, scoped type variables, existential
and universal quantification, unboxed types, exceptions, weak pointers, and
so on.  GHC comes with a generational garbage collector, and a space and
time profiler.

GHC is itself written in Haskell. It is the most popular compiler and
programming environment for Haskell programmers and is used massively in
their daily work.


0
dnovatchev (74)
9/3/2003 8:05:38 PM
OK,

There's obviously a time and place for functional languages. I'm not saying
otherwise. However, it's just as obvious (to me at least) that functional
languages will lend themselves better to some tasks, and procedural
languages will lend themselves better to other tasks.

Which was the original premise; you can go back along the thread and look it
up. Simply my advice to the original poster that tracking state would be
difficult with XSL. (I remember how surprised I was personally to find this
out when I began using XSL.) I did not advise the original poster in any way
to either choose or reject XSL for his particular task. (Although, seemingly
others on the thread automatically jumped to the conclusion that that one
remark (which is after all, factual) reflected a condemnation of the
language for any purpose.)

In order to demonstrate the suitability of various languages for various
tasks, my original challenge was to produce a word processor or spreadsheet
application using XSL as the language medium. The premise is obviously
absurd (although I won't say impossible ;-). You answered showing that
functional languages (although not necessarily XSL) could be used to solve
such problems. I thank you for that, and I'll take a closer look at some of
these. I see several free versions of Haskell and I'd like to take a closer
look at this.

Once the flames die down (and I hope they have), hopefully we can all take
away the impression that different language mediums have different strengths
and weaknesses, and are threfore suitable for different types of tasks.
Personally, the application I am currently working on is a Win32 UI
application, however many areas of the UI display are actually embedded
browser areas which display HTML which is produced as the result of
XML/XSLT. So I use XSL for presentation purposes, however much of the
processing is performed in-code (VB6) before XML is emitted. (Which is what
confused me on a different thread when you refered to my VB code statements
as 'script'. I'm not working in a scripting environment (e.g. ASP, etc.))
Ultimately, in my current environment, for any given operation I have the
'luxury' of choosing to implement it at the presentation layer in XSL, or
further down in the business or data layers using procedural code. Sometimes
I'll choose to place even a UI operation at the highest level of my
procedural code (just before XML is emitted). It's not that these operations
are impossible to perform in XSL, it's just that often I'll get more 'bang
for the buck' by a procedural implementation, than by a functional one.

And sometimes it's vice versa. Obviously - otherwise I wouldn't be using XSL
in the first place to generate my UI. I don't need to. I can develop
standard Win32 forms. But I chose to take the XSL approach because it does
offer certain strengths.

- Joe Geretz -

"Dimitre Novatchev" <dnovatchev@yahoo.com> wrote in message
news:bj5gkk$f64e4$1@ID-152440.news.uni-berlin.de...
>
> > OK, but is anyone in the real world actually using any of these
programs?
>
> Of course, there are bestsellers.
>
> Millions of people are using Ericsson telecommunications products. All
> communications software of Ericsson is written in the functional
programming
> language ERLANG.
>
> ERLANG is a dynamically typed concurrent functional programming language
for
> large industrial real-time systems. Erlang is a powerful development
> environment for real time applications. Ericsson's own telephony switches
> are programmed in the language.
> ERLANG provides facilities for developing fault-tolerant, distributed
> applications.
>
> Because this software is used by so many clients, the fault tolerant
> requirements are extremely important -- AFAIK the downtime allowed is a
few
> minutes per year. And they are successfully met by the software produced
> using this FP language.
>
> Another massively used product is GHC (Glasgow Haskell Compiler).
> The Glasgow Haskell Compiler is a robust, fully-featured, optimising
> compiler and interactive environment for Haskell 98, GHC compiles Haskell
to
> either native code or C.  It implements numerous experimental language
> extensions to Haskell 98; for example: concurrency, a foreign language
> interface, multi-parameter type classes, scoped type variables,
existential
> and universal quantification, unboxed types, exceptions, weak pointers,
and
> so on.  GHC comes with a generational garbage collector, and a space and
> time profiler.
>
> GHC is itself written in Haskell. It is the most popular compiler and
> programming environment for Haskell programmers and is used massively in
> their daily work.
>
>


0
jgeretz (30)
9/3/2003 8:45:25 PM
I'm interested to hear how you are using XML/XSL to generate your screens,
if you could give me more information, I'd appreciate it!

ice
"Joseph Geretz" <jgeretz@nospam.com> wrote in message
news:eyMq6slcDHA.1772@TK2MSFTNGP10.phx.gbl...
> OK,
>
> There's obviously a time and place for functional languages. I'm not
saying
> otherwise. However, it's just as obvious (to me at least) that functional
> languages will lend themselves better to some tasks, and procedural
> languages will lend themselves better to other tasks.
>
> Which was the original premise; you can go back along the thread and look
it
> up. Simply my advice to the original poster that tracking state would be
> difficult with XSL. (I remember how surprised I was personally to find
this
> out when I began using XSL.) I did not advise the original poster in any
way
> to either choose or reject XSL for his particular task. (Although,
seemingly
> others on the thread automatically jumped to the conclusion that that one
> remark (which is after all, factual) reflected a condemnation of the
> language for any purpose.)
>
> In order to demonstrate the suitability of various languages for various
> tasks, my original challenge was to produce a word processor or
spreadsheet
> application using XSL as the language medium. The premise is obviously
> absurd (although I won't say impossible ;-). You answered showing that
> functional languages (although not necessarily XSL) could be used to solve
> such problems. I thank you for that, and I'll take a closer look at some
of
> these. I see several free versions of Haskell and I'd like to take a
closer
> look at this.
>
> Once the flames die down (and I hope they have), hopefully we can all take
> away the impression that different language mediums have different
strengths
> and weaknesses, and are threfore suitable for different types of tasks.
> Personally, the application I am currently working on is a Win32 UI
> application, however many areas of the UI display are actually embedded
> browser areas which display HTML which is produced as the result of
> XML/XSLT. So I use XSL for presentation purposes, however much of the
> processing is performed in-code (VB6) before XML is emitted. (Which is
what
> confused me on a different thread when you refered to my VB code
statements
> as 'script'. I'm not working in a scripting environment (e.g. ASP, etc.))
> Ultimately, in my current environment, for any given operation I have the
> 'luxury' of choosing to implement it at the presentation layer in XSL, or
> further down in the business or data layers using procedural code.
Sometimes
> I'll choose to place even a UI operation at the highest level of my
> procedural code (just before XML is emitted). It's not that these
operations
> are impossible to perform in XSL, it's just that often I'll get more 'bang
> for the buck' by a procedural implementation, than by a functional one.
>
> And sometimes it's vice versa. Obviously - otherwise I wouldn't be using
XSL
> in the first place to generate my UI. I don't need to. I can develop
> standard Win32 forms. But I chose to take the XSL approach because it does
> offer certain strengths.
>
> - Joe Geretz -
>
> "Dimitre Novatchev" <dnovatchev@yahoo.com> wrote in message
> news:bj5gkk$f64e4$1@ID-152440.news.uni-berlin.de...
> >
> > > OK, but is anyone in the real world actually using any of these
> programs?
> >
> > Of course, there are bestsellers.
> >
> > Millions of people are using Ericsson telecommunications products. All
> > communications software of Ericsson is written in the functional
> programming
> > language ERLANG.
> >
> > ERLANG is a dynamically typed concurrent functional programming language
> for
> > large industrial real-time systems. Erlang is a powerful development
> > environment for real time applications. Ericsson's own telephony
switches
> > are programmed in the language.
> > ERLANG provides facilities for developing fault-tolerant, distributed
> > applications.
> >
> > Because this software is used by so many clients, the fault tolerant
> > requirements are extremely important -- AFAIK the downtime allowed is a
> few
> > minutes per year. And they are successfully met by the software produced
> > using this FP language.
> >
> > Another massively used product is GHC (Glasgow Haskell Compiler).
> > The Glasgow Haskell Compiler is a robust, fully-featured, optimising
> > compiler and interactive environment for Haskell 98, GHC compiles
Haskell
> to
> > either native code or C.  It implements numerous experimental language
> > extensions to Haskell 98; for example: concurrency, a foreign language
> > interface, multi-parameter type classes, scoped type variables,
> existential
> > and universal quantification, unboxed types, exceptions, weak pointers,
> and
> > so on.  GHC comes with a generational garbage collector, and a space and
> > time profiler.
> >
> > GHC is itself written in Haskell. It is the most popular compiler and
> > programming environment for Haskell programmers and is used massively in
> > their daily work.
> >
> >
>
>


0
ice1 (14)
9/5/2003 1:26:38 PM
Reply:

Similar Artilces:

Expense reporting-need HELP
We are using GP 7.5 and was wondering how people handle employee expense reporting. Our company wants to begin reimbursing employees for their expenses through payroll but I was wondering where do we begin. Do we still enter the invoice through payables so the detail is there and choose the payroll checkbook as where it is issued or is there an entirely separate module. Can anyone give me some input on this matter because I am confused and need to get moving on this?? Thanks so much Barb Are you processing payroll in GP? if yes, you dont have a lot of options regarding allocation...

invalid product key help
Hi, I am trying to install XP Home on a Dell Inspiron laptop. I use the product key from the xp home sticker on the underside of the laptop. And, I get invalid key every time I try. The XP home CD is not the one one that came with the laptop but it's a valid key sticker and i thought it should work. Why isn't the XP home key working with an XP home disk? Thanks, Lee G. On Sat, 17 Apr 2010 10:33:27 -0700 (PDT), goldtech <goldtech@worldpost.com> wrote: >Hi, > >I am trying to install XP Home on a Dell Inspiron laptop. I use the >product key from ...

I am wondering if someone could help me solve this equation
A car wash makes $4000 profit on sunny days and loses $4000 on non-sunny days. Assuming independence, if it is sunny 75% of the days, (and, therefore NOT sunny 25% of the days) what is the expected (daily) profit (or loss) for the car wash? (MEAN = EXPECTED VALUE) Let me know via email or can you please forward me to someone who can help me with this formula? Thank you. "Miles" wrote: > A car wash makes $4000 profit on sunny days and loses $4000 on > non-sunny days. Assuming independence, if it is sunny 75% of the > days, (and, therefore NOT sunny 25% of the days) what...

Dynamic Stacked Column Chart Help
I am trying to create a dynamic stacked column chart for some product based sales information. I have used some information that I found at http://peltiertech.com/Excel/Charts/Dynamics.html#DynColCht to create dynamic named ranges for my data with the following formulas that I found for a dynamic column chart ChartData =OFFSET(Sheet1!$B$1,1,0,COUNTA(Sheet1!$B:$B)-1,1) ChartLabels OFFSET(ChartValues,0,-1) However my chart does not appear to be graphing all of the data so I suspect there is something wrong with how I am setting it up or that these formulas don;t liek the fact that I am tryin...

Help: Shortcut for editing a calendar series
When I want to edit an entire series of calendar events, I have to go through the annoying 'do you want to edit this occurrence or the entire series' dialog. Does anyone know if there is a keyboard or mouse/key combination that opens the series for editing without the dialog? Thanks for an advice. You'll only have to deal with the dialogue once if you want to "open the series for editing..." So I don't understand your question. What are you trying to do? Edit each separate occurence or "edit an entire series of calendar events" Judy Gleeson MVP...

Help with Win 7
I've written a program that runs fine on all the WinXP computers on our network. I installed our first Win7 computer on the network and now the program won't run without the UAC window popping up asking for an Admin name and password. I've gone through the program and gotten rid of all the registry settings (getsetting, savesetting) leftover from the VB6 era and I got rid of the ini file used for startup. Can someone tell me the quick way to get rid of the UAC admin prompt without turning off UAC? On 1/18/2010 4:30 PM, kevinp wrote: > I've written a program th...

Exchange Server 5.5 Help #2
Hello, Is there a way to set out of office reply on the email server rather than at the client's machine? because when the client's machine is off, no reply will be sent. I am using exchange server 5.5 with internet mail connector. Thank You leo7802@hotmail.com (Leo) wrote: >Hello, > >Is there a way to set out of office reply on the email server rather >than at the client's machine? because when the client's machine is >off, no reply will be sent. I am using exchange server 5.5 with >internet mail connector. > >Thank You Out Of Office messages are c...

Help with date format
Hello ! When I use this function =now()-1 it returns yesterdays date and time less one day in the format that I choose in the format menu. This is my problem. I want a formula like this. "ICSSA Daily Report For "&now()-1 I would like the result to be ICSSA Daily Report For 12-Aug-05 The result that I get is ICSSA Daily Report For 38575.50547 I need to format the date number for the date above but have not been able to figure out how to accomplish this. Many thanks Bob ="ICSSA Daily Report For "&TEXT(now()-1,"dd mmm yyyy hh:mm:ss") adjust the ...

Encrypt Content In XML
I will have security rights stored in XML data, and I just need the content of elements and/or attributes to be encrypted. When the dotnet application reads in the information, it would run a simple decryption on the data. I have one routine that does this, except is uses hexadecimal characters, so I need it to be valid characters for xml. Any routines out there to do this, encrypt and decrypt data that can be used in XML? Derek ...

Help with IF
Once again Hi to all of u. A1 contains date of purchase b1 contains date of sale & C1 contains the status. For eg. If i purchase a scrip on 9 Oct 2005 & sell it on the same date the C2 shows status as "Intraday" ,similarly if i Purchase a scrip on 9 Oct 2005 & sell it on 12 Oct 2005 the C column shows the status as "Sold".But if i buy a scrip on 9 Oct 2005 & sells it on 10 Oct 2005 the C column shows the status "Intraday".Similarly if I buy a scrip on 09 Oct 2005 & dont sell till present date the C column shows "Holding". For Eg...

Security Opinion (Needed)
Hello Everyone. Question. I have Exchange setup on an ISP that blocks 25. Set to 587. Thant's the normal part. In Outbound Security on the V-server and Connector we have to use and actuall ISP email accont (User Name), and the actual ISP password for that account, to get out bound relay. I've tried checking TLS, no joy. We auth to; "smtpauth.sbcglobal.net" How can I make sure the account and password is not floating around? I've tried a few things to encrypt, but no-joy. TLS, or any other form of encryption (like IPSec at the network layer if you will... ) will ...

T4 xml file
We are generating our xml file for electronic T4 filing. Does anyone know what we are to use for the Transmitter and Submission numbers? It appears that the Trans number can be blank or 000000 but when I look at our submission number from last year, I can't find anything that I'm supposed to use for this year (2009). It is not the same as the CRA web access number, I know that much. thanks, ...

How do I get Schema definition of an XML node in .NET ?
Hi, In .NET how do I get the underlying schema definition that corresponds to a particular XML node? This used to be easy in MSXML3.0 & MSXML4.0, using ... >>> IXmlDomNode.definition property. Is there a .NET equivalent to this method? I have pored through the object model, in vain. My web search & newsgroup searches did not surface an answer either. I appreciate your help in helping me out here. Thanks, -Naraen ~~~~~~~~~~~~~~~~~~~~~~~~~~ R.R. Naraendira Kumar Microsoft Certified Solution Developer ~~~~~~~~~~~~~~~~~~~~~~~~~~ There is no similar functionality ...

xml to flat file
Hi. Is there any way of using an xml schema file to a. validate the xml data then writing the xml out as a flat flat. For example in the schema it would say the element has a maximum length of 10 characters and therefore when it is written out as text the value is 10 characters ? <field1>hello</field1> <field2>all</field2> flat file would be hello_____all thanks ...

Help with formula!!
Hi I am hoping someone can help me. I have created a list of yes or no i a cell within my worksheet. In the neighbouring cell I want yes t represent 1 and no to represent 0. I need to numerics to update itsel if the list is ever changed from yes to no or visa versa - how do I d that -- apric ----------------------------------------------------------------------- aprice's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=2880 View this thread: http://www.excelforum.com/showthread.php?threadid=48491 aprice Wrote: > Hi > > I am hoping someone can help...

help. rotation shift pattern
Hi all please help. I am trying to rotate a shift pattern of 10 people. all names rotate down the list at the end of every week. How do i set up so when i put a date / week number in it shows me the list of names in the correct order. Please help regards Paul Perhaps one way .. experiment with this set-up .. In a sheet: Names ----------------------- Create a lookup table: Put in A1: Name1, copy down to A10 Enter the names of the 10 people in B1:B10, viz in A1:A10 .. Name1 John Name2 Mary Name3 Gina Name4 Robert Name5 Peter Name6 Sergio Name7 Jimmy Name8 Debra Name9 Dill Name10 Dave ...

HELP
I designed a simple card using some images I altered in another program. I rotated them in publisher in the way I wanted them. Every time I print black marks show up around the images like the guidelines I shut off on the program. In the advanced printing options I unchecked all the options, so it can't be that. Also, no lines are showing up in print preview. How can I get rid of these lines? >-----Original Message----- >I designed a simple card using some images I altered in another program. I >rotated them in publisher in the way I wanted them. Every time I print black ...

Complicated Formula help please
Hi All I have a brain teaser. I'm trying to make a formula which says : If E2 starts with "C" and J2 equals 1 or 11 , then put 5 , otherwise put J2 If E2 starts with "C" and J2 equals 2 , then put 6 , otherwise put J2 Can someone help with this? I'm grateful for any advice. I tried this : =IF(COUNTIF(E2,"C*")>0,J2,IF(J2=2,6,IF(OR(J2=1,J2=11),5,J2))) and this =IF(LEFT(E2)="C",J2,IF(J2=2,6,IF(OR(J2=1,J2=11),5,J2))) but neither give correct results :( Best Wishes "Colin Hayes" wrote: ...

HELP!! Publisher wont open file from previous version
I am using Windows 2000 (professional) and running Microsoft Publisher 2000. A colleague who uses Microsoft Publisher 2003 downsaved a file she had created to a Microsoft 2000 Publisher file and emailed it to me. When I try to open it, I still get the error message 'Publisher wont open file from previous version'. Please help Are either of you using Norton Anti-virus? -- JoAnn Paules MVP Microsoft [Publisher] "Working with publisher!!!!!!!!!!!!!!!!!!" <Working with publisher!!!!!!!!!!!!!!!!!!@discussions.microsoft.com> wrote in message news:91EE9633-B3C0-4A...

HELP! VC++/ADO connect & open a mdb problem!
Hi, I have a Mdb file on my WebPage http://www32.brinkster.com/atechcom/db/ClientDatabase.mdb 1) If I use strConnect = "URL=http://www32.brinkster.com/atechcom/db/ClientDataba se.mdb" or "provider=MSDAIPP.DSO;data source=http://www32.brinkster.com/atechcom/db/ClientDataba se.mdb" ... then I am able to connect to it ... but I could not open the table "Answer" in it (display error) 2) If I use the same database but in local computer strConnect = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\\ClientDatabase.mdb" ... then I can open the table &q...

Planner ID needs more than 3 characters (like Buyer ID)
SInce the planner ID is often used to break down commodities, 3 characters are often not enough. Also, some planners with the same 3 initials defaet the naming logic. ---------------- This post is a suggestion for Microsoft, and Microsoft responds to the suggestions with the most votes. To vote for this suggestion, click the "I Agree" button in the message pane. If you do not see the button, follow this link to open the suggestion in the Microsoft Web-based Newsreader and then click "I Agree" in the message pane. http://www.microsoft.com/Businesssolutions/Community...

Xml Serialization Intermittent Failure
We have an ASP.NET site that performs a lot of xml serialization. The serialization occurs in the lbolibrary dll. Occasionally we get an .out file produced in the Winnt\temp folder that contains the following: C:\WINNT\system32> "c:\winnt\microsoft.net\framework\v1.1.4322\csc.exe" /t:library /utf8output /R:"c:\winnt\assembly\gac\system.xml\1.0.5000.0__b77a5c561934e089\system.xml.dll" /R:"c:\winnt\assembly\gac\lbolibrary\1.0.0.0__30b57061a1ea7c52\lbolibrary.dll" /R:"c:\winnt\microsoft.net\framework\v1.1.4322\mscorlib.dll" /out:"C:\WINNT\TEMP\yx...

Script to call varibles from input file help please
Hi guys at the moment im using arrays to pull in iformation for the script but now i need to pull the info from an input file The text in the input file will be Servername\instance servername\instance etc and it would need too loop around to the EOF. This is what it looks like at the moment �** Define the SQL Instance names arrInst = Array(�Default�,�Instance2�,�Instance3�,�Instance4�,�Instance5�,�Instance6�,�Instance7�) '** Define Servename Array arrSvr = Array ("SeverName","SeverName","SeverName","SeverName","SeverNam...

Formula Help update do not answer 1st post
Forget 1st post Is there a formula so Cell A2 will enter in the following A if cell A1 = 1 B if A1 = 2 C if A1 =3 D if A1 = 4 Thanks in Advance =LOOKUP(A1,{1,2,3,4;"A","B","C","D"}) Courtesy Ken Puls. :) ************ Hope it helps! Anne Troy www.OfficeArticles.com "B.B" <me@mail.com> wrote in message news:scZyf.140699$tl.6111@pd7tw3no... > Forget 1st post > Is there a formula so Cell A2 will enter in the following > A if cell A1 = 1 > B if A1 = 2 > C if A1 =3 > D if A1 = 4 > Thanks in Advance > > You may...

Share Point Designer / Language Swedish
I have used FrontPage to develope my HomePage. Now I have installed Share Point Designer in a new computer and imported all contents to SPDesigner. Very good, but I am a Swede and use å ä ö Å Ä Ö. Instead for those letters i got percular signs instead . Could anybody help me så I can use it for the Swedish language. Why i cannot understand. In any other Those letters funciton in all other Office documents I use. You need to ask here: SharePoint Designer Forum: http://social.msdn.microsoft.com/Forums/en-US/sharepointcustomization/threads -- T...