OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Re: [xml-dev] URL resolution sanity check

[ Lists Home | Date Index | Thread Index ]

 From RFC 2396:

 >e) All occurrences of "<segment>/../", where <segment> is a complete 
path segment not equal to "..", are removed from the buffer string. 
Removal of these path segments is performed iteratively, removing the 
leftmost matching pattern on each iteration, until no matching pattern 
remains.

 >f) If the buffer string ends with "<segment>/..", where <segment> is a 
complete path segment not equal to "..", that
"<segment>/.." is removed.

Therefore, http://www.example.com/data/test.xml and yes. Is there some 
other part of the spec that raised this question? The "last segment is 
removed" part?

A base points to a document. If the name is missing, servers typically 
fill it in with a default. So a URI ending in "/" or "/.." or "/../" 
would be equivalent to "/default", "/../default" and "/../default", 
respectively, where "default" is usually something like "index.html". 
For instance, "http://xmlbuddy.com/2.0/rusty/.."; is resolved as 
"http://xmlbuddy.com/2.0/index.php"; but displayed in the browser as 
"http://xmlbuddy.com/2.0/";. Relative references from either form should 
work the same.

Bob Foster
http://xmlbuddy.com/

Elliotte Harold wrote:
 > I need to confirm something consider the following situation:
 >
 > <parent xml:base="http://www.example.com/data/limit/..";>
 >   <child xml:base="test.xml"/>
 > </parent>
 >
 > Is the base URL of the child element
 > http://www.example.com/data/limit/test.xml or
 > http://www.example.com/data/test.xml ?
 >
 > In other words, is http://www.example.com/data/limit/.. essentially the
 > same as http://www.example.com/data/limit/../ or not?
 >






 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS