blob: 757e2d5f57c0d06edea3707dfb4435104b91ff83 [file] [log] [blame]
Daniel Veillardb732a0e2000-10-15 11:27:01 +00001<HTML
2><HEAD
3><TITLE
4>uri</TITLE
5><META
6NAME="GENERATOR"
Daniel Veillardbed7b052001-05-19 14:59:49 +00007CONTENT="Modular DocBook HTML Stylesheet Version 1.59"><LINK
Daniel Veillardb732a0e2000-10-15 11:27:01 +00008REL="HOME"
9TITLE="Gnome XML Library Reference Manual"
10HREF="book1.html"><LINK
11REL="UP"
12TITLE="Libxml Library Reference"
13HREF="libxml-lib.html"><LINK
14REL="PREVIOUS"
15TITLE="valid"
Daniel Veillard9cb5ff42001-01-29 08:22:21 +000016HREF="libxml-valid.html"><LINK
Daniel Veillardb732a0e2000-10-15 11:27:01 +000017REL="NEXT"
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +000018TITLE="xmlerror"
19HREF="libxml-xmlerror.html"></HEAD
Daniel Veillardb732a0e2000-10-15 11:27:01 +000020><BODY
Daniel Veillardbed7b052001-05-19 14:59:49 +000021CLASS="REFENTRY"
Daniel Veillardb732a0e2000-10-15 11:27:01 +000022BGCOLOR="#FFFFFF"
23TEXT="#000000"
Daniel Veillard503b8932001-01-05 06:36:31 +000024LINK="#0000FF"
25VLINK="#840084"
26ALINK="#0000FF"
Daniel Veillardb732a0e2000-10-15 11:27:01 +000027><DIV
28CLASS="NAVHEADER"
29><TABLE
30WIDTH="100%"
31BORDER="0"
32BGCOLOR="#000000"
33CELLPADDING="1"
34CELLSPACING="0"
35><TR
36><TH
37COLSPAN="4"
38ALIGN="center"
39><FONT
40COLOR="#FFFFFF"
41SIZE="5"
42>Gnome XML Library Reference Manual</FONT
43></TH
44></TR
45><TR
46><TD
47WIDTH="25%"
48BGCOLOR="#C00000"
49ALIGN="left"
50><A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +000051HREF="libxml-valid.html"
Daniel Veillardb732a0e2000-10-15 11:27:01 +000052><FONT
53COLOR="#FFFFFF"
54SIZE="3"
55><B
56>&#60;&#60;&#60; Previous Page</B
57></FONT
58></A
59></TD
60><TD
61WIDTH="25%"
62BGCOLOR="#0000C0"
63ALIGN="center"
64><FONT
65COLOR="#FFFFFF"
66SIZE="3"
67><B
68><A
69HREF="book1.html"
70><FONT
71COLOR="#FFFFFF"
72SIZE="3"
73><B
74>Home</B
75></FONT
76></A
77></B
78></FONT
79></TD
80><TD
81WIDTH="25%"
82BGCOLOR="#00C000"
83ALIGN="center"
84><FONT
85COLOR="#FFFFFF"
86SIZE="3"
87><B
88><A
89HREF="libxml-lib.html"
90><FONT
91COLOR="#FFFFFF"
92SIZE="3"
93><B
94>Up</B
95></FONT
96></A
97></B
98></FONT
99></TD
100><TD
101WIDTH="25%"
102BGCOLOR="#C00000"
103ALIGN="right"
104><A
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +0000105HREF="libxml-xmlerror.html"
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000106><FONT
107COLOR="#FFFFFF"
108SIZE="3"
109><B
110>Next Page &#62;&#62;&#62;</B
111></FONT
112></A
113></TD
114></TR
115></TABLE
116></DIV
117><H1
Daniel Veillard503b8932001-01-05 06:36:31 +0000118><A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000119NAME="LIBXML-URI"
Daniel Veillard503b8932001-01-05 06:36:31 +0000120>uri</A
121></H1
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000122><DIV
123CLASS="REFNAMEDIV"
124><A
Daniel Veillardbed7b052001-05-19 14:59:49 +0000125NAME="AEN9689"
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000126></A
127><H2
128>Name</H2
Daniel Veillard503b8932001-01-05 06:36:31 +0000129>uri&nbsp;--&nbsp;</DIV
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000130><DIV
131CLASS="REFSYNOPSISDIV"
132><A
Daniel Veillardbed7b052001-05-19 14:59:49 +0000133NAME="AEN9692"
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000134></A
135><H2
136>Synopsis</H2
137><TABLE
138BORDER="0"
139BGCOLOR="#D6E8FF"
140WIDTH="100%"
141CELLPADDING="6"
142><TR
143><TD
144><PRE
145CLASS="SYNOPSIS"
146>&#13;
147
148struct <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000149HREF="libxml-uri.html#XMLURI"
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000150>xmlURI</A
151>;
152typedef <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000153HREF="libxml-uri.html#XMLURIPTR"
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000154>xmlURIPtr</A
155>;
156<A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000157HREF="libxml-uri.html#XMLURIPTR"
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000158>xmlURIPtr</A
159> <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000160HREF="libxml-uri.html#XMLCREATEURI"
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000161>xmlCreateURI</A
162> (void);
163<A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000164HREF="libxml-tree.html#XMLCHAR"
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000165>xmlChar</A
166>* <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000167HREF="libxml-uri.html#XMLBUILDURI"
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000168>xmlBuildURI</A
169> (const <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000170HREF="libxml-tree.html#XMLCHAR"
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000171>xmlChar</A
172> *URI,
173 const <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000174HREF="libxml-tree.html#XMLCHAR"
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000175>xmlChar</A
176> *base);
177<A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000178HREF="libxml-uri.html#XMLURIPTR"
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000179>xmlURIPtr</A
180> <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000181HREF="libxml-uri.html#XMLPARSEURI"
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000182>xmlParseURI</A
183> (const char *URI);
184int <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000185HREF="libxml-uri.html#XMLPARSEURIREFERENCE"
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000186>xmlParseURIReference</A
187> (<A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000188HREF="libxml-uri.html#XMLURIPTR"
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000189>xmlURIPtr</A
190> uri,
191 const char *str);
192<A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000193HREF="libxml-tree.html#XMLCHAR"
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000194>xmlChar</A
195>* <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000196HREF="libxml-uri.html#XMLSAVEURI"
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000197>xmlSaveUri</A
198> (<A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000199HREF="libxml-uri.html#XMLURIPTR"
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000200>xmlURIPtr</A
201> uri);
202void <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000203HREF="libxml-uri.html#XMLPRINTURI"
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000204>xmlPrintURI</A
205> (<GTKDOCLINK
Daniel Veillard503b8932001-01-05 06:36:31 +0000206HREF="FILE-CAPS"
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000207>FILE</GTKDOCLINK
208> *stream,
209 <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000210HREF="libxml-uri.html#XMLURIPTR"
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000211>xmlURIPtr</A
212> uri);
213char* <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000214HREF="libxml-uri.html#XMLURIUNESCAPESTRING"
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000215>xmlURIUnescapeString</A
216> (const char *str,
217 int len,
218 char *target);
219int <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000220HREF="libxml-uri.html#XMLNORMALIZEURIPATH"
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000221>xmlNormalizeURIPath</A
222> (char *path);
Daniel Veillard28929b22000-11-13 18:22:49 +0000223<A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000224HREF="libxml-tree.html#XMLCHAR"
Daniel Veillard28929b22000-11-13 18:22:49 +0000225>xmlChar</A
226>* <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000227HREF="libxml-uri.html#XMLURIESCAPE"
Daniel Veillard28929b22000-11-13 18:22:49 +0000228>xmlURIEscape</A
229> (const <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000230HREF="libxml-tree.html#XMLCHAR"
Daniel Veillard28929b22000-11-13 18:22:49 +0000231>xmlChar</A
232> *str);
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000233void <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000234HREF="libxml-uri.html#XMLFREEURI"
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000235>xmlFreeURI</A
236> (<A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000237HREF="libxml-uri.html#XMLURIPTR"
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000238>xmlURIPtr</A
239> uri);</PRE
240></TD
241></TR
242></TABLE
243></DIV
244><DIV
245CLASS="REFSECT1"
246><A
Daniel Veillardbed7b052001-05-19 14:59:49 +0000247NAME="AEN9720"
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000248></A
249><H2
250>Description</H2
251><P
252></P
253></DIV
254><DIV
255CLASS="REFSECT1"
256><A
Daniel Veillardbed7b052001-05-19 14:59:49 +0000257NAME="AEN9723"
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000258></A
259><H2
260>Details</H2
261><DIV
262CLASS="REFSECT2"
263><A
Daniel Veillardbed7b052001-05-19 14:59:49 +0000264NAME="AEN9725"
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000265></A
266><H3
267><A
268NAME="XMLURI"
269></A
270>struct xmlURI</H3
271><TABLE
272BORDER="0"
273BGCOLOR="#D6E8FF"
274WIDTH="100%"
275CELLPADDING="6"
276><TR
277><TD
278><PRE
279CLASS="PROGRAMLISTING"
280>struct xmlURI {
Daniel Veillardbed7b052001-05-19 14:59:49 +0000281 char *scheme; /* the URI scheme */
282 char *opaque; /* opaque part */
283 char *authority; /* the authority part */
284 char *server; /* the server part */
285 char *user; /* the user part */
286 int port; /* the port number */
287 char *path; /* the path string */
288 char *query; /* the query string */
289 char *fragment; /* the fragment identifier */
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000290};</PRE
291></TD
292></TR
293></TABLE
294><P
Daniel Veillardbed7b052001-05-19 14:59:49 +0000295>A parsed URI reference. This is a struct containing the various fields
296as described in RFC 2396 but separated for further processing</P
297><P
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000298></P
299></DIV
300><HR><DIV
301CLASS="REFSECT2"
302><A
Daniel Veillardbed7b052001-05-19 14:59:49 +0000303NAME="AEN9731"
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000304></A
305><H3
306><A
307NAME="XMLURIPTR"
308></A
309>xmlURIPtr</H3
310><TABLE
311BORDER="0"
312BGCOLOR="#D6E8FF"
313WIDTH="100%"
314CELLPADDING="6"
315><TR
316><TD
317><PRE
318CLASS="PROGRAMLISTING"
319>typedef xmlURI *xmlURIPtr;</PRE
320></TD
321></TR
322></TABLE
323><P
324></P
325></DIV
326><HR><DIV
327CLASS="REFSECT2"
328><A
Daniel Veillardbed7b052001-05-19 14:59:49 +0000329NAME="AEN9736"
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000330></A
331><H3
332><A
333NAME="XMLCREATEURI"
334></A
335>xmlCreateURI ()</H3
336><TABLE
337BORDER="0"
338BGCOLOR="#D6E8FF"
339WIDTH="100%"
340CELLPADDING="6"
341><TR
342><TD
343><PRE
344CLASS="PROGRAMLISTING"
345><A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000346HREF="libxml-uri.html#XMLURIPTR"
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000347>xmlURIPtr</A
348> xmlCreateURI (void);</PRE
349></TD
350></TR
351></TABLE
352><P
353>Simply creates an empty xmlURI</P
354><P
355></P
356><DIV
357CLASS="INFORMALTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +0000358><A
359NAME="AEN9743"
360></A
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000361><P
362></P
363><TABLE
364BORDER="0"
365WIDTH="100%"
366BGCOLOR="#FFD0D0"
367CELLSPACING="0"
368CELLPADDING="4"
369CLASS="CALSTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +0000370><TBODY
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000371><TR
372><TD
373WIDTH="20%"
374ALIGN="RIGHT"
375VALIGN="TOP"
376><I
377CLASS="EMPHASIS"
378>Returns</I
379> :</TD
380><TD
381WIDTH="80%"
382ALIGN="LEFT"
383VALIGN="TOP"
384>the new structure or NULL in case of error</TD
385></TR
Daniel Veillardbed7b052001-05-19 14:59:49 +0000386></TBODY
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000387></TABLE
388><P
389></P
390></DIV
391></DIV
392><HR><DIV
393CLASS="REFSECT2"
394><A
Daniel Veillardbed7b052001-05-19 14:59:49 +0000395NAME="AEN9752"
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000396></A
397><H3
398><A
399NAME="XMLBUILDURI"
400></A
401>xmlBuildURI ()</H3
402><TABLE
403BORDER="0"
404BGCOLOR="#D6E8FF"
405WIDTH="100%"
406CELLPADDING="6"
407><TR
408><TD
409><PRE
410CLASS="PROGRAMLISTING"
411><A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000412HREF="libxml-tree.html#XMLCHAR"
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000413>xmlChar</A
414>* xmlBuildURI (const <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000415HREF="libxml-tree.html#XMLCHAR"
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000416>xmlChar</A
417> *URI,
418 const <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000419HREF="libxml-tree.html#XMLCHAR"
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000420>xmlChar</A
421> *base);</PRE
422></TD
423></TR
424></TABLE
425><P
426>Computes he final URI of the reference done by checking that
427the given URI is valid, and building the final URI using the
428base URI. This is processed according to section 5.2 of the
429RFC 2396</P
430><P
431>5.2. Resolving Relative References to Absolute Form</P
432><P
433></P
434><DIV
435CLASS="INFORMALTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +0000436><A
437NAME="AEN9762"
438></A
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000439><P
440></P
441><TABLE
442BORDER="0"
443WIDTH="100%"
444BGCOLOR="#FFD0D0"
445CELLSPACING="0"
446CELLPADDING="4"
447CLASS="CALSTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +0000448><TBODY
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000449><TR
450><TD
451WIDTH="20%"
452ALIGN="RIGHT"
453VALIGN="TOP"
454><TT
455CLASS="PARAMETER"
456><I
457>URI</I
458></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +0000459>&nbsp;:</TD
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000460><TD
461WIDTH="80%"
462ALIGN="LEFT"
463VALIGN="TOP"
464> the URI instance found in the document</TD
465></TR
466><TR
467><TD
468WIDTH="20%"
469ALIGN="RIGHT"
470VALIGN="TOP"
471><TT
472CLASS="PARAMETER"
473><I
474>base</I
475></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +0000476>&nbsp;:</TD
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000477><TD
478WIDTH="80%"
479ALIGN="LEFT"
480VALIGN="TOP"
481> the base value</TD
482></TR
483><TR
484><TD
485WIDTH="20%"
486ALIGN="RIGHT"
487VALIGN="TOP"
488><I
489CLASS="EMPHASIS"
490>Returns</I
491> :</TD
492><TD
493WIDTH="80%"
494ALIGN="LEFT"
495VALIGN="TOP"
496>a new URI string (to be freed by the caller) or NULL in case
497of error.</TD
498></TR
Daniel Veillardbed7b052001-05-19 14:59:49 +0000499></TBODY
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000500></TABLE
501><P
502></P
503></DIV
504></DIV
505><HR><DIV
506CLASS="REFSECT2"
507><A
Daniel Veillardbed7b052001-05-19 14:59:49 +0000508NAME="AEN9779"
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000509></A
510><H3
511><A
512NAME="XMLPARSEURI"
513></A
514>xmlParseURI ()</H3
515><TABLE
516BORDER="0"
517BGCOLOR="#D6E8FF"
518WIDTH="100%"
519CELLPADDING="6"
520><TR
521><TD
522><PRE
523CLASS="PROGRAMLISTING"
524><A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000525HREF="libxml-uri.html#XMLURIPTR"
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000526>xmlURIPtr</A
527> xmlParseURI (const char *URI);</PRE
528></TD
529></TR
530></TABLE
531><P
532>Parse an URI </P
533><P
534>URI-reference = [ absoluteURI | relativeURI ] [ "#" fragment ]</P
535><P
536></P
537><DIV
538CLASS="INFORMALTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +0000539><A
540NAME="AEN9787"
541></A
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000542><P
543></P
544><TABLE
545BORDER="0"
546WIDTH="100%"
547BGCOLOR="#FFD0D0"
548CELLSPACING="0"
549CELLPADDING="4"
550CLASS="CALSTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +0000551><TBODY
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000552><TR
553><TD
554WIDTH="20%"
555ALIGN="RIGHT"
556VALIGN="TOP"
557><TT
558CLASS="PARAMETER"
559><I
560>URI</I
561></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +0000562>&nbsp;:</TD
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000563><TD
564WIDTH="80%"
565ALIGN="LEFT"
566VALIGN="TOP"
567>&nbsp;</TD
568></TR
569><TR
570><TD
571WIDTH="20%"
572ALIGN="RIGHT"
573VALIGN="TOP"
574><I
575CLASS="EMPHASIS"
576>Returns</I
577> :</TD
578><TD
579WIDTH="80%"
580ALIGN="LEFT"
581VALIGN="TOP"
582>a newly build xmlURIPtr or NULL in case of error</TD
583></TR
Daniel Veillardbed7b052001-05-19 14:59:49 +0000584></TBODY
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000585></TABLE
586><P
587></P
588></DIV
589></DIV
590><HR><DIV
591CLASS="REFSECT2"
592><A
Daniel Veillardbed7b052001-05-19 14:59:49 +0000593NAME="AEN9800"
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000594></A
595><H3
596><A
597NAME="XMLPARSEURIREFERENCE"
598></A
599>xmlParseURIReference ()</H3
600><TABLE
601BORDER="0"
602BGCOLOR="#D6E8FF"
603WIDTH="100%"
604CELLPADDING="6"
605><TR
606><TD
607><PRE
608CLASS="PROGRAMLISTING"
609>int xmlParseURIReference (<A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000610HREF="libxml-uri.html#XMLURIPTR"
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000611>xmlURIPtr</A
612> uri,
613 const char *str);</PRE
614></TD
615></TR
616></TABLE
617><P
618>Parse an URI reference string and fills in the appropriate fields
619of the <TT
620CLASS="PARAMETER"
621><I
622>uri</I
623></TT
624> structure</P
625><P
626>URI-reference = [ absoluteURI | relativeURI ] [ "#" fragment ]</P
627><P
628></P
629><DIV
630CLASS="INFORMALTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +0000631><A
632NAME="AEN9809"
633></A
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000634><P
635></P
636><TABLE
637BORDER="0"
638WIDTH="100%"
639BGCOLOR="#FFD0D0"
640CELLSPACING="0"
641CELLPADDING="4"
642CLASS="CALSTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +0000643><TBODY
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000644><TR
645><TD
646WIDTH="20%"
647ALIGN="RIGHT"
648VALIGN="TOP"
649><TT
650CLASS="PARAMETER"
651><I
652>uri</I
653></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +0000654>&nbsp;:</TD
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000655><TD
656WIDTH="80%"
657ALIGN="LEFT"
658VALIGN="TOP"
659> pointer to an URI structure</TD
660></TR
661><TR
662><TD
663WIDTH="20%"
664ALIGN="RIGHT"
665VALIGN="TOP"
666><TT
667CLASS="PARAMETER"
668><I
669>str</I
670></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +0000671>&nbsp;:</TD
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000672><TD
673WIDTH="80%"
674ALIGN="LEFT"
675VALIGN="TOP"
676> the string to analyze</TD
677></TR
678><TR
679><TD
680WIDTH="20%"
681ALIGN="RIGHT"
682VALIGN="TOP"
683><I
684CLASS="EMPHASIS"
685>Returns</I
686> :</TD
687><TD
688WIDTH="80%"
689ALIGN="LEFT"
690VALIGN="TOP"
691>0 or the error code</TD
692></TR
Daniel Veillardbed7b052001-05-19 14:59:49 +0000693></TBODY
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000694></TABLE
695><P
696></P
697></DIV
698></DIV
699><HR><DIV
700CLASS="REFSECT2"
701><A
Daniel Veillardbed7b052001-05-19 14:59:49 +0000702NAME="AEN9826"
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000703></A
704><H3
705><A
706NAME="XMLSAVEURI"
707></A
708>xmlSaveUri ()</H3
709><TABLE
710BORDER="0"
711BGCOLOR="#D6E8FF"
712WIDTH="100%"
713CELLPADDING="6"
714><TR
715><TD
716><PRE
717CLASS="PROGRAMLISTING"
718><A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000719HREF="libxml-tree.html#XMLCHAR"
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000720>xmlChar</A
721>* xmlSaveUri (<A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000722HREF="libxml-uri.html#XMLURIPTR"
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000723>xmlURIPtr</A
724> uri);</PRE
725></TD
726></TR
727></TABLE
728><P
729>Save the URI as an escaped string</P
730><P
731></P
732><DIV
733CLASS="INFORMALTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +0000734><A
735NAME="AEN9834"
736></A
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000737><P
738></P
739><TABLE
740BORDER="0"
741WIDTH="100%"
742BGCOLOR="#FFD0D0"
743CELLSPACING="0"
744CELLPADDING="4"
745CLASS="CALSTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +0000746><TBODY
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000747><TR
748><TD
749WIDTH="20%"
750ALIGN="RIGHT"
751VALIGN="TOP"
752><TT
753CLASS="PARAMETER"
754><I
755>uri</I
756></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +0000757>&nbsp;:</TD
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000758><TD
759WIDTH="80%"
760ALIGN="LEFT"
761VALIGN="TOP"
762> pointer to an xmlURI</TD
763></TR
764><TR
765><TD
766WIDTH="20%"
767ALIGN="RIGHT"
768VALIGN="TOP"
769><I
770CLASS="EMPHASIS"
771>Returns</I
772> :</TD
773><TD
774WIDTH="80%"
775ALIGN="LEFT"
776VALIGN="TOP"
777>a new string (to be deallocated by caller)</TD
778></TR
Daniel Veillardbed7b052001-05-19 14:59:49 +0000779></TBODY
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000780></TABLE
781><P
782></P
783></DIV
784></DIV
785><HR><DIV
786CLASS="REFSECT2"
787><A
Daniel Veillardbed7b052001-05-19 14:59:49 +0000788NAME="AEN9847"
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000789></A
790><H3
791><A
792NAME="XMLPRINTURI"
793></A
794>xmlPrintURI ()</H3
795><TABLE
796BORDER="0"
797BGCOLOR="#D6E8FF"
798WIDTH="100%"
799CELLPADDING="6"
800><TR
801><TD
802><PRE
803CLASS="PROGRAMLISTING"
804>void xmlPrintURI (<GTKDOCLINK
Daniel Veillard503b8932001-01-05 06:36:31 +0000805HREF="FILE-CAPS"
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000806>FILE</GTKDOCLINK
807> *stream,
808 <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000809HREF="libxml-uri.html#XMLURIPTR"
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000810>xmlURIPtr</A
811> uri);</PRE
812></TD
813></TR
814></TABLE
815><P
816>Prints the URI in the stream <TT
817CLASS="PARAMETER"
818><I
819>steam</I
820></TT
821>.</P
822><P
823></P
824><DIV
825CLASS="INFORMALTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +0000826><A
827NAME="AEN9856"
828></A
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000829><P
830></P
831><TABLE
832BORDER="0"
833WIDTH="100%"
834BGCOLOR="#FFD0D0"
835CELLSPACING="0"
836CELLPADDING="4"
837CLASS="CALSTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +0000838><TBODY
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000839><TR
840><TD
841WIDTH="20%"
842ALIGN="RIGHT"
843VALIGN="TOP"
844><TT
845CLASS="PARAMETER"
846><I
847>stream</I
848></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +0000849>&nbsp;:</TD
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000850><TD
851WIDTH="80%"
852ALIGN="LEFT"
853VALIGN="TOP"
854> a FILE* for the output</TD
855></TR
856><TR
857><TD
858WIDTH="20%"
859ALIGN="RIGHT"
860VALIGN="TOP"
861><TT
862CLASS="PARAMETER"
863><I
864>uri</I
865></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +0000866>&nbsp;:</TD
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000867><TD
868WIDTH="80%"
869ALIGN="LEFT"
870VALIGN="TOP"
871> pointer to an xmlURI</TD
872></TR
Daniel Veillardbed7b052001-05-19 14:59:49 +0000873></TBODY
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000874></TABLE
875><P
876></P
877></DIV
878></DIV
879><HR><DIV
880CLASS="REFSECT2"
881><A
Daniel Veillardbed7b052001-05-19 14:59:49 +0000882NAME="AEN9869"
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000883></A
884><H3
885><A
886NAME="XMLURIUNESCAPESTRING"
887></A
888>xmlURIUnescapeString ()</H3
889><TABLE
890BORDER="0"
891BGCOLOR="#D6E8FF"
892WIDTH="100%"
893CELLPADDING="6"
894><TR
895><TD
896><PRE
897CLASS="PROGRAMLISTING"
898>char* xmlURIUnescapeString (const char *str,
899 int len,
900 char *target);</PRE
901></TD
902></TR
903></TABLE
904><P
905>Unescaping routine, does not do validity checks !
906Output is direct unsigned char translation of <TT
907CLASS="LITERAL"
908>XX</TT
909> values (no encoding)</P
910><P
911></P
912><DIV
913CLASS="INFORMALTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +0000914><A
915NAME="AEN9876"
916></A
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000917><P
918></P
919><TABLE
920BORDER="0"
921WIDTH="100%"
922BGCOLOR="#FFD0D0"
923CELLSPACING="0"
924CELLPADDING="4"
925CLASS="CALSTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +0000926><TBODY
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000927><TR
928><TD
929WIDTH="20%"
930ALIGN="RIGHT"
931VALIGN="TOP"
932><TT
933CLASS="PARAMETER"
934><I
935>str</I
936></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +0000937>&nbsp;:</TD
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000938><TD
939WIDTH="80%"
940ALIGN="LEFT"
941VALIGN="TOP"
942> the string to unescape</TD
943></TR
944><TR
945><TD
946WIDTH="20%"
947ALIGN="RIGHT"
948VALIGN="TOP"
949><TT
950CLASS="PARAMETER"
951><I
952>len</I
953></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +0000954>&nbsp;:</TD
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000955><TD
956WIDTH="80%"
957ALIGN="LEFT"
958VALIGN="TOP"
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +0000959> the lenght in bytes to unescape (or &lt;= 0 to indicate full string)</TD
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000960></TR
961><TR
962><TD
963WIDTH="20%"
964ALIGN="RIGHT"
965VALIGN="TOP"
966><TT
967CLASS="PARAMETER"
968><I
969>target</I
970></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +0000971>&nbsp;:</TD
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000972><TD
973WIDTH="80%"
974ALIGN="LEFT"
975VALIGN="TOP"
976> optionnal destination buffer</TD
977></TR
978><TR
979><TD
980WIDTH="20%"
981ALIGN="RIGHT"
982VALIGN="TOP"
983><I
984CLASS="EMPHASIS"
985>Returns</I
986> :</TD
987><TD
988WIDTH="80%"
989ALIGN="LEFT"
990VALIGN="TOP"
991>an copy of the string, but unescaped</TD
992></TR
Daniel Veillardbed7b052001-05-19 14:59:49 +0000993></TBODY
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000994></TABLE
995><P
996></P
997></DIV
998></DIV
999><HR><DIV
1000CLASS="REFSECT2"
1001><A
Daniel Veillardbed7b052001-05-19 14:59:49 +00001002NAME="AEN9897"
Daniel Veillardb732a0e2000-10-15 11:27:01 +00001003></A
1004><H3
1005><A
1006NAME="XMLNORMALIZEURIPATH"
1007></A
1008>xmlNormalizeURIPath ()</H3
1009><TABLE
1010BORDER="0"
1011BGCOLOR="#D6E8FF"
1012WIDTH="100%"
1013CELLPADDING="6"
1014><TR
1015><TD
1016><PRE
1017CLASS="PROGRAMLISTING"
1018>int xmlNormalizeURIPath (char *path);</PRE
1019></TD
1020></TR
1021></TABLE
1022><P
Daniel Veillardd194dd22001-02-14 10:37:43 +00001023>Applies the 5 normalization steps to a path string--that is, RFC 2396
1024Section 5.2, steps 6.c through 6.g.</P
1025><P
1026>Normalization occurs directly on the string, no new allocation is done</P
Daniel Veillardb732a0e2000-10-15 11:27:01 +00001027><P
1028></P
1029><DIV
1030CLASS="INFORMALTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +00001031><A
1032NAME="AEN9904"
1033></A
Daniel Veillardb732a0e2000-10-15 11:27:01 +00001034><P
1035></P
1036><TABLE
1037BORDER="0"
1038WIDTH="100%"
1039BGCOLOR="#FFD0D0"
1040CELLSPACING="0"
1041CELLPADDING="4"
1042CLASS="CALSTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +00001043><TBODY
Daniel Veillardb732a0e2000-10-15 11:27:01 +00001044><TR
1045><TD
1046WIDTH="20%"
1047ALIGN="RIGHT"
1048VALIGN="TOP"
1049><TT
1050CLASS="PARAMETER"
1051><I
1052>path</I
1053></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00001054>&nbsp;:</TD
Daniel Veillardb732a0e2000-10-15 11:27:01 +00001055><TD
1056WIDTH="80%"
1057ALIGN="LEFT"
1058VALIGN="TOP"
1059> pointer to the path string</TD
1060></TR
1061><TR
1062><TD
1063WIDTH="20%"
1064ALIGN="RIGHT"
1065VALIGN="TOP"
1066><I
1067CLASS="EMPHASIS"
1068>Returns</I
1069> :</TD
1070><TD
1071WIDTH="80%"
1072ALIGN="LEFT"
1073VALIGN="TOP"
1074>0 or an error code</TD
1075></TR
Daniel Veillardbed7b052001-05-19 14:59:49 +00001076></TBODY
Daniel Veillardb732a0e2000-10-15 11:27:01 +00001077></TABLE
1078><P
1079></P
1080></DIV
1081></DIV
1082><HR><DIV
1083CLASS="REFSECT2"
1084><A
Daniel Veillardbed7b052001-05-19 14:59:49 +00001085NAME="AEN9917"
Daniel Veillard28929b22000-11-13 18:22:49 +00001086></A
1087><H3
1088><A
1089NAME="XMLURIESCAPE"
1090></A
1091>xmlURIEscape ()</H3
1092><TABLE
1093BORDER="0"
1094BGCOLOR="#D6E8FF"
1095WIDTH="100%"
1096CELLPADDING="6"
1097><TR
1098><TD
1099><PRE
1100CLASS="PROGRAMLISTING"
1101><A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +00001102HREF="libxml-tree.html#XMLCHAR"
Daniel Veillard28929b22000-11-13 18:22:49 +00001103>xmlChar</A
1104>* xmlURIEscape (const <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +00001105HREF="libxml-tree.html#XMLCHAR"
Daniel Veillard28929b22000-11-13 18:22:49 +00001106>xmlChar</A
1107> *str);</PRE
1108></TD
1109></TR
1110></TABLE
1111><P
1112>Escaping routine, does not do validity checks !
1113It will try to escape the chars needing this, but this is heuristic
1114based it's impossible to be sure.</P
1115><P
Daniel Veillardc7ad7ce2001-03-22 21:45:29 +00001116>TODO: make the proper implementation of this function by calling
1117<A
1118HREF="libxml-uri.html#XMLPARSEURIREFERENCE"
1119>xmlParseURIReference</A
1120>() and escaping each section accordingly
1121to the rules (c.f. bug 51876)</P
1122><P
Daniel Veillard28929b22000-11-13 18:22:49 +00001123></P
1124><DIV
1125CLASS="INFORMALTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +00001126><A
1127NAME="AEN9927"
1128></A
Daniel Veillard28929b22000-11-13 18:22:49 +00001129><P
1130></P
1131><TABLE
1132BORDER="0"
1133WIDTH="100%"
1134BGCOLOR="#FFD0D0"
1135CELLSPACING="0"
1136CELLPADDING="4"
1137CLASS="CALSTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +00001138><TBODY
Daniel Veillard28929b22000-11-13 18:22:49 +00001139><TR
1140><TD
1141WIDTH="20%"
1142ALIGN="RIGHT"
1143VALIGN="TOP"
1144><TT
1145CLASS="PARAMETER"
1146><I
1147>str</I
1148></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00001149>&nbsp;:</TD
Daniel Veillard28929b22000-11-13 18:22:49 +00001150><TD
1151WIDTH="80%"
1152ALIGN="LEFT"
1153VALIGN="TOP"
1154> the string of the URI to escape</TD
1155></TR
1156><TR
1157><TD
1158WIDTH="20%"
1159ALIGN="RIGHT"
1160VALIGN="TOP"
1161><I
1162CLASS="EMPHASIS"
1163>Returns</I
1164> :</TD
1165><TD
1166WIDTH="80%"
1167ALIGN="LEFT"
1168VALIGN="TOP"
1169>an copy of the string, but escaped</TD
1170></TR
Daniel Veillardbed7b052001-05-19 14:59:49 +00001171></TBODY
Daniel Veillard28929b22000-11-13 18:22:49 +00001172></TABLE
1173><P
1174></P
1175></DIV
1176></DIV
1177><HR><DIV
1178CLASS="REFSECT2"
1179><A
Daniel Veillardbed7b052001-05-19 14:59:49 +00001180NAME="AEN9940"
Daniel Veillardb732a0e2000-10-15 11:27:01 +00001181></A
1182><H3
1183><A
1184NAME="XMLFREEURI"
1185></A
1186>xmlFreeURI ()</H3
1187><TABLE
1188BORDER="0"
1189BGCOLOR="#D6E8FF"
1190WIDTH="100%"
1191CELLPADDING="6"
1192><TR
1193><TD
1194><PRE
1195CLASS="PROGRAMLISTING"
1196>void xmlFreeURI (<A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +00001197HREF="libxml-uri.html#XMLURIPTR"
Daniel Veillardb732a0e2000-10-15 11:27:01 +00001198>xmlURIPtr</A
1199> uri);</PRE
1200></TD
1201></TR
1202></TABLE
1203><P
1204>Free up the xmlURI struct</P
1205><P
1206></P
1207><DIV
1208CLASS="INFORMALTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +00001209><A
1210NAME="AEN9947"
1211></A
Daniel Veillardb732a0e2000-10-15 11:27:01 +00001212><P
1213></P
1214><TABLE
1215BORDER="0"
1216WIDTH="100%"
1217BGCOLOR="#FFD0D0"
1218CELLSPACING="0"
1219CELLPADDING="4"
1220CLASS="CALSTABLE"
Daniel Veillardbed7b052001-05-19 14:59:49 +00001221><TBODY
Daniel Veillardb732a0e2000-10-15 11:27:01 +00001222><TR
1223><TD
1224WIDTH="20%"
1225ALIGN="RIGHT"
1226VALIGN="TOP"
1227><TT
1228CLASS="PARAMETER"
1229><I
1230>uri</I
1231></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00001232>&nbsp;:</TD
Daniel Veillardb732a0e2000-10-15 11:27:01 +00001233><TD
1234WIDTH="80%"
1235ALIGN="LEFT"
1236VALIGN="TOP"
1237> pointer to an xmlURI</TD
1238></TR
Daniel Veillardbed7b052001-05-19 14:59:49 +00001239></TBODY
Daniel Veillardb732a0e2000-10-15 11:27:01 +00001240></TABLE
1241><P
1242></P
1243></DIV
1244></DIV
1245></DIV
1246><DIV
1247CLASS="NAVFOOTER"
1248><BR
1249CLEAR="all"><BR><TABLE
1250WIDTH="100%"
1251BORDER="0"
1252BGCOLOR="#000000"
1253CELLPADDING="1"
1254CELLSPACING="0"
1255><TR
1256><TD
1257WIDTH="25%"
1258BGCOLOR="#C00000"
1259ALIGN="left"
1260><A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +00001261HREF="libxml-valid.html"
Daniel Veillardb732a0e2000-10-15 11:27:01 +00001262><FONT
1263COLOR="#FFFFFF"
1264SIZE="3"
1265><B
1266>&#60;&#60;&#60; Previous Page</B
1267></FONT
1268></A
1269></TD
1270><TD
1271WIDTH="25%"
1272BGCOLOR="#0000C0"
1273ALIGN="center"
1274><FONT
1275COLOR="#FFFFFF"
1276SIZE="3"
1277><B
1278><A
1279HREF="book1.html"
1280><FONT
1281COLOR="#FFFFFF"
1282SIZE="3"
1283><B
1284>Home</B
1285></FONT
1286></A
1287></B
1288></FONT
1289></TD
1290><TD
1291WIDTH="25%"
1292BGCOLOR="#00C000"
1293ALIGN="center"
1294><FONT
1295COLOR="#FFFFFF"
1296SIZE="3"
1297><B
1298><A
1299HREF="libxml-lib.html"
1300><FONT
1301COLOR="#FFFFFF"
1302SIZE="3"
1303><B
1304>Up</B
1305></FONT
1306></A
1307></B
1308></FONT
1309></TD
1310><TD
1311WIDTH="25%"
1312BGCOLOR="#C00000"
1313ALIGN="right"
1314><A
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00001315HREF="libxml-xmlerror.html"
Daniel Veillardb732a0e2000-10-15 11:27:01 +00001316><FONT
1317COLOR="#FFFFFF"
1318SIZE="3"
1319><B
1320>Next Page &#62;&#62;&#62;</B
1321></FONT
1322></A
1323></TD
1324></TR
1325><TR
1326><TD
1327COLSPAN="2"
1328ALIGN="left"
1329><FONT
1330COLOR="#FFFFFF"
1331SIZE="3"
1332><B
1333>valid</B
1334></FONT
1335></TD
1336><TD
1337COLSPAN="2"
1338ALIGN="right"
1339><FONT
1340COLOR="#FFFFFF"
1341SIZE="3"
1342><B
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00001343>xmlerror</B
Daniel Veillardb732a0e2000-10-15 11:27:01 +00001344></FONT
1345></TD
1346></TR
1347></TABLE
1348></DIV
1349></BODY
1350></HTML
1351>