Loading ...
Sorry, an error occurred while loading the content.

Re: [svg-developers] The language that SVG Scripts against

Expand Messages
  • Omar Abo-Namous
    ... Hi, had the same problem so i wrote a simple function to search through the kids of an element. Isn t really that complicated and it s by sure not a
    Message 1 of 7 , Jul 2, 2005
    • 0 Attachment
      kggsystem wrote:
      > Is there a reference to the Scripting language (and XML DOM) used by
      > the Adobe ASV3 viewer?
      >
      > I can be more specific. I have been trying to make calls on a node
      > like this
      >
      > Node.selectSingleNode("g/rect[@id='Francis']");
      >
      > E.g. I am trying to use XPath expressions and the ::selectSingleNode
      > API.
      >
      > It does not seem to work in the SVG DOM/Scripting implementation.
      >
      > Makes me wonder where is a(the) definitive reference to the
      > scripting language and XML DOM implementation used by SVG. If it is
      > not supported fine, but I find there are few methods available to
      > search the DOM tree for specific nodes.
      >
      > ::getElementByID is only callable from the Document object, so if
      > you are deeper down in the tree, and wnat to search even deeper it
      > seems like you're out of luck?

      Hi,
      had the same problem so i wrote a simple function to search through the
      kids of an element. Isn't really that complicated and it's by sure not a
      object-friendly way to do it, but hey..

      function getChildById(parentElement, childId)
      {
      var childElement = null;
      var children = parentElement.childNodes;

      for (var i=0; i<(children.length); i++)
      {
      if (children.item(i).id==childId)
      {
      childElement = children.item(i);
      break;
      }
      }
      return childElement;
      }

      cya.

      Omar

      >
      > Or am I out to lunch?
      >
      > Thanks
      > Kevin
      >
      >
      >
      >
      > -----
      > To unsubscribe send a message to: svg-developers-unsubscribe@yahoogroups.com
      > -or-
      > visit http://groups.yahoo.com/group/svg-developers and click "edit my membership"
      > ----
      > Yahoo! Groups Links
      >
      >
      >
      >
      >
      >
      >
    • Martin Honnen
      ... Yes, Adobe provides the documentation about the viewer and the DOM its implements here: so make use of
      Message 2 of 7 , Jul 2, 2005
      • 0 Attachment
        --- In svg-developers@yahoogroups.com, "kggsystem" <kevgor@s...> wrote:
        > Is there a reference to the Scripting language (and XML DOM) used by
        > the Adobe ASV3 viewer?

        Yes, Adobe provides the documentation about the viewer and the DOM its
        implements here:
        <http://www.adobe.com/svg/indepth/releasenotes.html>
        so make use of that.
        The DOM is documented in here:
        <http://www.adobe.com/svg/indepth/pdfs/CurrentSupport.pdf>

        The scripting language is JavaScript or JScript depending on the
        browser and the scripting engine used.
      • Alastair Fettes
        The following is part of the DOM and implemented by ASV 3: function foo( evt ) { var SVGDoc = evt.target.ownerDocument; var bar = SVGDoc.getElementById(
        Message 3 of 7 , Jul 4, 2005
        • 0 Attachment
          The following is part of the DOM and implemented by ASV 3:

          function foo( evt )
          {
          var SVGDoc = evt.target.ownerDocument;
          var bar = SVGDoc.getElementById( "SPARK" );
          }

          Basically if you have a reference to ANY element in the tree, you need
          to get its ownerDocument, then call getElementById on the owner document.

          Also, the language isn't jscript or javascript, its ecmascript. The
          best references that are non-viewer specific are found here:

          DOM Level 2:
          http://www.w3.org/TR/DOM-Level-2-Core/ecma-script-binding.html

          SVG DOM (* You will find the getElementById function here):
          http://www.w3.org/TR/SVG11/ecmascript-binding.html

          Note that Adobe has not implemented the entire DOM. You need to look
          through the release notes posted earlier on this thread to figure out
          what is and what isn't implemented.

          Cheers,
          Alastair
          http://spark.sourceforge.net

          --- In svg-developers@yahoogroups.com, Omar Abo-Namous
          <merlin12345@g...> wrote:
          > kggsystem wrote:
          > > Is there a reference to the Scripting language (and XML DOM) used by
          > > the Adobe ASV3 viewer?
          > >
          > > I can be more specific. I have been trying to make calls on a node
          > > like this
          > >
          > > Node.selectSingleNode("g/rect[@id='Francis']");
          > >
          > > E.g. I am trying to use XPath expressions and the ::selectSingleNode
          > > API.
          > >
          > > It does not seem to work in the SVG DOM/Scripting implementation.
          > >
          > > Makes me wonder where is a(the) definitive reference to the
          > > scripting language and XML DOM implementation used by SVG. If it is
          > > not supported fine, but I find there are few methods available to
          > > search the DOM tree for specific nodes.
          > >
          > > ::getElementByID is only callable from the Document object, so if
          > > you are deeper down in the tree, and wnat to search even deeper it
          > > seems like you're out of luck?
          >
          > Hi,
          > had the same problem so i wrote a simple function to search through the
          > kids of an element. Isn't really that complicated and it's by sure
          not a
          > object-friendly way to do it, but hey..
          >
          > function getChildById(parentElement, childId)
          > {
          > var childElement = null;
          > var children = parentElement.childNodes;
          >
          > for (var i=0; i<(children.length); i++)
          > {
          > if (children.item(i).id==childId)
          > {
          > childElement = children.item(i);
          > break;
          > }
          > }
          > return childElement;
          > }
          >
          > cya.
          >
          > Omar
          >
          > >
          > > Or am I out to lunch?
          > >
          > > Thanks
          > > Kevin
          > >
          > >
          > >
          > >
          > > -----
          > > To unsubscribe send a message to:
          svg-developers-unsubscribe@yahoogroups.com
          > > -or-
          > > visit http://groups.yahoo.com/group/svg-developers and click "edit
          my membership"
          > > ----
          > > Yahoo! Groups Links
          > >
          > >
          > >
          > >
          > >
          > >
          > >
        • svg3nius
          ... by ... its ... Has Adobe documented their ASV6 Preview Release in a similar fashion? Does anyone know where ASV6 SVG DOM support is documented (if it is
          Message 4 of 7 , Jul 7, 2005
          • 0 Attachment
            > > Is there a reference to the Scripting language (and XML DOM) used
            by
            > > the Adobe ASV3 viewer?
            >
            > Yes, Adobe provides the documentation about the viewer and the DOM
            its
            > implements here:
            > <http://www.adobe.com/svg/indepth/releasenotes.html>
            > so make use of that.
            > The DOM is documented in here:
            > <http://www.adobe.com/svg/indepth/pdfs/CurrentSupport.pdf>
            >
            > The scripting language is JavaScript or JScript depending on the
            > browser and the scripting engine used.

            Has Adobe documented their ASV6 Preview Release in a similar fashion?
            Does anyone know where ASV6 SVG DOM support is documented (if it is
            anywhere)?

            (My apologies if this posts twice... having some issues with Yahoo!
            Groups).

            Thanks in advance,
            Justin Voshell
          • Holger Will
            ... Hi Justin yes , ASV6 is also ducumented. look for the file implementation White Paper.html in your ASV6 installation directory, ( mostly in
            Message 5 of 7 , Jul 8, 2005
            • 0 Attachment
              svg3nius schrieb:

              > > > Is there a reference to the Scripting language (and XML DOM) used
              > by
              > > > the Adobe ASV3 viewer?
              > >
              > > Yes, Adobe provides the documentation about the viewer and the DOM
              > its
              > > implements here:
              > > <http://www.adobe.com/svg/indepth/releasenotes.html>
              > > so make use of that.
              > > The DOM is documented in here:
              > > <http://www.adobe.com/svg/indepth/pdfs/CurrentSupport.pdf>
              > >
              > > The scripting language is JavaScript or JScript depending on the
              > > browser and the scripting engine used.
              >
              > Has Adobe documented their ASV6 Preview Release in a similar fashion?
              > Does anyone know where ASV6 SVG DOM support is documented (if it is
              > anywhere)?
              >
              > (My apologies if this posts twice... having some issues with Yahoo!
              > Groups).
              >
              > Thanks in advance,
              > Justin Voshell
              >
              Hi Justin

              yes , ASV6 is also ducumented. look for the file "implementation White
              Paper.html" in your ASV6 installation directory, ( mostly in
              c:/programs/shared/SVG Viewer 6.0/ ).

              cheers
              Holger

              p.s.: i dont know if this paper is online anywhere.
            Your message has been successfully submitted and would be delivered to recipients shortly.