java script interpreter

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • harish

    java script interpreter

    Hi,

    We are developing one application for smartphone. In this we are
    parsing XMLs and rendering it as UI elements using smartphone SDK.
    Everything is working fine. Now one more requirement has come. Java
    script will also be included in the XMLs. We are searching for java
    script interpreters so that we will give our script files to this
    interpreters as input andthe output buffer will be pure XML. We have
    got one java script interpreter, but it is not taking document.write
    kind of things. It is compiling plain functions.

    Can anyone help in this search for a java script interpreter for
    windows which supports document.write kind of things.


    regards
    harish
  • Vincent van Beveren

    #2
    Re: java script interpreter

    What do you use to send document to the smartphone, webserver?
    document.write is function specific for a webbrowser, therefor there
    is no standalone JavaScript interpreter that automatically supports
    document.write.

    What you could do is look into the MS scripting host.
    You can just make a myconverter.js file and use it to output parse
    the XML documents or you can let your webserver host ASP files. ASP
    has JavaScript support and it can output XML.

    If that is not what you want maybe you can explain clearer what it is
    that you want to do?

    Greetings,
    Vincent


    harish wrote:
    [color=blue]
    > Hi,
    >
    > We are developing one application for smartphone. In this we are
    > parsing XMLs and rendering it as UI elements using smartphone SDK.
    > Everything is working fine. Now one more requirement has come. Java
    > script will also be included in the XMLs. We are searching for java
    > script interpreters so that we will give our script files to this
    > interpreters as input andthe output buffer will be pure XML. We have
    > got one java script interpreter, but it is not taking document.write
    > kind of things. It is compiling plain functions.
    >
    > Can anyone help in this search for a java script interpreter for
    > windows which supports document.write kind of things.
    >
    >
    > regards
    > harish[/color]

    Comment

    • Lasse Reichstein Nielsen

      #3
      Re: java script interpreter

      harishksh@yahoo .com (harish) writes:
      [color=blue]
      > We are developing one application for smartphone. In this we are
      > parsing XMLs and rendering it as UI elements using smartphone SDK.
      > Everything is working fine. Now one more requirement has come. Java
      > script will also be included in the XMLs.[/color]

      For clarity: "Javascript " is in one word. It is not related to "Java".
      [color=blue]
      > We are searching for java script interpreters so that we will give
      > our script files to this interpreters as input andthe output buffer
      > will be pure XML.[/color]

      Pure Javascript (or rather: ECMAScript) doesn't have output
      capabilities. The language, as defined by the ECMA 262 v3 standard, is
      meant to be used in many different settings. The output capabilities
      of ECMAScript interpreters in browsers is provided by the runtime
      environment (aka. the DOM).
      [color=blue]
      > We have got one java script interpreter, but it is not taking
      > document.write kind of things. It is compiling plain functions.[/color]

      Then you should extend its environment with a host function that
      does the output when called.
      [color=blue]
      > Can anyone help in this search for a java script interpreter for
      > windows which supports document.write kind of things.[/color]

      Wikipedia has links to several Jevascript/ECMAScript implementations :
      <URL:http://en.wikipedia.or g/wiki/JavaScript#Usag e>
      but I doubt that is what you need. Just extend the runtime environment
      for the one you have.

      /L
      --
      Lasse Reichstein Nielsen - lrn@hotpop.com
      DHTML Death Colors: <URL:http://www.infimum.dk/HTML/rasterTriangleD OM.html>
      'Faith without judgement merely degrades the spirit divine.'

      Comment

      • Thomas 'PointedEars' Lahn

        #4
        Re: java script interpreter

        Vincent van Beveren wrote:[color=blue]
        > What do you use to send document to the smartphone, webserver?
        > document.write is function specific for a webbrowser,[/color]

        No. document.write( ) ist part of both client-side JavaScript up
        to version 1.3 and of server-side JavaScript up to version 1.4.
        Beyond CSJS 1.3, it is part of W3C DOM Level 1 and 2 HTML which
        is in no way restricted to Web browsers. There are more HTML
        UAs than Web browsers.
        [color=blue]
        > therefor there is no standalone JavaScript interpreter that
        > automatically supports document.write.[/color]

        Non sequitur.

        BTW: Your From header is invalid.


        PointedEars

        Comment

        • Thomas 'PointedEars' Lahn

          #5
          Re: java script interpreter

          Lasse Reichstein Nielsen wrote:[color=blue]
          > harishksh@yahoo .com (harish) writes:[color=green]
          >> We are developing one application for smartphone. In this we are
          >> parsing XMLs and rendering it as UI elements using smartphone SDK.
          >> Everything is working fine. Now one more requirement has come. Java
          >> script will also be included in the XMLs.[/color]
          >
          > For clarity: "Javascript " is in one word. It is not related to "Java".[/color]
          ^^^^^^^^^^[color=blue][color=green]
          >> We are searching for java script interpreters so that we will give
          >> our script files to this interpreters as input andthe output buffer
          >> will be pure XML.[/color]
          >
          > Pure Javascript (or rather: ECMAScript) doesn't have output
          > capabilities.[/color]

          JavaScript (note the case) is _not_ ECMAScript. JavaScript is an
          *implementation * of ECMAScript. Up to version 1.3 it contained
          client-side output capabilities that are further known to be part
          of a so-called "DOM Level 0", originating from DOM support back to
          Netscape 3 and IE 3. But those capabilities were and, as some of
          them are included in W3C DOM Level 1 and 2 HTML, intended for HTML
          and XHTML documents and UAs, namely Netscape Navigator considered
          an HTML UA, and most of them are not applicable to XML documents/
          DOMs and UAs.


          PointedEars

          Comment

          • Richard Cornford

            #6
            Re: java script interpreter

            Thomas 'PointedEars' Lahn wrote:[color=blue]
            > Lasse Reichstein Nielsen wrote:[/color]
            <snip>[color=blue][color=green]
            >> Pure Javascript (or rather: ECMAScript) doesn't have
            >> output capabilities.[/color]
            >
            > JavaScript (note the case) is _not_ ECMAScript.
            > JavaScript is an *implementation * of ECMAScript.[/color]
            <snip>

            It seems a bit pointless to be stating that Netscape's trademark name
            "JavaScript " applies to something specific and distinct in response to a
            post where the trademark name was never used.

            Richard.


            Comment

            • Lasse Reichstein Nielsen

              #7
              Re: java script interpreter

              Thomas 'PointedEars' Lahn <PointedEars@nu rfuerspam.de> writes:
              [color=blue]
              > Lasse Reichstein Nielsen wrote:[/color]
              [color=blue][color=green]
              >> Pure Javascript (or rather: ECMAScript) doesn't have output
              >> capabilities.[/color]
              >
              > JavaScript (note the case) is _not_ ECMAScript.[/color]

              I am very deliberate about the case. I write "JavaScript " when I mean
              Netscape's implementation and "Javascript " when I am talking about
              the mess of different implementations of ECMAScript in current use.

              I know it's a small difference in spelling, but I have found no better
              way to make the distinction and still be able to talk about "Javascript "
              in the abstract (like "Sure you can implement a countdown in Javascript
              for your web page").
              [color=blue]
              > JavaScript is an *implementation * of ECMAScript.[/color]

              Some versions are. Other versions predate ECMAScript v1. But I was not
              talking about "JavaScript ", but about implementations of ECMAScript
              (e.g., Core JavaScript, or "pure Javascript" as I allow myself to call
              it in non-technical terms).

              /L
              --
              Lasse Reichstein Nielsen - lrn@hotpop.com
              DHTML Death Colors: <URL:http://www.infimum.dk/HTML/rasterTriangleD OM.html>
              'Faith without judgement merely degrades the spirit divine.'

              Comment

              Working...