• Outlines ?

    By Martin KraussSIT 2 decades ago

    Hello,

    I have used the example in the code bin XML-XSLT.nsf. 1. Question is the function to display outlines also in this project ? If yes how to use ?`

    If not I did not understand your entry how to make XML-VSLT.nsf release 6 compatible. You wrote you have to make all ther XML attributes in LoadViewDesign functions lowercase. I even do not find these functions.

    As you can see I am new to this themes so pls sorry for the stupid questions.



    Greetings Martin

    • Outlines

      By Martin Krauss 2 decades ago

      Hello Jack,

      I am still waiting for the possibility of transforming Outlines in version 6. Will this be available in the near future ? If not could you please give me a hint how to change the code myself ?



      Thanx Martin

    • Solution

      By Martin Krauss 2 decades ago

      Hi,

      since nobody wants to talk with me I think I found out the solution.

      In version 5 outline?readentries returns all XML tags and attributes in uppercase. Meanwhile version 6 the same command returns everything in lowercase. So I suppose that I have to altes the xsl files all to lowercase in version 6.



      Martin

    • Outline on Mozilla

      By Jose M Rodriguez 2 decades ago

      Hi Martin:



      Ok, I took the xml-xslt.nsf and 'tranlated' the outline style sheets to use lowercase (as outline xml is generated by Domino 6.x - outlineAlias?ReadEntries).



      It works gret on IE.

      To get a cross-browser solution (at least IE & Mozilla), I changed the xml tranformation using Activex to the JavaScript library Sarissa (from SourceForge.net).



      Using Sarissa, it still works great in IE, but in Mozilla I get a transformation error:

      Failed to transform document. (original exception: [Exception… "Node cannot be inserted at the specified point in the hierarchy" code: "3" nsresult: "0x80530003 (NS_ERROR_DOM_HIERARCHY_REQUEST_ERR)"



      Don't know why and haven't been able to solve it: I feel I'm pretty close to the cross-browser solution!!!



      For your information, here is the load_XML_XSLT function rewritten to use Sarissa in place of Activex:



      /*

      function load_XML_XSLT<br/>
      sXML - (string) required url of where the xml is located<br/>
      sXSL - (string) required url of where the xsl stylesheet is located<br/>
      arParms - (associative array) optional, used to pass arguments to the xsl stylesheet<br/>
      sId - (string) optional, the id of an element on the html page.  If passed then the results of the transform are placed there,<br/>
          if not passed then the results of the transform are returned as a string<br/>
      



      */

      function load_XML_XSLT (sXML, sXSL, arrayParms, sId) {

      //Uses the Sarissa javascript library from SourceForge<br/>
      var sXMLSource = unescape(sXML);<br/>
      var sXSLSource = unescape(sXSL);<br/>
      <br/>
      // get the source document<br/>
      var xmlDoc= Sarissa.getDomDocument();<br/>
      xmlDoc.async = false;<br/>
      xmlDoc.load(sXMLSource);<br/>
      


      // get the stylesheet document<br/>
      var xslDoc= Sarissa.getDomDocument();<br/>
      xslDoc.async = false;<br/>
      xslDoc.load(sXSLSource);<br/>
      


      // now let's add all the parms passed<br/>
      var success;<br/>
      var auxs;<br/>
      <br/>
      //success= Sarissa.setXslParameter(xslDoc, &quot;idPrefix&quot;, &quot;'outline'&quot;);<br/>
      for (param in arrayParms) {<br/>
          auxs= &quot;'&quot;+arrayParms[param]+&quot;'&quot;;<br/>
          success= Sarissa.setXslParameter(xslDoc, param, auxs);<br/>
          if(success){<br/>
          }else{<br/>
              alert(&quot;Parameter NOT set: &quot; + success);<br/>
          }<br/>
      }<br/>
      


      // if an id was passed to this function use it, otherwise return the results of the transform<br/>
      if ( typeof sId != &quot;undefined&quot;) {<br/>
         // transform and store the results to a string<br/>
          var sOutput= xmlDoc.transformNode(xslDoc);<br/>
          document.getElementById(sId).innerHTML = sOutput;<br/>
      }else {<br/>
         // transform and store the results to a string<br/>
          var sOutput= xmlDoc.transformNode(xslDoc);<br/>
          return(sOutput);<br/>
      }       <br/>
      

      }//load_XML_XSLT













      Any idea to make it work in Mozilla will be appreciated,

       José Manuel Rodríguez
      
      • re: Outline on Mozilla

        By Jack Ratcliff 2 decades ago

        This is really cool. Let me look into it and see what I can find out. I've been working on updating the design to work on both R5 and D6 servers. Hopefully, I'll get that posted soon.