You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by bu...@apache.org on 2003/07/25 21:48:37 UTC

DO NOT REPLY [Bug 21893] New: - SystemIDResolver.isAbsoluteURI seems to be incorrect

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21893>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21893

SystemIDResolver.isAbsoluteURI seems to be incorrect

           Summary: SystemIDResolver.isAbsoluteURI seems to be incorrect
           Product: XalanJ2
           Version: CurrentCVS
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: org.apache.xalan.xsltc
        AssignedTo: xalan-dev@xml.apache.org
        ReportedBy: igorh@ca.ibm.com


isAbsoluteURI()
// If there is more than one character before the ':' character,
    // then it is considered to be an absolute URI

According to http://www.ietf.org/rfc/rfc2396.txt
relativeURI   = ( net_path | abs_path | rel_path ) [ "?" query ]
net_path      = "//" authority [ abs_path ]
authority     = server | reg_name
reg_name      = 1*( unreserved | escaped | "$" | "," |
                          ";" | ":" | "@" | "&" | "=" | "+" )

It means that relativeURI can have ':' which is not first character.

The correct implementation.

�Authors should be aware that a path segment which contains a colon
   character cannot be used as the first segment of a relative URI path
   (e.g., "this:that"), because it would be mistaken for a scheme name�
path_segments = segment *( "/" segment )

We should impalement SystemIDResolver.isRerativeURI()

 1.We should find first substring string before Fragment Identifier �#�.
(or end of the string).
 2. 1.We should find first substring string before query �?�.
(or end of the string).
We should find first substring string before first �/�  or end of the //string