• left nav not loading

    By mel a bryant 2 decades ago

    Downloaded the 0.38 version, but I'm still getting the following error on the left nav. Is there something I have missed?



    The XML page cannot be displayed

    Cannot view XML input using XSL style sheet. Please correct the error and then click the Refresh button, or try again later.





    ——————————————————————————–



    Missing equals sign between attribute and attribute value. Error processing resource 'http://dmail04.critech.com.au/dxlpeek...



    icaID="CA256EF900007D50" notesURL="notes://dmail04@Syd@CriTech/__CA256EF900007D50.nsf?OpenDatabase" httpURL="http://dmail04….

    • DbDir Left Nav

      By mac guidera 2 decades ago

      Mel:



      Sorry this is still causing problems for you.

      I'd like to trouble-shoot this with you offline, if you don't mind.

      Please email me at mac.guidera@s3consulting.com

      Thanks.

      –Mac

    • MSXML

      By Ian Sherwood 2 decades ago

      This is probably the MSXML bug. It appears that MSXML introduces whitespace after a transform operation. We'll take a look.



      Ian

    • By Steve Storey 2 decades ago

      I've had the same problems. I think it's to do with the size of the XML being generated. The DBDirectory XML file comes out at ~178k. It seems that the MSXML can only handle a certain line length, after which it just creates a new line for itself, halfway through the XML content. The fix for this is to append "\r\n" after each being written to the file.



      Also, I've changed my copy to also do a .replace('\"',' ') in the DB titles as that was causing me some trouble.



      MSXML also doesn't seem to like foreign characters in text.



      I can post the code changes in more detail if you like.



      regards,



      Steve.

      • Please post them

        By Ian Sherwood 2 decades ago

        You can either post the altered code here (as text) or just mail it to me (sherwoi at yahoodotcom) and we'll get it incorporated ASAP.



        Thanks for the help! This is why I love open source.



        Ian

      • Code

        By Steve Storey 2 decades ago

        Many apologies for the delay in posting this!



        In the DbDirXML agent:


        private String getDirectory( int intDbType ) {<br/>
                System.out.println(&quot;starting getDirectory&quot;);<br/>
            StringBuffer stbResultXml = new StringBuffer( &quot;&quot; ) ;<br/>
            try {       <br/>
                String strServer = dirDatabases.getName() ;<br/>
                if( strServer.compareTo( &quot;&quot; ) == 0 ) {<br/>
                    strServer = &quot;Local&quot; ;<br/>
                }//- end if, strServer.<br/>
            <br/>
                stbResultXml.append( &quot;&lt;dbdirectory server=\&quot;&quot; + strServer + &quot;\&quot;&gt;\r\n&quot; ) ;<br/>
        


                Database dbCurrent = dirDatabases.getFirstDatabase( intDbType ) ;<br/>
                Database dbNext = null ;<br/>
                while (dbCurrent != null) {<br/>
                   //-- If the database can be opened then get its info, if not, don't.<br/>
                    Utilities utilities = new Utilities() ;<br/>
                    stbResultXml.append( &quot;&lt;dbentry &quot; ) ;<br/>
                    stbResultXml.append( &quot; title=\&quot;&quot; + utilities.replaceSubString( dbCurrent.getTitle().replace( '\'', ' ' ).replace('\&quot;',' '), &quot;&amp;&quot;, &quot;&amp;amp;&quot; ) + &quot;\&quot;&quot; ) ;<br/>
                    stbResultXml.append( &quot; path=\&quot;&quot; + utilities.prepFileName( dbCurrent.getFilePath() ) + &quot;\&quot;&quot; ) ;<br/>
                    if ( !utilities.isFileNameValid( dbCurrent.getFilePath() ) ) {<br/>
                        stbResultXml.append( &quot; linkable=\&quot;false\&quot;&quot; ) ;<br/>
                    }<br/>
                    stbResultXml.append( &quot; replicaID=\&quot;&quot; + dbCurrent.getReplicaID() + &quot;\&quot;&quot; ) ;<br/>
                        <br/>
                    if( !dbCurrent.isOpen() ) {<br/>
                        try {<br/>
                            if( dbCurrent.open() ) {<br/>
                                if( dbCurrent.isOpen() ) {<br/>
                                    stbResultXml.append( &quot; notesURL=\&quot;&quot; + dbCurrent.getNotesURL() + &quot;\&quot;&quot; ) ;<br/>
                                    stbResultXml.append( &quot; httpURL=\&quot;&quot; + dbCurrent.getHttpURL() + &quot;\&quot;&quot; ) ;<br/>
                                }<br/>
                            }<br/>
                        } catch (NotesException e) { <br/>
                           // do nothing, just continue without the URL attributes<br/>
                        }<br/>
                    }<br/>
                    stbResultXml.append( &quot;/&gt;\r\n&quot; ) ;<br/>
                    <br/>
                    <br/>
                    dbNext = dirDatabases.getNextDatabase() ;<br/>
                    dbCurrent.recycle() ;<br/>
                    dbCurrent = dbNext ;<br/>
                }//- end while, dbCurrent.<br/>
                <br/>
                stbResultXml.append( &quot;&lt;/dbdirectory&gt;\r\n&quot; );    <br/>
        


            }//- end try.<br/>
            catch (NotesException e) {<br/>
                System.out.println(&quot;Notes Exception in getDirectory: &quot; + e.id + &quot; - &quot; + e.text);<br/>
                e.printStackTrace();<br/>
            }//- end catch, NotesException.<br/>
            catch (Exception e) {<br/>
                System.out.println(&quot;General Exception in getDirectory.&quot;);<br/>
                e.printStackTrace();<br/>
            }//- end catch, Exception.<br/>
            finally {<br/>
                return stbResultXml.toString() ; <br/>
            }//- end finally.<br/>
        }//- end method, getDirectory.<br/>
        



        In particular, note the lines:



        stbResultXml.append( " title=\"" + utilities.replaceSubString( dbCurrent.getTitle().replace( ''', ' ' ).replace('\"',' '), "&", "&amp;" ) + "\"" ) ;



        and



        stbResultXml.append( "/>\r\n" ) ;

        • Code added in 0.5

          By Ian Sherwood 2 decades ago

          Steve,



          Thanks again for your contribution. I added your changes to the code, re-tested, and posted release 0.5, so when you get a chance, please download the latest release and give it another try.



          Ian