ReactOS 0.4.15-dev-5669-g09dde2c
xmlsave.c File Reference
#include "libxml.h"
#include <string.h>
#include <libxml/xmlmemory.h>
#include <libxml/parserInternals.h>
#include <libxml/tree.h>
#include <libxml/xmlsave.h>
#include <libxml/HTMLtree.h>
#include "buf.h"
#include "enc.h"
#include "save.h"
Include dependency graph for xmlsave.c:

Go to the source code of this file.

Macros

#define IN_LIBXML
 
#define MAX_INDENT   60
 
#define XHTML_STRICT_PUBLIC_ID
 
#define XHTML_STRICT_SYSTEM_ID
 
#define XHTML_FRAME_PUBLIC_ID
 
#define XHTML_FRAME_SYSTEM_ID
 
#define XHTML_TRANS_PUBLIC_ID
 
#define XHTML_TRANS_SYSTEM_ID
 
#define XHTML_NS_NAME   BAD_CAST "http://www.w3.org/1999/xhtml"
 

Functions

int xmlIsXHTML (const xmlChar *systemID, const xmlChar *publicID)
 

Macro Definition Documentation

◆ IN_LIBXML

#define IN_LIBXML

Definition at line 9 of file xmlsave.c.

◆ MAX_INDENT

#define MAX_INDENT   60

Definition at line 18 of file xmlsave.c.

◆ XHTML_FRAME_PUBLIC_ID

#define XHTML_FRAME_PUBLIC_ID
Value:
"-//W3C//DTD XHTML 1.0 Frameset//EN"
#define BAD_CAST
Definition: xmlstring.h:35

Definition at line 35 of file xmlsave.c.

◆ XHTML_FRAME_SYSTEM_ID

#define XHTML_FRAME_SYSTEM_ID
Value:
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd"

Definition at line 37 of file xmlsave.c.

◆ XHTML_NS_NAME

#define XHTML_NS_NAME   BAD_CAST "http://www.w3.org/1999/xhtml"

Definition at line 44 of file xmlsave.c.

◆ XHTML_STRICT_PUBLIC_ID

#define XHTML_STRICT_PUBLIC_ID
Value:
"-//W3C//DTD XHTML 1.0 Strict//EN"

Definition at line 31 of file xmlsave.c.

◆ XHTML_STRICT_SYSTEM_ID

#define XHTML_STRICT_SYSTEM_ID
Value:
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"

Definition at line 33 of file xmlsave.c.

◆ XHTML_TRANS_PUBLIC_ID

#define XHTML_TRANS_PUBLIC_ID
Value:
"-//W3C//DTD XHTML 1.0 Transitional//EN"

Definition at line 39 of file xmlsave.c.

◆ XHTML_TRANS_SYSTEM_ID

#define XHTML_TRANS_SYSTEM_ID
Value:
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"

Definition at line 41 of file xmlsave.c.

Function Documentation

◆ xmlIsXHTML()

int xmlIsXHTML ( const xmlChar systemID,
const xmlChar publicID 
)

xmlIsXHTML: @systemID: the system identifier @publicID: the public identifier

Try to find if the document correspond to an XHTML DTD

Returns 1 if true, 0 if not and -1 in case of error

Definition at line 55 of file xmlsave.c.

55 {
56 if ((systemID == NULL) && (publicID == NULL))
57 return(-1);
58 if (publicID != NULL) {
59 if (xmlStrEqual(publicID, XHTML_STRICT_PUBLIC_ID)) return(1);
60 if (xmlStrEqual(publicID, XHTML_FRAME_PUBLIC_ID)) return(1);
61 if (xmlStrEqual(publicID, XHTML_TRANS_PUBLIC_ID)) return(1);
62 }
63 if (systemID != NULL) {
64 if (xmlStrEqual(systemID, XHTML_STRICT_SYSTEM_ID)) return(1);
65 if (xmlStrEqual(systemID, XHTML_FRAME_SYSTEM_ID)) return(1);
66 if (xmlStrEqual(systemID, XHTML_TRANS_SYSTEM_ID)) return(1);
67 }
68 return(0);
69}
#define NULL
Definition: types.h:112
#define XHTML_TRANS_PUBLIC_ID
Definition: xmlsave.c:39
#define XHTML_FRAME_SYSTEM_ID
Definition: xmlsave.c:37
#define XHTML_STRICT_SYSTEM_ID
Definition: xmlsave.c:33
#define XHTML_FRAME_PUBLIC_ID
Definition: xmlsave.c:35
#define XHTML_TRANS_SYSTEM_ID
Definition: xmlsave.c:41
#define XHTML_STRICT_PUBLIC_ID
Definition: xmlsave.c:31
XMLPUBFUN int XMLCALL xmlStrEqual(const xmlChar *str1, const xmlChar *str2)
Definition: xmlstring.c:160