ReactOS 0.4.16-dev-306-g647d351
|
Go to the source code of this file.
Classes | |
struct | _xmlURI |
Typedefs | |
typedef struct _xmlURI | xmlURI |
typedef xmlURI * | xmlURIPtr |
Summary: library of generic URI related routines Description: library of generic URI related routines Implements RFC 2396
Copy: See Copyright for the status of this software.
Author: Daniel Veillard xmlURI:
A parsed URI reference. This is a struct containing the various fields as described in RFC 2396 but separated for further processing.
Note: query is a deprecated field which is incorrectly unescaped. query_raw takes precedence over query if the former is set. See: http://mail.gnome.org/archives/xml/2007-April/thread.html#00127
xmlBuildRelativeURI: @URI: the URI reference under consideration @base: the base value
Expresses the URI of the reference in terms relative to the base. Some examples of this operation include: base = "http://site1.com/docs/book1.html" URI input URI returned docs/pic1.gif pic1.gif docs/img/pic1.gif img/pic1.gif img/pic1.gif ../img/pic1.gif http://site1.com/docs/pic1.gif pic1.gif http://site2.com/docs/pic1.gif http://site2.com/docs/pic1.gif
base = "docs/book1.html" URI input URI returned docs/pic1.gif pic1.gif docs/img/pic1.gif img/pic1.gif img/pic1.gif ../img/pic1.gif http://site1.com/docs/pic1.gif http://site1.com/docs/pic1.gif
Note: if the URI reference is really weird or complicated, it may be worthwhile to first convert it into a "nice" one by calling xmlBuildURI (using 'base') before calling this routine, since this routine (for reasonable efficiency) assumes URI has already been through some validation.
Returns a new URI string (to be freed by the caller) or NULL in case error.
Definition at line 2173 of file uri.c.
xmlBuildURI: @URI: the URI instance found in the document @base: the base value
Computes he final URI of the reference done by checking that the given URI is valid, and building the final URI using the base URI. This is processed according to section 5.2 of the RFC 2396
5.2. Resolving Relative References to Absolute Form
Returns a new URI string (to be freed by the caller) or NULL in case of error.
Definition at line 1892 of file uri.c.
Referenced by xmlCreateEntityParserCtxtInternal(), xmlSAX2EntityDecl(), xmlSAX2ResolveEntity(), xmlSAX2UnparsedEntityDecl(), xsltDocumentElem(), xsltDocumentFunction(), xsltLoadStylesheetPI(), xsltParseStylesheetImport(), and xsltParseStylesheetInclude().
Definition at line 2380 of file uri.c.
Referenced by xmlCtxtResetPush(), xmlNewInputFromFile(), xmlPathToURI(), and xmlSAX2ExternalSubset().
xmlCreateURI:
Simply creates an empty xmlURI
Returns the new structure or NULL in case of error
Definition at line 1020 of file uri.c.
Referenced by xmlBuildRelativeURI(), xmlBuildURI(), xmlCanonicPath(), xmlParseURI(), xmlParseURIRaw(), xmlURIEscape(), and xsltCheckWrite().
xmlFreeURI: @uri: pointer to an xmlURI
Free up the xmlURI struct
Definition at line 1387 of file uri.c.
Referenced by xmlBuildURI(), xmlCanonicPath(), xmlParseEntityDecl(), xmlParseStartTag2(), xmlParseURI(), xmlParseURIRaw(), xmlPathToURI(), xmlURIEscape(), xsltCheckRead(), xsltCheckWrite(), xsltDocumentFunctionLoadDocument(), and xsltLoadStylesheetPI().
xmlNormalizeURIPath: @path: pointer to the path string
Applies the 5 normalization steps to a path string–that is, RFC 2396 Section 5.2, steps 6.c through 6.g.
Normalization occurs directly on the string, no new allocation is done
Returns 0 or an error code
Definition at line 1420 of file uri.c.
Referenced by xmlBuildURI().
xmlParseURI: @str: the URI string to analyze
Parse an URI based on RFC 3986
URI-reference = [ absoluteURI | relativeURI ] [ "#" fragment ]
Returns a newly built xmlURIPtr or NULL in case of error
Definition at line 940 of file uri.c.
Referenced by xmlCanonicPath(), xmlParseEntityDecl(), xmlParseStartTag2(), xmlPathToURI(), xsltCheckRead(), xsltCheckWrite(), xsltDocumentFunctionLoadDocument(), and xsltLoadStylesheetPI().
xmlParseURIRaw: @str: the URI string to analyze @raw: if 1 unescaping of URI pieces are disabled
Parse an URI but allows to keep intact the original fragments.
URI-reference = URI / relative-ref
Returns a newly built xmlURIPtr or NULL in case of error
xmlParseURIReference: @uri: pointer to an URI structure @str: the string to analyze
Parse an URI reference string based on RFC 3986 and fills in the appropriate fields of the @uri structure
URI-reference = URI / relative-ref
Returns 0 or the error code
Definition at line 970 of file uri.c.
Referenced by xmlBuildRelativeURI(), xmlBuildURI(), xmlParseURIRaw(), and xmlURIEscape().
xmlPathToURI: @path: the resource locator in a filesystem notation
Constructs an URI expressing the existing path
Returns a new URI, or a duplicate of the path parameter if the construction fails. The caller is responsible for freeing the memory occupied by the returned string. If there is insufficient memory available, or the argument is NULL, the function returns NULL.
Definition at line 2521 of file uri.c.
Referenced by xmlSAX2StartDocument().
xmlPrintURI: @stream: a FILE* for the output @uri: pointer to an xmlURI
Prints the URI in the stream @stream.
Definition at line 1340 of file uri.c.
xmlSaveUri: @uri: pointer to an xmlURI
Save the URI as an escaped string
Returns a new string (to be deallocated by caller)
Definition at line 1066 of file uri.c.
Referenced by xmlBuildURI(), xmlCanonicPath(), xmlPathToURI(), xmlPrintURI(), and xsltDocumentFunctionLoadDocument().
xmlURIEscape: @str: the string of the URI to escape
Escaping routine, does not do validity checks ! It will try to escape the chars needing this, but this is heuristic based it's impossible to be sure.
Returns an copy of the string, but escaped
25 May 2001 Uses xmlParseURI and xmlURIEscapeStr to try to escape correctly according to RFC2396.
Definition at line 1752 of file uri.c.
xmlURIEscapeStr: @str: string to escape @list: exception list string of chars not to escape
This routine escapes a string to hex, ignoring reserved characters (a-z) and the characters in the exception list.
Returns a new escaped string or NULL in case of error.
Definition at line 1679 of file uri.c.
Referenced by xmlCanonicPath(), xmlURIEscape(), and xsltDocumentElem().
xmlURIUnescapeString: @str: the string to unescape @len: the length in bytes to unescape (or <= 0 to indicate full string) @target: optional destination buffer
Unescaping routine, but does not check that the string is an URI. The output is a direct unsigned char translation of XX values (no encoding) Note that the length of the result can only be smaller or same size as the input string.
Returns a copy of the string, but unescaped, will return NULL only in case of error
Definition at line 1620 of file uri.c.
Referenced by xmlParse3986Fragment(), xmlParse3986Host(), xmlParse3986PathAbEmpty(), xmlParse3986PathAbsolute(), xmlParse3986PathNoScheme(), xmlParse3986PathRootless(), xmlParse3986Query(), and xmlParse3986Userinfo().