## Xalan-C++ API Documentation

### The Xalan C++ XSLT Processor Version 1.9

Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

# URISupport.hpp

Go to the documentation of this file.

    00001 /*
    00002  * Copyright 1999-2004 The Apache Software Foundation.
    00003  *
    00004  * Licensed under the Apache License, Version 2.0 (the "License");
    00005  * you may not use this file except in compliance with the License.
    00006  * You may obtain a copy of the License at
    00007  *
    00008  *     http://www.apache.org/licenses/LICENSE-2.0
    00009  *
    00010  * Unless required by applicable law or agreed to in writing, software
    00011  * distributed under the License is distributed on an "AS IS" BASIS,
    00012  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    00013  * See the License for the specific language governing permissions and
    00014  * limitations under the License.
    00015  */
    00016 #if !defined(URISUPPORT_HEADER_GUARD_1357924680)
    00017 #define URISUPPORT_HEADER_GUARD_1357924680
    00018
    00019
    00020
    00021 // Base include file.  Must be first.
    00022 #include <xalanc/PlatformSupport/PlatformSupportDefinitions.hpp>
    00023
    00024
    00025
    00026 #include <xercesc/util/XMLURL.hpp>
    00027
    00028
    00029
    00030 #include <xalanc/XalanDOM/XalanDOMString.hpp>
    00031
    00032
    00033
    00034 #include <xalanc/Include/XalanAutoPtr.hpp>
    00035
    00036
    00037
    00038 #include <xalanc/PlatformSupport/XSLException.hpp>
    00039
    00040
    00041
    00042 XALAN_CPP_NAMESPACE_BEGIN
    00043
    00044
    00045
    00046 typedef XERCES_CPP_NAMESPACE_QUALIFIER XMLURL   XMLURLType;
    00047
    00048
    00049
    00050 class XALAN_PLATFORMSUPPORT_EXPORT URISupport
    00051 {
    00052 public:
    00053
    00054     typedef XalanAutoPtr<XMLURLType>    URLAutoPtrType;
    00055
    00062     static URLAutoPtrType
    00063     getURLFromString(const XalanDOMString&  urlString,
    00064                         MemoryManagerType&     theManager)
    00065     {
    00066         return getURLFromString(urlString.c_str(), theManager);
    00067     }
    00068
    00075     static void
    00076     getURLFromString(
    00077             const XalanDOMString&   urlString,
    00078             XMLURLType&             url,
    00079             MemoryManagerType&      theManager)
    00080     {
    00081         getURLFromString(urlString.c_str(), url, theManager);
    00082     }
    00083
    00090     static URLAutoPtrType
    00091     getURLFromString(const XalanDOMChar*        urlString,
    00092                         MemoryManagerType&     theManager);
    00093
    00100     static void
    00101     getURLFromString(
    00102             const XalanDOMChar*     urlString,
    00103             XMLURLType&             url,
    00104             MemoryManagerType&      theManager)
    00105     {
    00106         XalanDOMString buffer(theManager);
    00107
    00108         getURLStringFromString(urlString, buffer);
    00109
    00110         url.setURL(buffer.c_str());
    00111     }
    00112
    00120     static URLAutoPtrType
    00121     getURLFromString(
    00122             const XalanDOMString&   urlString,
    00123             const XalanDOMString&   base,
    00124             MemoryManagerType&  theManager)
    00125     {
    00126         XalanDOMString theResult(theManager);
    00127
    00128         getURLStringFromString(urlString, base, theResult);
    00129
    00130         return getURLFromString(theResult, theManager);
    00131     }
    00132
    00140     static URLAutoPtrType
    00141     getURLFromString(
    00142             const XalanDOMChar*     urlString,
    00143             const XalanDOMChar*     base);
    00144
    00145
    00152     static void
    00153     getURLStringFromString(
    00154             const XalanDOMString&   urlString,
    00155             XalanDOMString&         theNormalizedURI)
    00156     {
    00157         getURLStringFromString(urlString.c_str(), urlString.length(), theNormalizedURI);
    00158     }
    00159
    00160
    00167     static void
    00168     getURLStringFromString(
    00169             const XalanDOMChar*         urlString,
    00170             XalanDOMString&             theNormalizedURI)
    00171     {
    00172         assert(urlString != 0);
    00173
    00174         getURLStringFromString(
    00175             urlString,
    00176             XalanDOMString::length(urlString),
    00177             theNormalizedURI);
    00178     }
    00179
    00187     static void
    00188     getURLStringFromString(
    00189             const XalanDOMChar*         urlString,
    00190             XalanDOMString::size_type   len,
    00191             XalanDOMString&             theNormalizedURI);
    00192
    00200     static void
    00201     getURLStringFromString(
    00202             const XalanDOMString&   urlString,
    00203             const XalanDOMString&   base,
    00204             XalanDOMString&         theNormalizedURI)
    00205     {
    00206         getURLStringFromString(urlString.c_str(), base.c_str(), theNormalizedURI);
    00207     }
    00208
    00209
    00217     static void
    00218     getURLStringFromString(
    00219             const XalanDOMChar*     urlString,
    00220             const XalanDOMChar*     base,
    00221             XalanDOMString&         theNormalizedURI)
    00222     {
    00223         assert(urlString != 0 && base != 0);
    00224
    00225         getURLStringFromString(
    00226             urlString,
    00227             XalanDOMString::length(urlString),
    00228             base,
    00229             XalanDOMString::length(base),
    00230             theNormalizedURI);
    00231     }
    00232
    00240     static void
    00241     getURLStringFromString(
    00242             const XalanDOMChar*         urlString,
    00243             XalanDOMString::size_type   urlStringLen,
    00244             const XalanDOMChar*         base,
    00245             XalanDOMString::size_type   baseLen,
    00246             XalanDOMString&             theNormalizedURI);
    00247
    00255     static XalanDOMString&
    00256     NormalizeURIText(XalanDOMString&    uriString);
    00257
    00267     class InvalidURIException : public XSLException
    00268     {
    00269     public:
    00270
    00276         InvalidURIException(const XalanDOMString&   theMessage,
    00277                             MemoryManagerType&      theManager);
    00278
    00279         virtual
    00280         ~InvalidURIException();
    00281
    00282         virtual const XalanDOMChar*
    00283         getType() const
    00284         {
    00285             return m_type;
    00286         }
    00287
    00288     private:
    00289         static const XalanDOMChar   m_type[];
    00290     };
    00291
    00292
    00293     static const XalanDOMChar   s_fileProtocolString1[];
    00294
    00295     static const XalanDOMChar   s_fileProtocolString2[];
    00296 };
    00297
    00298
    00299
    00300 XALAN_CPP_NAMESPACE_END
    00301
    00302
    00303
    00304 #endif  // URISUPPORT_HEADER_GUARD_1357924680

Interpreting class diagrams

Doxygen and GraphViz are used to generate this API documentation from the Xalan-C header files.

Xalan-C++ XSLT Processor Version 1.9 Copyright © 1999-2004 The Apache Software Foundation. All Rights Reserved.