source: icXML/icXML-devel/src/xercesc/xinclude/XIncludeLocation.hpp @ 2722

Last change on this file since 2722 was 2722, checked in by cameron, 6 years ago

Original Xerces files with import mods for icxercesc

File size: 2.7 KB
Line 
1/*
2 * Licensed to the Apache Software Foundation (ASF) under one or more
3 * contributor license agreements.  See the NOTICE file distributed with
4 * this work for additional information regarding copyright ownership.
5 * The ASF licenses this file to You under the Apache License, Version 2.0
6 * (the "License"); you may not use this file except in compliance with
7 * the License.  You may obtain a copy of the License at
8 *
9 *      http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 */
17
18/*
19 * $Id: XIncludeLocation.hpp 655706 2008-05-13 01:08:39Z amassari $
20 */
21
22#if !defined(XERCESC_INCLUDE_GUARD_XINCLUDELOCATION_HPP)
23#define XERCESC_INCLUDE_GUARD_XINCLUDELOCATION_HPP
24
25#include <xercesc/util/XercesDefs.hpp>
26#include <xercesc/dom/DOM.hpp>
27
28XERCES_CPP_NAMESPACE_BEGIN
29
30
31/**
32  * Class for representing and manipulating the XMLCh * href's used
33  * by an xi:include element.
34  *
35  * This class is designed primarily for internal use. This class implements
36  * the functionality required to calculate relative hrefs and the base URI
37  * fixups required for performing XInclude functionality.
38  */
39class XINCLUDE_EXPORT XIncludeLocation
40{
41public:
42     /** Create an XIncludeLocation, primed with the supplied href
43      *
44      * @param href the initial URI value
45      *
46      * @return nothing
47      */
48    XIncludeLocation(const XMLCh *href);
49
50     /** Destructor
51      *
52      * @return nothing
53      */
54    ~XIncludeLocation();
55
56     /** Prepend the supplied href to the current location and modify the current XIncludeLocation's
57      * internal href field
58      *
59      * @param toPrepend the path to prepend
60      *
61      * @return the resultant compound URI
62      */
63    const XMLCh *prependPath(const XMLCh *toPrepend);
64
65     /** Get the current XIncludeLocation's compound URI location
66      *
67      * @return the current URI
68      */
69    const XMLCh *getLocation(){
70        return fHref;
71    };
72
73     /** Get a pointer to the end of the protocol section of a URI
74      *
75      * @param URI a URI to strip the protocol from
76      *
77      * @return a pointer into the supplied URI immediately after the last character of the protocol section
78      *            the pointer points to the first character after the protocol.
79      */
80    static const XMLCh *findEndOfProtocol(const XMLCh *URI);
81
82private:
83    const XMLCh *fHref;
84};
85
86XERCES_CPP_NAMESPACE_END
87
88#endif /* XINCLUDELOCATION_HPP */
89
Note: See TracBrowser for help on using the repository browser.