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

Re: firefox problem

Expand Messages
  • Martin Honnen
    ... How does that responseText look then? Make sure you have your SVG elements in the proper namespace e.g. or
    Message 1 of 5 , May 3, 2005
    • 0 Attachment
      --- In svg-developers@yahoogroups.com, "Richard D. Spencer"
      <merdave@v...> wrote:
      > I'm trying to get my svg project working in FireFox.
      >
      >
      > 1. Using
      >
      > libUrl.getURL(sFilePath, function(resp){code...} and
      > var oSvgDocFrag = libXml.parseXML(resp.responseText);
      > var oDocFrag = libXml.importNode(oSvgDocFrag.firstChild, true);
      >
      > from "JavaScript O Lait" library (great semi-OOP).
      >
      > resp.responseText is the same (and correct)in both IE+Adobe6 and
      > FireFox

      How does that responseText look then? Make sure you have your SVG
      elements in the proper namespace e.g.
      <svg xmlns="http://www.w3.org/2000/svg"></svg>
      or
      <svg:svg xmlns:svg="http://www.w3.org/2000/svg"></svg:svg>
      otherwise Mozilla can't recognize them during parsing as SVG elements.
    • Richard D. Spencer
      1. the namespace is correct. 2. various declared svg files are loaded. Here is the first:
      Message 2 of 5 , May 3, 2005
      • 0 Attachment
        1. the namespace is correct.

        2. various declared svg files are loaded. Here is the first:

        <svg id="universalContainer">
        <svg id="widgetsContainer" pointer-events="visible"
        transform="matrix(1,0,0,1,0,0)" fill-opacity="0.4" >
        <rect id="backdrop" x="0" y="0" width="100%" height="100%"
        stroke="black" stroke-width="2" fill="lightblue" />
        </svg>
        </svg>

        responseText is an exact replication of the original file.

        Thanks for your time,
        Dave



        --- In svg-developers@yahoogroups.com, "Martin Honnen"
        <honnen_martin@y...> wrote:
        > --- In svg-developers@yahoogroups.com, "Richard D. Spencer"
        > <merdave@v...> wrote:
        > > I'm trying to get my svg project working in FireFox.
        > >
        > >
        > > 1. Using
        > >
        > > libUrl.getURL(sFilePath, function(resp){code...} and
        > > var oSvgDocFrag = libXml.parseXML(resp.responseText);
        > > var oDocFrag = libXml.importNode(oSvgDocFrag.firstChild, true);
        > >
        > > from "JavaScript O Lait" library (great semi-OOP).
        > >
        > > resp.responseText is the same (and correct)in both IE+Adobe6 and
        > > FireFox
        >
        > How does that responseText look then? Make sure you have your SVG
        > elements in the proper namespace e.g.
        > <svg xmlns="http://www.w3.org/2000/svg"></svg>
        > or
        > <svg:svg xmlns:svg="http://www.w3.org/2000/svg"></svg:svg>
        > otherwise Mozilla can't recognize them during parsing as SVG
        elements.
      • Martin Honnen
        ... But in that sample the namespace declaration is indeed missing, you need to have ...
        Message 3 of 5 , May 4, 2005
        • 0 Attachment
          --- In svg-developers@yahoogroups.com, "Richard D. Spencer"
          <merdave@v...> wrote:

          > 2. various declared svg files are loaded. Here is the first:
          >
          > <svg id="universalContainer">
          > <svg id="widgetsContainer" pointer-events="visible"
          > transform="matrix(1,0,0,1,0,0)" fill-opacity="0.4" >
          > <rect id="backdrop" x="0" y="0" width="100%" height="100%"
          > stroke="black" stroke-width="2" fill="lightblue" />
          > </svg>
          > </svg>
          >
          > responseText is an exact replication of the original file.

          But in that sample the namespace declaration is indeed missing, you
          need to have
          <svg xmlns="http://www.w3.org/2000/svg" id="universalContainer">
          ...
          </svg>
          to allow the XML parser to recognize the elements as SVG elements and
          not simply as arbitrary XML elements.
        • Richard D. Spencer
          That works! I thought that including the namespace in the root svg was enough: I was wrong. Thanks, Dave ... and
          Message 4 of 5 , May 4, 2005
          • 0 Attachment
            That works! I thought that including the namespace in the root svg
            was enough: I was wrong.

            Thanks,
            Dave



            --- In svg-developers@yahoogroups.com, "Martin Honnen"
            <honnen_martin@y...> wrote:
            > --- In svg-developers@yahoogroups.com, "Richard D. Spencer"
            > <merdave@v...> wrote:
            >
            > > 2. various declared svg files are loaded. Here is the first:
            > >
            > > <svg id="universalContainer">
            > > <svg id="widgetsContainer" pointer-events="visible"
            > > transform="matrix(1,0,0,1,0,0)" fill-opacity="0.4" >
            > > <rect id="backdrop" x="0" y="0" width="100%" height="100%"
            > > stroke="black" stroke-width="2" fill="lightblue" />
            > > </svg>
            > > </svg>
            > >
            > > responseText is an exact replication of the original file.
            >
            > But in that sample the namespace declaration is indeed missing, you
            > need to have
            > <svg xmlns="http://www.w3.org/2000/svg" id="universalContainer">
            > ...
            > </svg>
            > to allow the XML parser to recognize the elements as SVG elements
            and
            > not simply as arbitrary XML elements.
          Your message has been successfully submitted and would be delivered to recipients shortly.