michael@0: /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #ifndef TRANSFRMX_URIUTILS_H michael@0: #define TRANSFRMX_URIUTILS_H michael@0: michael@0: #include "txCore.h" michael@0: michael@0: class nsIDocument; michael@0: class nsIDOMNode; michael@0: michael@0: /** michael@0: * A utility class for URI handling michael@0: * Not yet finished, only handles file URI at this point michael@0: **/ michael@0: michael@0: class URIUtils { michael@0: public: michael@0: michael@0: /** michael@0: * Reset the given document with the document of the source node michael@0: */ michael@0: static void ResetWithSource(nsIDocument *aNewDoc, nsIDOMNode *aSourceNode); michael@0: michael@0: /** michael@0: * Resolves the given href argument, using the given documentBase michael@0: * if necessary. michael@0: * The new resolved href will be appended to the given dest String michael@0: **/ michael@0: static void resolveHref(const nsAString& href, const nsAString& base, michael@0: nsAString& dest); michael@0: }; //-- URIUtils michael@0: michael@0: /* */ michael@0: #endif