/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * This file is part of the LibreOffice project. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * * This file incorporates work covered by the following license notice: * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed * with this work for additional information regarding copyright * ownership. The ASF licenses this file to you under the Apache * License, Version 2.0 (the "License"); you may not use this file * except in compliance with the License. You may obtain a copy of * the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
nStart = aFullName.indexOf( '=', nStart + nLen ) + 2; // after ="
nLen = aFullName.getLength() - RTL_CONSTASCII_LENGTH( "\">" ) - nStart;
rName.nspace = aFullName.copy( nStart, nLen );
} else
{ // this must not be a URI - WebDAVResponseParser must have converted it // to the "<prop:" form above
assert(rFullName.find(':') == ::std::u16string_view::npos); // Add our namespace to our own properties.
rName.nspace = "http://ucb.openoffice.org/dav/props/"_ostr;
rName.name =
OUStringToOString( rFullName,
RTL_TEXTENCODING_UTF8 );
}
}
if ( !aNameSpace.getLength() )
{ // Some servers send XML without proper namespaces. Assume "DAV:" // in this case, if name is a well-known dav property name. // Although this is not 100% correct, it solves many problems.
// Note: Concatenating strings BEFORE comparing against known namespaces // is important. See RFC 2815 ( 23.4.2 Meaning of Qualified Names ).
rFullName = aNameSpace;
rFullName += aName;
if ( rFullName.startsWith( "DAV:" ) )
{ // Okay, Just concat strings.
} elseif ( rFullName.startsWith( "http://apache.org/dav/props/" ) )
{ // Okay, Just concat strings.
} elseif ( rFullName.startsWith( "http://ucb.openoffice.org/dav/props/" ) )
{ // Remove namespace from our own properties.
rFullName = rFullName.copy(
RTL_CONSTASCII_LENGTH( "http://ucb.openoffice.org/dav/props/" ) );
} else
{ // Create property name that encodes, namespace and name ( XML ).
rFullName = ";
rFullName += aName;
rFullName += " xmlns:prop=\"";
rFullName += aNameSpace;
rFullName += "\">";
}
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.