[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: URL resolution sanity check
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? >
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|