no need trim because we do that when resolving relative paths anyway

This commit is contained in:
jez 2007-08-24 08:50:58 +00:00
parent 887e4d9003
commit 9a6a8e0a9c

View file

@ -59,7 +59,7 @@ public:
void setDocumentLocation(const stringT& loc)
{
bases_.push(std::make_pair(-1, trim(loc)));
bases_.push(std::make_pair(-1, loc));
} // setDocumentLocation
void startElement(const AttributesT& atts)
@ -69,7 +69,7 @@ public:
if(base.empty())
return;
stringT baseURI = absolutiseAndTrim(currentBase(), base);
stringT baseURI = absolutise(currentBase(), base);
bases_.push(std::make_pair(depth_, baseURI));
} // startElement
@ -99,21 +99,6 @@ private:
return string_adaptorT::construct_from_utf8(absolute.as_string().c_str());
} // absolutise
stringT absolutiseAndTrim(const stringT& baseURI, const stringT& location)
{
return trim(absolutise(baseURI, location));
} // absolutiseAndTrim
stringT trim(const stringT& location)
{
static const valueT FORWARD_SLASH = string_adaptorT::convert_from_utf8(Arabica::Unicode<char>::SLASH);
if(location[location.length()] == FORWARD_SLASH)
return location;
return location.substr(0, location.rfind(FORWARD_SLASH)+1);
} // trim
int currentDepth() const
{
if(!bases_.size())