mkwan       2003/04/07 12:23:15

  Modified:    java/src/org/apache/xalan/xsltc/dom LoadDocument.java
                        SAXImpl.java
  Log:
  Fix for a few testcase failures in XSLTC trax.localPath.
  
  Detect the backslash ("\") character in the path in addtional to the
  forward slash ('/') in LoadDocument.document().
  
  The XSLTC conformance result in trax.localPath changed from
  Pass: 1634/Fail: 14/Errr: 35 to Pass: 1657/Fail: 17/Errr: 9
  after this change.
  
  Revision  Changes    Path
  1.15      +13 -4     
xml-xalan/java/src/org/apache/xalan/xsltc/dom/LoadDocument.java
  
  Index: LoadDocument.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/src/org/apache/xalan/xsltc/dom/LoadDocument.java,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- LoadDocument.java 1 Apr 2003 21:39:17 -0000       1.14
  +++ LoadDocument.java 7 Apr 2003 19:23:15 -0000       1.15
  @@ -192,7 +192,10 @@
   
            // Get the base of the current DOM's URI
            if (xmlURI != null) {
  -             final int sep = xmlURI.lastIndexOf('/') + 1;
  +             int sep = xmlURI.lastIndexOf('\\') + 1;
  +             if (sep <= 0) {
  +                 sep = xmlURI.lastIndexOf('/') + 1;
  +             }
                xmlURI = xmlURI.substring(0, sep); // could be empty string
            }
            else {
  @@ -201,7 +204,10 @@
   
            // Get the base of the current stylesheet's URI
            if (xslURI != null) {
  -             final int sep = xslURI.lastIndexOf('/') + 1;
  +             int sep = xslURI.lastIndexOf('\\') + 1;
  +             if (sep <= 0) {
  +                 sep = xslURI.lastIndexOf('/') + 1;
  +             }
                xslURI = xslURI.substring(0, sep); // could be empty string
            }
            else {
  @@ -235,7 +241,10 @@
                    // Get the URI from this node if no xml URI base is set
                    if ((xmlURI == null) || xmlURI.equals("")) {
                        xmlURI = dom.getDocumentURI(node);
  -                     final int sep = xmlURI.lastIndexOf('/') + 1;
  +                     int sep = xmlURI.lastIndexOf('\\') + 1;
  +                     if (sep <= 0) {
  +                         sep = xmlURI.lastIndexOf('/') + 1;
  +                     }
                        xmlURI = xmlURI.substring(0, sep);
                    }
                    // First try to load doc relative to current DOM
  
  
  
  1.5       +1 -2      
xml-xalan/java/src/org/apache/xalan/xsltc/dom/SAXImpl.java
  
  Index: SAXImpl.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/src/org/apache/xalan/xsltc/dom/SAXImpl.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- SAXImpl.java      4 Apr 2003 19:29:04 -0000       1.4
  +++ SAXImpl.java      7 Apr 2003 19:23:15 -0000       1.5
  @@ -75,7 +75,6 @@
   import org.apache.xalan.xsltc.TransletException;
   import org.apache.xalan.xsltc.runtime.BasisLibrary;
   import org.apache.xalan.xsltc.runtime.Hashtable;
  -import org.apache.xalan.xsltc.runtime.StringValueHandler;
   import org.apache.xml.dtm.DTM;
   import org.apache.xml.dtm.DTMAxisIterator;
   import org.apache.xml.dtm.DTMManager;
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to