ReactOS 0.4.16-dev-2207-geb15453
xdr.c File Reference
#include <assert.h>
#include <libxml/tree.h>
#include "wine/debug.h"
Include dependency graph for xdr.c:

Go to the source code of this file.

Macros

#define FOREACH_CHILD(node, child)
 
#define FOREACH_ATTR(node, attr)    for (attr = node->properties; attr != NULL; attr = attr->next)
 
#define FOREACH_NS(node, ns)    for (ns = node->nsDef; ns != NULL; ns = ns->next)
 

Typedefs

typedef enum _CONTENT_TYPE CONTENT_TYPE
 
typedef enum _ORDER_TYPE ORDER_TYPE
 

Enumerations

enum  _CONTENT_TYPE { CONTENT_EMPTY , CONTENT_TEXTONLY , CONTENT_ELTONLY , CONTENT_MIXED }
 
enum  _ORDER_TYPE { ORDER_SEQ , ORDER_MANY , ORDER_ONE }
 

Functions

 WINE_DEFAULT_DEBUG_CHANNEL (msxml)
 
static xmlNodePtr get_schema (xmlNodePtr node)
 
static xmlNodePtr get_child (xmlNodePtr node, xmlChar const *name)
 
static xmlNodePtr get_child_with_attr (xmlNodePtr node, xmlChar const *name, xmlChar const *attr_ns, xmlChar const *attr_name, xmlChar const *attr_val)
 
static xmlNsPtr get_dt_ns (xmlNodePtr node)
 
static xmlCharget_dt_type (xmlNodePtr xdr)
 
static xmlCharget_attr_val (xmlAttrPtr attr)
 
static xmlNodePtr add_any_child (xmlNodePtr parent, BOOL set_occurs)
 
static xmlNodePtr add_anyAttribute_child (xmlNodePtr parent)
 
static xmlAttrPtr copy_prop_ignore_ns (xmlAttrPtr xdr_attr, xmlNodePtr node)
 
static xmlAttrPtr XDR_A_default (xmlAttrPtr xdr_attr, xmlNodePtr node)
 
static xmlAttrPtr XDR_A_dt_type (xmlAttrPtr xdr_attr, xmlNodePtr node)
 
static xmlAttrPtr XDR_A_maxOccurs (xmlAttrPtr xdr_attr, xmlNodePtr node)
 
static xmlAttrPtr XDR_A_minOccurs (xmlAttrPtr xdr_attr, xmlNodePtr node)
 
static xmlAttrPtr XDR_A_name (xmlAttrPtr xdr_attr, xmlNodePtr node)
 
static xmlAttrPtr XDR_A_type (xmlAttrPtr xdr_attr, xmlNodePtr node)
 
static xmlAttrPtr XDR_A_required (xmlAttrPtr xdr_attr, xmlNodePtr node)
 
static xmlNodePtr XDR_E_description (xmlNodePtr xdr, xmlNodePtr parent)
 
static xmlNodePtr XDR_E_AttributeType (xmlNodePtr xdr, xmlNodePtr parent)
 
static xmlNodePtr XDR_E_attribute (xmlNodePtr xdr, xmlNodePtr parent)
 
static xmlNodePtr XDR_E_element (xmlNodePtr xdr, xmlNodePtr parent)
 
static xmlNodePtr XDR_E_group (xmlNodePtr xdr, xmlNodePtr parent)
 
static xmlNodePtr XDR_E_ElementType (xmlNodePtr xdr, xmlNodePtr parent)
 
static xmlNodePtr XDR_E_Schema (xmlNodePtr xdr, xmlNodePtr parent, xmlChar const *nsURI)
 
xmlDocPtr XDR_to_XSD_doc (xmlDocPtr xdr_doc, xmlChar const *nsURI)
 

Variables

static const xmlChar DT_prefix [] = "dt"
 
static const xmlChar DT_href [] = "urn:schemas-microsoft-com:datatypes"
 
static const xmlChar XDR_href [] = "urn:schemas-microsoft-com:xml-data"
 
static const xmlChar XSD_prefix [] = "xsd"
 
static const xmlChar XSD_href [] = "http://www.w3.org/2001/XMLSchema"
 
static const xmlChar xs_all [] = "all"
 
static const xmlChar xs_annotation [] = "annotation"
 
static const xmlChar xs_any [] = "any"
 
static const xmlChar xs_anyAttribute [] = "anyAttribute"
 
static const xmlChar xs_attribute [] = "attribute"
 
static const xmlChar xs_AttributeType [] = "AttributeType"
 
static const xmlChar xs_base [] = "base"
 
static const xmlChar xs_choice [] = "choice"
 
static const xmlChar xs_complexType [] = "complexType"
 
static const xmlChar xs_content [] = "content"
 
static const xmlChar xs_datatype [] = "datatype"
 
static const xmlChar xs_default [] = "default"
 
static const xmlChar xs_description [] = "description"
 
static const xmlChar xs_documentation [] = "documentation"
 
static const xmlChar xs_element [] = "element"
 
static const xmlChar xs_ElementType [] = "ElementType"
 
static const xmlChar xs_eltOnly [] = "eltOnly"
 
static const xmlChar xs_enumeration [] = "enumeration"
 
static const xmlChar xs_extension [] = "extension"
 
static const xmlChar xs_group [] = "group"
 
static const xmlChar xs_lax [] = "lax"
 
static const xmlChar xs_length [] = "length"
 
static const xmlChar xs_many [] = "many"
 
static const xmlChar xs_maxOccurs [] = "maxOccurs"
 
static const xmlChar xs_minOccurs [] = "minOccurs"
 
static const xmlChar xs_mixed [] = "mixed"
 
static const xmlChar xs_model [] = "model"
 
static const xmlChar xs_name [] = "name"
 
static const xmlChar xs_namespace [] = "namespace"
 
static const xmlChar xs_no [] = "no"
 
static const xmlChar xs_open [] = "open"
 
static const xmlChar xs_optional [] = "optional"
 
static const xmlChar xs_order [] = "order"
 
static const xmlChar xs_processContents [] = "processContents"
 
static const xmlChar xs_ref [] = "ref"
 
static const xmlChar xs_required [] = "required"
 
static const xmlChar xs_restriction [] = "restriction"
 
static const xmlChar xs_schema [] = "schema"
 
static const xmlChar xs_seq [] = "seq"
 
static const xmlChar xs_sequence [] = "sequence"
 
static const xmlChar xs_simpleContent [] = "simpleContent"
 
static const xmlChar xs_simpleType [] = "simpleType"
 
static const xmlChar xs_strict [] = "strict"
 
static const xmlChar xs_targetNamespace [] = "targetNamespace"
 
static const xmlChar xs_textOnly [] = "textOnly"
 
static const xmlChar xs_true [] = "true"
 
static const xmlChar xs_type [] = "type"
 
static const xmlChar xs_unbounded [] = "unbounded"
 
static const xmlChar xs_use [] = "use"
 
static const xmlChar xs_value [] = "value"
 
static const xmlChar xs_values [] = "values"
 
static const xmlChar xs_xsd_string [] = "xsd:string"
 

Macro Definition Documentation

◆ FOREACH_ATTR

#define FOREACH_ATTR (   node,
  attr 
)     for (attr = node->properties; attr != NULL; attr = attr->next)

Definition at line 110 of file xdr.c.

◆ FOREACH_CHILD

#define FOREACH_CHILD (   node,
  child 
)
Value:
for (child = node->children; child != NULL; child = child->next) \
if (child->type == XML_ELEMENT_NODE)
#define NULL
Definition: types.h:112
static HWND child
Definition: cursoricon.c:298
Definition: dlist.c:348

Definition at line 106 of file xdr.c.

◆ FOREACH_NS

#define FOREACH_NS (   node,
  ns 
)     for (ns = node->nsDef; ns != NULL; ns = ns->next)

Definition at line 113 of file xdr.c.

Typedef Documentation

◆ CONTENT_TYPE

◆ ORDER_TYPE

Enumeration Type Documentation

◆ _CONTENT_TYPE

Enumerator
CONTENT_EMPTY 
CONTENT_TEXTONLY 
CONTENT_ELTONLY 
CONTENT_MIXED 

Definition at line 91 of file xdr.c.

92{
enum _CONTENT_TYPE CONTENT_TYPE
@ CONTENT_TEXTONLY
Definition: xdr.c:94
@ CONTENT_EMPTY
Definition: xdr.c:93
@ CONTENT_ELTONLY
Definition: xdr.c:95
@ CONTENT_MIXED
Definition: xdr.c:96

◆ _ORDER_TYPE

Enumerator
ORDER_SEQ 
ORDER_MANY 
ORDER_ONE 

Definition at line 99 of file xdr.c.

100{
101 ORDER_SEQ,
104} ORDER_TYPE;
@ ORDER_ONE
Definition: xdr.c:103
@ ORDER_MANY
Definition: xdr.c:102
@ ORDER_SEQ
Definition: xdr.c:101
enum _ORDER_TYPE ORDER_TYPE

Function Documentation

◆ add_any_child()

static xmlNodePtr add_any_child ( xmlNodePtr  parent,
BOOL  set_occurs 
)
inlinestatic

Definition at line 198 of file xdr.c.

199{
200 xmlNodePtr child = xmlNewChild(parent, NULL, xs_any, NULL);
201 if (set_occurs)
202 {
203 xmlSetProp(child, xs_minOccurs, BAD_CAST "0");
204 xmlSetProp(child, xs_maxOccurs, xs_unbounded);
205 }
206 xmlSetProp(child, xs_processContents, xs_strict);
207 return child;
208}
r parent
Definition: btrfs.c:3010
static const xmlChar xs_processContents[]
Definition: xdr.c:71
static const xmlChar xs_strict[]
Definition: xdr.c:80
static const xmlChar xs_maxOccurs[]
Definition: xdr.c:61
static const xmlChar xs_minOccurs[]
Definition: xdr.c:62
static const xmlChar xs_any[]
Definition: xdr.c:40
static const xmlChar xs_unbounded[]
Definition: xdr.c:85
#define BAD_CAST
Definition: xmlstring.h:35

Referenced by XDR_E_ElementType().

◆ add_anyAttribute_child()

static xmlNodePtr add_anyAttribute_child ( xmlNodePtr  parent)
inlinestatic

Definition at line 210 of file xdr.c.

211{
212 xmlNodePtr child = xmlNewChild(parent, NULL, xs_anyAttribute, NULL);
213 xmlSetProp(child, xs_processContents, xs_lax);
214 return child;
215}
static const xmlChar xs_lax[]
Definition: xdr.c:58
static const xmlChar xs_anyAttribute[]
Definition: xdr.c:41

Referenced by XDR_E_ElementType().

◆ copy_prop_ignore_ns()

static xmlAttrPtr copy_prop_ignore_ns ( xmlAttrPtr  xdr_attr,
xmlNodePtr  node 
)
inlinestatic

Definition at line 217 of file xdr.c.

218{
219 xmlChar* str = get_attr_val(xdr_attr);
220 xmlAttrPtr attr = xmlSetProp(node, xdr_attr->name, str);
221 xmlFree(str);
222 return attr;
223}
const WCHAR * str
xmlFreeFunc xmlFree
Definition: globals.c:184
Definition: cookie.c:202
static xmlChar * get_attr_val(xmlAttrPtr attr)
Definition: xdr.c:193
unsigned char xmlChar
Definition: xmlstring.h:28

Referenced by XDR_A_default(), XDR_A_maxOccurs(), XDR_A_minOccurs(), and XDR_A_name().

◆ get_attr_val()

static xmlChar * get_attr_val ( xmlAttrPtr  attr)
inlinestatic

Definition at line 193 of file xdr.c.

194{
195 return xmlNodeGetContent((xmlNodePtr)attr);
196}

Referenced by copy_prop_ignore_ns(), XDR_A_dt_type(), XDR_A_maxOccurs(), XDR_A_required(), and XDR_A_type().

◆ get_child()

static xmlNodePtr get_child ( xmlNodePtr  node,
xmlChar const name 
)
inlinestatic

Definition at line 121 of file xdr.c.

122{
123 xmlNodePtr child = NULL;
124 if (node)
125 {
127 {
128 if (xmlStrEqual(child->name, name))
129 break;
130 }
131 }
132
133 return child;
134}
Definition: name.c:39
#define FOREACH_CHILD(node, child)
Definition: xdr.c:106
XMLPUBFUN int xmlStrEqual(const xmlChar *str1, const xmlChar *str2)
Definition: xmlstring.c:162

Referenced by get_dt_type(), and XDR_E_ElementType().

◆ get_child_with_attr()

static xmlNodePtr get_child_with_attr ( xmlNodePtr  node,
xmlChar const name,
xmlChar const attr_ns,
xmlChar const attr_name,
xmlChar const attr_val 
)
inlinestatic

Definition at line 136 of file xdr.c.

139{
140 xmlChar* str;
141 if (node)
142 {
144 {
145 if (xmlStrEqual(node->name, name))
146 {
147 str = (attr_ns != NULL)? xmlGetNsProp(node, attr_name, attr_ns) :
148 xmlGetProp(node, attr_name);
149 if (str)
150 {
151 if (xmlStrEqual(str, attr_val))
152 {
153 xmlFree(str);
154 return node;
155 }
156 xmlFree(str);
157 }
158 }
159 }
160 }
161
162 return NULL;
163}

Referenced by XDR_E_attribute().

◆ get_dt_ns()

static xmlNsPtr get_dt_ns ( xmlNodePtr  node)
inlinestatic

Definition at line 165 of file xdr.c.

166{
167 xmlNsPtr ns;
168
170 assert(node != NULL);
171
173 {
174 if (xmlStrEqual(ns->href, DT_href))
175 break;
176 }
177
178 return ns;
179}
#define assert(_expr)
Definition: assert.h:32
Definition: mxnamespace.c:38
static xmlNodePtr get_schema(xmlNodePtr node)
Definition: xdr.c:116
#define FOREACH_NS(node, ns)
Definition: xdr.c:113
static const xmlChar DT_href[]
Definition: xdr.c:33

Referenced by XDR_A_dt_type(), XDR_E_AttributeType(), and XDR_E_ElementType().

◆ get_dt_type()

static xmlChar * get_dt_type ( xmlNodePtr  xdr)
inlinestatic

Definition at line 181 of file xdr.c.

182{
183 xmlChar* str = xmlGetNsProp(xdr, xs_type, DT_href);
184 if (!str)
185 {
186 xmlNodePtr datatype = get_child(xdr, xs_datatype);
187 if (datatype)
188 str = xmlGetNsProp(datatype, xs_type, DT_href);
189 }
190 return str;
191}
static const xmlChar xs_type[]
Definition: xdr.c:84
static xmlNodePtr get_child(xmlNodePtr node, xmlChar const *name)
Definition: xdr.c:121
static const xmlChar xs_datatype[]
Definition: xdr.c:48

Referenced by XDR_E_AttributeType(), and XDR_E_ElementType().

◆ get_schema()

static xmlNodePtr get_schema ( xmlNodePtr  node)
inlinestatic

Definition at line 116 of file xdr.c.

117{
118 return xmlDocGetRootElement(node->doc);
119}

Referenced by get_dt_ns(), and XDR_to_XSD_doc().

◆ WINE_DEFAULT_DEBUG_CHANNEL()

WINE_DEFAULT_DEBUG_CHANNEL ( msxml  )

◆ XDR_A_default()

static xmlAttrPtr XDR_A_default ( xmlAttrPtr  xdr_attr,
xmlNodePtr  node 
)
inlinestatic

Definition at line 224 of file xdr.c.

225{
226 TRACE("(%p, %p)\n", xdr_attr, node);
227
228 return copy_prop_ignore_ns(xdr_attr, node);
229}
#define TRACE(s)
Definition: solgame.cpp:4
static xmlAttrPtr copy_prop_ignore_ns(xmlAttrPtr xdr_attr, xmlNodePtr node)
Definition: xdr.c:217

Referenced by XDR_E_attribute(), and XDR_E_AttributeType().

◆ XDR_A_dt_type()

static xmlAttrPtr XDR_A_dt_type ( xmlAttrPtr  xdr_attr,
xmlNodePtr  node 
)
inlinestatic

Definition at line 231 of file xdr.c.

232{
233 xmlChar* str = get_attr_val(xdr_attr);
234 xmlAttrPtr attr;
235
236 TRACE("(%p, %p)\n", xdr_attr, node);
237
239 attr = NULL;
240 else
241 attr = xmlSetNsProp(node, get_dt_ns(node), DT_prefix, str);
242 xmlFree(str);
243 return attr;
244}
static const xmlChar xs_enumeration[]
Definition: xdr.c:55
static xmlNsPtr get_dt_ns(xmlNodePtr node)
Definition: xdr.c:165
static const xmlChar DT_prefix[]
Definition: xdr.c:32

Referenced by XDR_E_AttributeType(), and XDR_E_ElementType().

◆ XDR_A_maxOccurs()

static xmlAttrPtr XDR_A_maxOccurs ( xmlAttrPtr  xdr_attr,
xmlNodePtr  node 
)
static

Definition at line 246 of file xdr.c.

247{
248 xmlChar* str = get_attr_val(xdr_attr);
249 xmlAttrPtr attr;
250
251 TRACE("(%p, %p)\n", xdr_attr, node);
252
253 if (xmlStrEqual(str, BAD_CAST "*"))
254 attr = xmlSetProp(node, xs_maxOccurs, xs_unbounded);
255 else
256 attr = copy_prop_ignore_ns(xdr_attr, node);
257
258 xmlFree(str);
259 return attr;
260}

Referenced by XDR_E_element(), and XDR_E_group().

◆ XDR_A_minOccurs()

static xmlAttrPtr XDR_A_minOccurs ( xmlAttrPtr  xdr_attr,
xmlNodePtr  node 
)
inlinestatic

Definition at line 262 of file xdr.c.

263{
264 TRACE("(%p, %p)\n", xdr_attr, node);
265
266 return copy_prop_ignore_ns(xdr_attr, node);
267}

Referenced by XDR_E_element(), and XDR_E_group().

◆ XDR_A_name()

static xmlAttrPtr XDR_A_name ( xmlAttrPtr  xdr_attr,
xmlNodePtr  node 
)
inlinestatic

Definition at line 269 of file xdr.c.

270{
271 TRACE("(%p, %p)\n", xdr_attr, node);
272
273 return copy_prop_ignore_ns(xdr_attr, node);
274}

Referenced by XDR_E_AttributeType(), and XDR_E_ElementType().

◆ XDR_A_required()

static xmlAttrPtr XDR_A_required ( xmlAttrPtr  xdr_attr,
xmlNodePtr  node 
)
static

Definition at line 287 of file xdr.c.

288{
289 xmlChar* str = get_attr_val(xdr_attr);
290 xmlAttrPtr attr;
291
292 TRACE("(%p, %p)\n", xdr_attr, node);
293
294 if (xmlStrEqual(str, xs_no))
295 attr = xmlSetProp(node, xs_use, xs_optional);
296 else /* yes */
297 attr = xmlSetProp(node, xs_use, xs_required);
298 xmlFree(str);
299 return attr;
300}
static const xmlChar xs_optional[]
Definition: xdr.c:69
static const xmlChar xs_no[]
Definition: xdr.c:67
static const xmlChar xs_use[]
Definition: xdr.c:86
static const xmlChar xs_required[]
Definition: xdr.c:73

Referenced by XDR_E_attribute(), and XDR_E_AttributeType().

◆ XDR_A_type()

static xmlAttrPtr XDR_A_type ( xmlAttrPtr  xdr_attr,
xmlNodePtr  node 
)
static

Definition at line 276 of file xdr.c.

277{
278 xmlChar* str = get_attr_val(xdr_attr);
279 xmlAttrPtr attr = xmlSetProp(node, xs_ref, str);
280
281 TRACE("(%p, %p)\n", xdr_attr, node);
282
283 xmlFree(str);
284 return attr;
285}
static const xmlChar xs_ref[]
Definition: xdr.c:72

Referenced by XDR_E_attribute(), and XDR_E_element().

◆ XDR_E_attribute()

static xmlNodePtr XDR_E_attribute ( xmlNodePtr  xdr,
xmlNodePtr  parent 
)
static

Definition at line 394 of file xdr.c.

395{
396 xmlChar* str = xmlGetProp(xdr, xs_type);
397 xmlNodePtr xsd_node, xdr_child, xdr_attrType;
398 xmlAttrPtr xdr_attr;
399
400 TRACE("(%p, %p)\n", xdr, parent);
401
402 xdr_attrType = get_child_with_attr(xdr->parent, xs_AttributeType, NULL, xs_name, str);
403 xmlFree(str);
404
405 if (xdr_attrType)
406 xsd_node = XDR_E_AttributeType(xdr_attrType, parent);
407 else
408 xsd_node = xmlNewChild(parent, NULL, xs_attribute, NULL);
409
410 FOREACH_ATTR(xdr, xdr_attr)
411 {
412 if (xmlStrEqual(xdr_attr->name, xs_default))
413 XDR_A_default(xdr_attr, xsd_node);
414 else if (xmlStrEqual(xdr_attr->name, xs_type) && !xdr_attrType)
415 XDR_A_type(xdr_attr, xsd_node);
416 else if (xmlStrEqual(xdr_attr->name, xs_required))
417 XDR_A_required(xdr_attr, xsd_node);
418 else
419 xmlCopyProp(xsd_node, xdr_attr);
420 }
421
422 FOREACH_CHILD(xdr, xdr_child)
423 {
424 FIXME("unexpected child <%s>\n", xdr_child->name);
425 }
426
427 return xsd_node;
428}
#define FIXME(fmt,...)
Definition: precomp.h:53
static xmlAttrPtr XDR_A_required(xmlAttrPtr xdr_attr, xmlNodePtr node)
Definition: xdr.c:287
static xmlNodePtr get_child_with_attr(xmlNodePtr node, xmlChar const *name, xmlChar const *attr_ns, xmlChar const *attr_name, xmlChar const *attr_val)
Definition: xdr.c:136
#define FOREACH_ATTR(node, attr)
Definition: xdr.c:110
static const xmlChar xs_name[]
Definition: xdr.c:65
static xmlAttrPtr XDR_A_type(xmlAttrPtr xdr_attr, xmlNodePtr node)
Definition: xdr.c:276
static xmlNodePtr XDR_E_AttributeType(xmlNodePtr xdr, xmlNodePtr parent)
Definition: xdr.c:318
static const xmlChar xs_attribute[]
Definition: xdr.c:42
static const xmlChar xs_default[]
Definition: xdr.c:49
static xmlAttrPtr XDR_A_default(xmlAttrPtr xdr_attr, xmlNodePtr node)
Definition: xdr.c:224
static const xmlChar xs_AttributeType[]
Definition: xdr.c:43

Referenced by XDR_E_ElementType().

◆ XDR_E_AttributeType()

static xmlNodePtr XDR_E_AttributeType ( xmlNodePtr  xdr,
xmlNodePtr  parent 
)
static

Definition at line 318 of file xdr.c.

319{
320 xmlChar *str, *type = get_dt_type(xdr);
321 xmlNodePtr xsd_node, xsd_child, xdr_child;
322 xmlAttrPtr xdr_attr;
323
324 TRACE("(%p, %p)\n", xdr, parent);
325
326 xsd_node = xmlNewChild(parent, NULL, xs_attribute, NULL);
327
329 {
330 xmlChar *tmp, *tokBegin, *tokEnd = NULL;
331 xmlNodePtr xsd_enum;
332 xsd_child = xmlNewChild(xsd_node, NULL, xs_simpleType, NULL);
333 xsd_child = xmlNewChild(xsd_child, NULL, xs_restriction, NULL);
334 xmlSetProp(xsd_child, xs_base, xs_xsd_string);
335
336 tokBegin = str = xmlGetNsProp(xdr, xs_values, DT_href);
337 while (tokBegin && *tokBegin)
338 {
339 while (*tokBegin && isspace(*tokBegin))
340 ++tokBegin;
341 tokEnd = tokBegin;
342 while (*tokEnd && !isspace(*tokEnd))
343 ++tokEnd;
344 if (tokEnd == tokBegin)
345 break;
346 xsd_enum = xmlNewChild(xsd_child, NULL, xs_enumeration, NULL);
347 tmp = xmlStrndup(tokBegin, tokEnd-tokBegin);
348 xmlSetProp(xsd_enum, xs_value, tmp);
349 xmlFree(tmp);
350 tokBegin = tokEnd;
351 }
352 xmlFree(str);
353
354 }
355 else if (type)
356 {
358 str = xmlStrcat(str, BAD_CAST ":");
359 str = xmlStrcat(str, type);
360 xmlSetProp(xsd_node, xs_type, str);
361 xmlFree(str);
362 }
363 xmlFree(type);
364
365 FOREACH_ATTR(xdr, xdr_attr)
366 {
367 if (xmlStrEqual(xdr_attr->name, xs_default))
368 XDR_A_default(xdr_attr, xsd_node);
369 else if (xmlStrEqual(xdr_attr->name, xs_name))
370 XDR_A_name(xdr_attr, xsd_node);
371 else if (xmlStrEqual(xdr_attr->name, xs_type) && xdr_attr->ns == get_dt_ns(xdr))
372 XDR_A_dt_type(xdr_attr, xsd_node);
373 else if (xmlStrEqual(xdr_attr->name, xs_values) && xdr_attr->ns == get_dt_ns(xdr))
374 ; /* already handled */
375 else if (xmlStrEqual(xdr_attr->name, xs_required))
376 XDR_A_required(xdr_attr, xsd_node);
377 else
378 xmlCopyProp(xsd_node, xdr_attr);
379 }
380
381 FOREACH_CHILD(xdr, xdr_child)
382 {
383 if (xmlStrEqual(xdr_child->name, xs_datatype))
384 ; /* already handled */
385 else if (xmlStrEqual(xdr_child->name, xs_description))
386 XDR_E_description(xdr_child, xsd_node);
387 else
388 FIXME("unexpected child <%s>\n", xdr_child->name);
389 }
390
391 return xsd_node;
392}
#define isspace(c)
Definition: acclib.h:69
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
static const xmlChar xs_base[]
Definition: xdr.c:44
static const xmlChar xs_values[]
Definition: xdr.c:88
static const xmlChar xs_xsd_string[]
Definition: xdr.c:89
static xmlAttrPtr XDR_A_dt_type(xmlAttrPtr xdr_attr, xmlNodePtr node)
Definition: xdr.c:231
static const xmlChar xs_description[]
Definition: xdr.c:50
static const xmlChar xs_restriction[]
Definition: xdr.c:74
static xmlAttrPtr XDR_A_name(xmlAttrPtr xdr_attr, xmlNodePtr node)
Definition: xdr.c:269
static const xmlChar xs_simpleType[]
Definition: xdr.c:79
static const xmlChar xs_value[]
Definition: xdr.c:87
static xmlChar * get_dt_type(xmlNodePtr xdr)
Definition: xdr.c:181
static xmlNodePtr XDR_E_description(xmlNodePtr xdr, xmlNodePtr parent)
Definition: xdr.c:302
XMLPUBFUN xmlChar * xmlStrndup(const xmlChar *cur, int len)
Definition: xmlstring.c:45
XMLPUBFUN xmlChar * xmlStrcat(xmlChar *cur, const xmlChar *add)
Definition: xmlstring.c:524
XMLPUBFUN xmlChar * xmlStrdup(const xmlChar *cur)
Definition: xmlstring.c:69

Referenced by XDR_E_attribute(), and XDR_E_Schema().

◆ XDR_E_description()

static xmlNodePtr XDR_E_description ( xmlNodePtr  xdr,
xmlNodePtr  parent 
)
static

Definition at line 302 of file xdr.c.

303{
304 xmlNodePtr xsd_node = xmlNewChild(parent, NULL, xs_annotation, NULL);
305 xmlAttrPtr xdr_attr;
306
307 TRACE("(%p, %p)\n", xdr, parent);
308
309 xmlNewChild(xsd_node, NULL, xs_documentation, xdr->content);
310
311 FOREACH_ATTR(xdr, xdr_attr)
312 {
313 xmlCopyProp(xsd_node, xdr_attr);
314 }
315 return xsd_node;
316}
static const xmlChar xs_annotation[]
Definition: xdr.c:39
static const xmlChar xs_documentation[]
Definition: xdr.c:51

Referenced by XDR_E_AttributeType(), XDR_E_ElementType(), XDR_E_group(), and XDR_E_Schema().

◆ XDR_E_element()

static xmlNodePtr XDR_E_element ( xmlNodePtr  xdr,
xmlNodePtr  parent 
)
static

Definition at line 430 of file xdr.c.

431{
432 xmlNodePtr xdr_child, xsd_node = xmlNewChild(parent, NULL, xs_element, NULL);
433 xmlAttrPtr xdr_attr;
434
435 FOREACH_ATTR(xdr, xdr_attr)
436 {
437 if (xmlStrEqual(xdr_attr->name, xs_type))
438 XDR_A_type(xdr_attr, xsd_node);
439 else if (xmlStrEqual(xdr_attr->name, xs_maxOccurs))
440 XDR_A_maxOccurs(xdr_attr, xsd_node);
441 else if (xmlStrEqual(xdr_attr->name, xs_minOccurs))
442 XDR_A_minOccurs(xdr_attr, xsd_node);
443 else
444 xmlCopyProp(xsd_node, xdr_attr);
445 }
446
447 FOREACH_CHILD(xdr, xdr_child)
448 {
449 FIXME("unexpected child <%s>\n", xdr_child->name);
450 }
451
452 return xsd_node;
453}
static xmlAttrPtr XDR_A_minOccurs(xmlAttrPtr xdr_attr, xmlNodePtr node)
Definition: xdr.c:262
static xmlAttrPtr XDR_A_maxOccurs(xmlAttrPtr xdr_attr, xmlNodePtr node)
Definition: xdr.c:246
static const xmlChar xs_element[]
Definition: xdr.c:52

Referenced by XDR_E_ElementType(), and XDR_E_group().

◆ XDR_E_ElementType()

static xmlNodePtr XDR_E_ElementType ( xmlNodePtr  xdr,
xmlNodePtr  parent 
)
static

Definition at line 496 of file xdr.c.

497{
498 xmlChar *str, *type = get_dt_type(xdr);
499 BOOL is_open = TRUE;
500 int n_attributes = 0, n_elements = 0, n_groups = 0;
503 xmlNodePtr xsd_node, xsd_type, xsd_child, xdr_child;
504 xmlAttrPtr xdr_attr;
505 xmlNsPtr dt_ns = get_dt_ns(parent);
506
507 TRACE("(%p, %p)\n", xdr, parent);
508
509 str = xmlGetProp(xdr, xs_model);
510 if (str && !xmlStrEqual(str, xs_open))
511 is_open = FALSE;
512 xmlFree(str);
513
514 if (type)
515 {
517 }
518 else
519 {
520 str = xmlGetProp(xdr, xs_content);
521 if (!str || xmlStrEqual(str, xs_mixed))
523 else if (xmlStrEqual(str, xs_eltOnly))
525 else if (xmlStrEqual(str, xs_textOnly))
527 else /* empty */
529 xmlFree(str);
530 }
531
532 str = xmlGetProp(xdr, xs_order);
533 if (!str || xmlStrEqual(str, xs_seq))
534 {
536 }
537 else if (xmlStrEqual(str, xs_many))
538 {
540 }
541 else /* one */
542 {
544 is_open = FALSE;
545 }
546 xmlFree(str);
547
548 FOREACH_CHILD(xdr, xdr_child)
549 {
550 if (xmlStrEqual(xdr_child->name, xs_element))
551 ++n_elements;
552 else if (xmlStrEqual(xdr_child->name, xs_group))
553 ++n_groups;
554 else if (xmlStrEqual(xdr_child->name, xs_attribute))
555 ++n_attributes;
556 }
557
558 xsd_node = xmlNewChild(parent, NULL, xs_element, NULL);
559 assert(xsd_node != NULL);
560 switch (content)
561 {
562 case CONTENT_MIXED:
563 case CONTENT_ELTONLY:
564 {
565 xmlNodePtr xsd_base;
566 xsd_type = xmlNewChild(xsd_node, NULL, xs_complexType, NULL);
567
568 if (content == CONTENT_MIXED)
569 xmlSetProp(xsd_type, xs_mixed, xs_true);
570
571 if (is_open)
572 xsd_base = xmlNewChild(xsd_type, NULL, xs_sequence, NULL);
573 else
574 xsd_base = xsd_type;
575
576 if (is_open && n_elements < 2 && !n_groups)
577 {/* no specific sequence of elements we need,
578 just has to start with the right one, if any */
579 if ((xdr_child = get_child(xdr, xs_element)))
580 {
581 xsd_child = XDR_E_element(xdr_child, xsd_base);
582 xmlUnsetProp(xsd_child, xs_maxOccurs);
583 }
584 }
585 else
586 {
587 switch (order)
588 {
589 case ORDER_SEQ:
590 xsd_child = xmlNewChild(xsd_base, NULL, xs_sequence, NULL);
591 break;
592 case ORDER_MANY:
593 xsd_child = xmlNewChild(xsd_base, NULL, xs_choice, NULL);
594 xmlSetProp(xsd_child, xs_maxOccurs, xs_unbounded);
595 break;
596 case ORDER_ONE:
597 xsd_child = xmlNewChild(xsd_base, NULL, xs_all, NULL);
598 break;
599 }
600
601 FOREACH_CHILD(xdr, xdr_child)
602 {
603 if (xmlStrEqual(xdr_child->name, xs_element))
604 XDR_E_element(xdr_child, xsd_child);
605 else if (xmlStrEqual(xdr_child->name, xs_group))
606 XDR_E_group(xdr_child, xsd_child);
607 }
608 }
609
610 if (n_attributes)
611 {
612 FOREACH_CHILD(xdr, xdr_child)
613 {
614 if (xmlStrEqual(xdr_child->name, xs_attribute))
615 XDR_E_attribute(xdr_child, xsd_type);
616 }
617 }
618
619 if (is_open)
620 {
621 add_any_child(xsd_base, TRUE);
622 add_anyAttribute_child(xsd_type);
623 }
624 }
625 break;
626 case CONTENT_TEXTONLY:
627 {
628 if (is_open)
629 {
630 xsd_type = xmlNewChild(xsd_node, NULL, xs_complexType, NULL);
631 if (type)
632 {
633 xsd_child = xmlNewChild(xsd_type, NULL, xs_simpleContent, NULL);
634 xsd_child = xmlNewChild(xsd_child, NULL, xs_extension, NULL);
636 str = xmlStrcat(str, BAD_CAST ":");
637 str = xmlStrcat(str, type);
638 xmlSetProp(xsd_child, xs_base, str);
639 xmlFree(str);
640 assert(dt_ns != NULL);
641 xmlSetNsProp(xsd_node, dt_ns, DT_prefix, type);
642 }
643 else
644 {
645 xmlSetProp(xsd_type, xs_mixed, xs_true);
646 xsd_child = xmlNewChild(xsd_type, NULL, xs_choice, NULL);
647 xmlSetProp(xsd_child, xs_minOccurs, BAD_CAST "0");
648 xmlSetProp(xsd_child, xs_maxOccurs, xs_unbounded);
649 xsd_child = add_any_child(xsd_child, FALSE);
650 xmlSetProp(xsd_child, xs_namespace, BAD_CAST "##other");
651 xsd_child = xsd_type;
652 }
653
654 if (n_attributes)
655 FOREACH_CHILD(xdr, xdr_child)
656 {
657 if (xmlStrEqual(xdr_child->name, xs_attribute))
658 XDR_E_attribute(xdr_child, xsd_child);
659 }
660
661 xmlNewChild(xsd_child, NULL, xs_anyAttribute, NULL);
662 }
663 else if (!n_attributes)
664 {
665 if (type)
666 {
668 str = xmlStrcat(str, BAD_CAST ":");
669 str = xmlStrcat(str, type);
670 xmlSetProp(xsd_node, xs_type, str);
671 xmlFree(str);
672 str = NULL;
673 xmlSetNsProp(xsd_node, dt_ns, DT_prefix, type);
674 }
675 else
676 {
677 xmlSetProp(xsd_node, xs_type, xs_xsd_string);
678 }
679 }
680 else
681 {
682 xsd_type = xmlNewChild(xsd_node, NULL, xs_complexType, NULL);
683 xsd_child = xmlNewChild(xsd_type, NULL, xs_simpleContent, NULL);
684 xsd_child = xmlNewChild(xsd_child, NULL, xs_extension, NULL);
685 xmlSetProp(xsd_child, xs_base, xs_xsd_string);
686
687 FOREACH_CHILD(xdr, xdr_child)
688 {
689 if (xmlStrEqual(xdr_child->name, xs_attribute))
690 XDR_E_attribute(xdr_child, xsd_child);
691 }
692 }
693 }
694 break;
695 case CONTENT_EMPTY: /* not allowed with model="open" */
696 {
697 if (n_attributes)
698 {
699 xsd_type = xmlNewChild(xsd_node, NULL, xs_complexType, NULL);
700
701 FOREACH_CHILD(xdr, xdr_child)
702 {
703 if (xmlStrEqual(xdr_child->name, xs_attribute))
704 XDR_E_attribute(xdr_child, xsd_type);
705 }
706 }
707 else
708 {
709 xsd_type = xmlNewChild(xsd_node, NULL, xs_simpleType, NULL);
710 xsd_child = xmlNewChild(xsd_type, NULL, xs_restriction, NULL);
711 xmlSetProp(xsd_child, xs_base, xs_xsd_string);
712 xsd_child = xmlNewChild(xsd_child, NULL, xs_length, NULL);
713 xmlSetProp(xsd_child, xs_value, BAD_CAST "0");
714 }
715 }
716 break;
717 }
718 xmlFree(type);
719
720 FOREACH_ATTR(xdr, xdr_attr)
721 {
722 if (xmlStrEqual(xdr_attr->name, xs_content))
723 ; /* already handled */
724 else if (xmlStrEqual(xdr_attr->name, xs_name))
725 XDR_A_name(xdr_attr, xsd_node);
726 else if (xmlStrEqual(xdr_attr->name, xs_type) && xdr_attr->ns == get_dt_ns(xdr))
727 XDR_A_dt_type(xdr_attr, xsd_node);
728 else if (xmlStrEqual(xdr_attr->name, xs_model))
729 ; /* already handled */
730 else if (xmlStrEqual(xdr_attr->name, xs_order))
731 ; /* already handled */
732 else
733 xmlCopyProp(xsd_node, xdr_attr);
734
735 }
736
737 FOREACH_CHILD(xdr, xdr_child)
738 {
739 if (xmlStrEqual(xdr_child->name, xs_attribute))
740 ; /* already handled */
741 else if (xmlStrEqual(xdr_child->name, xs_AttributeType))
742 ; /* handled through XDR_E_attribute when parent is not <Schema> */
743 else if (xmlStrEqual(xdr_child->name, xs_datatype))
744 ; /* already handled */
745 else if (xmlStrEqual(xdr_child->name, xs_description))
746 XDR_E_description(xdr_child, xsd_node);
747 else if (xmlStrEqual(xdr_child->name, xs_element))
748 ; /* already handled */
749 else if (xmlStrEqual(xdr_child->name, xs_group))
750 ; /* already handled */
751 else
752 FIXME("unexpected child <%s>\n", xdr_child->name);
753 }
754
755 return xsd_node;
756}
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
content
Definition: atl_ax.c:994
unsigned int BOOL
Definition: ntddk_ex.h:94
GLuint GLdouble GLdouble GLint GLint order
Definition: glext.h:11194
static const xmlChar xs_open[]
Definition: xdr.c:68
static const xmlChar xs_true[]
Definition: xdr.c:83
static xmlNodePtr add_anyAttribute_child(xmlNodePtr parent)
Definition: xdr.c:210
static const xmlChar xs_extension[]
Definition: xdr.c:56
static const xmlChar xs_complexType[]
Definition: xdr.c:46
static const xmlChar xs_choice[]
Definition: xdr.c:45
static xmlNodePtr XDR_E_group(xmlNodePtr xdr, xmlNodePtr parent)
Definition: xdr.c:455
static const xmlChar xs_seq[]
Definition: xdr.c:76
static const xmlChar xs_simpleContent[]
Definition: xdr.c:78
static const xmlChar xs_mixed[]
Definition: xdr.c:63
static const xmlChar xs_order[]
Definition: xdr.c:70
static xmlNodePtr add_any_child(xmlNodePtr parent, BOOL set_occurs)
Definition: xdr.c:198
static const xmlChar xs_many[]
Definition: xdr.c:60
static const xmlChar xs_namespace[]
Definition: xdr.c:66
static const xmlChar xs_all[]
Definition: xdr.c:38
static const xmlChar xs_length[]
Definition: xdr.c:59
static const xmlChar xs_model[]
Definition: xdr.c:64
static xmlNodePtr XDR_E_element(xmlNodePtr xdr, xmlNodePtr parent)
Definition: xdr.c:430
static const xmlChar xs_content[]
Definition: xdr.c:47
static const xmlChar xs_group[]
Definition: xdr.c:57
static const xmlChar xs_textOnly[]
Definition: xdr.c:82
static const xmlChar xs_sequence[]
Definition: xdr.c:77
static const xmlChar xs_eltOnly[]
Definition: xdr.c:54
static xmlNodePtr XDR_E_attribute(xmlNodePtr xdr, xmlNodePtr parent)
Definition: xdr.c:394

Referenced by XDR_E_Schema().

◆ XDR_E_group()

static xmlNodePtr XDR_E_group ( xmlNodePtr  xdr,
xmlNodePtr  parent 
)
static

Definition at line 455 of file xdr.c.

456{
457 xmlNodePtr xdr_child, xsd_node;
458 xmlChar* str = xmlGetProp(xdr, xs_order);
459 xmlAttrPtr xdr_attr;
460
461 TRACE("(%p, %p)\n", xdr, parent);
462
463 if (!str || xmlStrEqual(str, xs_seq))
464 xsd_node = xmlNewChild(parent, NULL, xs_sequence, NULL);
465 else if (xmlStrEqual(str, xs_many))
466 xsd_node = xmlNewChild(parent, NULL, xs_choice, NULL);
467 else /* one */
468 xsd_node = xmlNewChild(parent, NULL, xs_all, NULL);
469 xmlFree(str);
470
471 FOREACH_ATTR(xdr, xdr_attr)
472 {
473 if (xmlStrEqual(xdr_attr->name, xs_order))
474 ; /* already handled */
475 else if (xmlStrEqual(xdr_attr->name, xs_model))
476 ; /* ignored */
477 else if (xmlStrEqual(xdr_attr->name, xs_maxOccurs))
478 XDR_A_maxOccurs(xdr_attr, xsd_node);
479 else if (xmlStrEqual(xdr_attr->name, xs_minOccurs))
480 XDR_A_minOccurs(xdr_attr, xsd_node);
481 else
482 xmlCopyProp(xsd_node, xdr_attr);
483 }
484
485 FOREACH_CHILD(xdr, xdr_child)
486 {
487 if (xmlStrEqual(xdr_child->name, xs_description))
488 XDR_E_description(xdr_child, xsd_node);
489 else if (xmlStrEqual(xdr_child->name, xs_element))
490 XDR_E_element(xdr_child, xsd_node);
491 }
492
493 return xsd_node;
494}

Referenced by XDR_E_ElementType().

◆ XDR_E_Schema()

static xmlNodePtr XDR_E_Schema ( xmlNodePtr  xdr,
xmlNodePtr  parent,
xmlChar const nsURI 
)
static

Definition at line 758 of file xdr.c.

759{
760 xmlNodePtr xsd_node, xdr_child;
761 xmlNsPtr ns, xdr_ns;
762 xmlAttrPtr xdr_attr;
763
764 TRACE("(%p, %p)\n", xdr, parent);
765
766 xsd_node = xmlNewDocNode((xmlDocPtr)parent, NULL, xs_schema, NULL);
767 xmlDocSetRootElement((xmlDocPtr)parent, xsd_node);
768 assert(xsd_node != NULL);
769
770 if (nsURI && *nsURI) xmlNewNs(xsd_node, nsURI, NULL);
771 ns = xmlNewNs(xsd_node, XSD_href, XSD_prefix);
772 assert(ns != NULL);
773
774 xmlSetNs(xsd_node, ns);
775
776 if (nsURI && *nsURI) xmlSetProp(xsd_node, xs_targetNamespace, nsURI);
777
778 FOREACH_NS(xdr, xdr_ns)
779 {
780 /* TODO: special handling for dt namespace? */
781 assert(xdr_ns->href != NULL);
782 if (xmlStrEqual(xdr_ns->href, XDR_href))
783 ; /* ignored */
784 else if (xdr_ns->prefix != NULL)
785 xmlNewNs(xsd_node, xdr_ns->href, xdr_ns->prefix);
786 else
787 FIXME("unexpected default xmlns: %s\n", xdr_ns->href);
788 }
789
790 FOREACH_ATTR(xdr, xdr_attr)
791 {
792 xmlCopyProp(xsd_node, xdr_attr);
793 }
794
795 FOREACH_CHILD(xdr, xdr_child)
796 {
797 if (xmlStrEqual(xdr_child->name, xs_AttributeType))
798 XDR_E_AttributeType(xdr_child, xsd_node);
799 else if (xmlStrEqual(xdr_child->name, xs_description))
800 XDR_E_description(xdr_child, xsd_node);
801 else if (xmlStrEqual(xdr_child->name, xs_ElementType))
802 XDR_E_ElementType(xdr_child, xsd_node);
803 else
804 FIXME("unexpected child <%s>\n", xdr_child->name);
805 }
806
807 return xsd_node;
808}
static const xmlChar XSD_href[]
Definition: xdr.c:36
static const xmlChar XSD_prefix[]
Definition: xdr.c:35
static const xmlChar xs_schema[]
Definition: xdr.c:75
static const xmlChar xs_ElementType[]
Definition: xdr.c:53
static xmlNodePtr XDR_E_ElementType(xmlNodePtr xdr, xmlNodePtr parent)
Definition: xdr.c:496
static const xmlChar xs_targetNamespace[]
Definition: xdr.c:81
static const xmlChar XDR_href[]
Definition: xdr.c:34

Referenced by XDR_to_XSD_doc().

◆ XDR_to_XSD_doc()

xmlDocPtr XDR_to_XSD_doc ( xmlDocPtr  xdr_doc,
xmlChar const nsURI 
)

Definition at line 810 of file xdr.c.

811{
812 xmlDocPtr xsd_doc = xmlNewDoc(NULL);
813
814 TRACE("(%p)\n", xdr_doc);
815
816 XDR_E_Schema(get_schema((xmlNodePtr)xdr_doc), (xmlNodePtr)xsd_doc, nsURI);
817
818 return xsd_doc;
819}
static xmlNodePtr XDR_E_Schema(xmlNodePtr xdr, xmlNodePtr parent, xmlChar const *nsURI)
Definition: xdr.c:758

Referenced by cache_entry_from_xdr_doc().

Variable Documentation

◆ DT_href

const xmlChar DT_href[] = "urn:schemas-microsoft-com:datatypes"
static

Definition at line 33 of file xdr.c.

Referenced by get_dt_ns(), get_dt_type(), and XDR_E_AttributeType().

◆ DT_prefix

const xmlChar DT_prefix[] = "dt"
static

Definition at line 32 of file xdr.c.

Referenced by XDR_A_dt_type(), XDR_E_AttributeType(), and XDR_E_ElementType().

◆ XDR_href

const xmlChar XDR_href[] = "urn:schemas-microsoft-com:xml-data"
static

Definition at line 34 of file xdr.c.

Referenced by XDR_E_Schema().

◆ xs_all

const xmlChar xs_all[] = "all"
static

Definition at line 38 of file xdr.c.

Referenced by XDR_E_ElementType(), and XDR_E_group().

◆ xs_annotation

const xmlChar xs_annotation[] = "annotation"
static

Definition at line 39 of file xdr.c.

Referenced by XDR_E_description().

◆ xs_any

const xmlChar xs_any[] = "any"
static

Definition at line 40 of file xdr.c.

Referenced by add_any_child().

◆ xs_anyAttribute

const xmlChar xs_anyAttribute[] = "anyAttribute"
static

Definition at line 41 of file xdr.c.

Referenced by add_anyAttribute_child(), and XDR_E_ElementType().

◆ xs_attribute

const xmlChar xs_attribute[] = "attribute"
static

Definition at line 42 of file xdr.c.

Referenced by XDR_E_attribute(), XDR_E_AttributeType(), and XDR_E_ElementType().

◆ xs_AttributeType

const xmlChar xs_AttributeType[] = "AttributeType"
static

Definition at line 43 of file xdr.c.

Referenced by XDR_E_attribute(), XDR_E_ElementType(), and XDR_E_Schema().

◆ xs_base

const xmlChar xs_base[] = "base"
static

Definition at line 44 of file xdr.c.

Referenced by XDR_E_AttributeType(), and XDR_E_ElementType().

◆ xs_choice

const xmlChar xs_choice[] = "choice"
static

Definition at line 45 of file xdr.c.

Referenced by XDR_E_ElementType(), and XDR_E_group().

◆ xs_complexType

const xmlChar xs_complexType[] = "complexType"
static

Definition at line 46 of file xdr.c.

Referenced by XDR_E_ElementType().

◆ xs_content

const xmlChar xs_content[] = "content"
static

Definition at line 47 of file xdr.c.

Referenced by XDR_E_ElementType().

◆ xs_datatype

const xmlChar xs_datatype[] = "datatype"
static

Definition at line 48 of file xdr.c.

Referenced by get_dt_type(), XDR_E_AttributeType(), and XDR_E_ElementType().

◆ xs_default

const xmlChar xs_default[] = "default"
static

Definition at line 49 of file xdr.c.

Referenced by XDR_E_attribute(), and XDR_E_AttributeType().

◆ xs_description

const xmlChar xs_description[] = "description"
static

Definition at line 50 of file xdr.c.

Referenced by XDR_E_AttributeType(), XDR_E_ElementType(), XDR_E_group(), and XDR_E_Schema().

◆ xs_documentation

const xmlChar xs_documentation[] = "documentation"
static

Definition at line 51 of file xdr.c.

Referenced by XDR_E_description().

◆ xs_element

const xmlChar xs_element[] = "element"
static

Definition at line 52 of file xdr.c.

Referenced by XDR_E_element(), XDR_E_ElementType(), and XDR_E_group().

◆ xs_ElementType

const xmlChar xs_ElementType[] = "ElementType"
static

Definition at line 53 of file xdr.c.

Referenced by XDR_E_Schema().

◆ xs_eltOnly

const xmlChar xs_eltOnly[] = "eltOnly"
static

Definition at line 54 of file xdr.c.

Referenced by XDR_E_ElementType().

◆ xs_enumeration

const xmlChar xs_enumeration[] = "enumeration"
static

Definition at line 55 of file xdr.c.

Referenced by XDR_A_dt_type(), and XDR_E_AttributeType().

◆ xs_extension

const xmlChar xs_extension[] = "extension"
static

Definition at line 56 of file xdr.c.

Referenced by XDR_E_ElementType().

◆ xs_group

const xmlChar xs_group[] = "group"
static

Definition at line 57 of file xdr.c.

Referenced by XDR_E_ElementType().

◆ xs_lax

const xmlChar xs_lax[] = "lax"
static

Definition at line 58 of file xdr.c.

Referenced by add_anyAttribute_child().

◆ xs_length

const xmlChar xs_length[] = "length"
static

Definition at line 59 of file xdr.c.

Referenced by XDR_E_ElementType().

◆ xs_many

const xmlChar xs_many[] = "many"
static

Definition at line 60 of file xdr.c.

Referenced by XDR_E_ElementType(), and XDR_E_group().

◆ xs_maxOccurs

const xmlChar xs_maxOccurs[] = "maxOccurs"
static

Definition at line 61 of file xdr.c.

Referenced by add_any_child(), XDR_A_maxOccurs(), XDR_E_element(), XDR_E_ElementType(), and XDR_E_group().

◆ xs_minOccurs

const xmlChar xs_minOccurs[] = "minOccurs"
static

Definition at line 62 of file xdr.c.

Referenced by add_any_child(), XDR_E_element(), XDR_E_ElementType(), and XDR_E_group().

◆ xs_mixed

const xmlChar xs_mixed[] = "mixed"
static

Definition at line 63 of file xdr.c.

Referenced by XDR_E_ElementType().

◆ xs_model

const xmlChar xs_model[] = "model"
static

Definition at line 64 of file xdr.c.

Referenced by XDR_E_ElementType(), and XDR_E_group().

◆ xs_name

const xmlChar xs_name[] = "name"
static

Definition at line 65 of file xdr.c.

Referenced by XDR_E_attribute(), XDR_E_AttributeType(), and XDR_E_ElementType().

◆ xs_namespace

const xmlChar xs_namespace[] = "namespace"
static

Definition at line 66 of file xdr.c.

Referenced by XDR_E_ElementType().

◆ xs_no

const xmlChar xs_no[] = "no"
static

Definition at line 67 of file xdr.c.

Referenced by XDR_A_required().

◆ xs_open

const xmlChar xs_open[] = "open"
static

Definition at line 68 of file xdr.c.

Referenced by XDR_E_ElementType().

◆ xs_optional

const xmlChar xs_optional[] = "optional"
static

Definition at line 69 of file xdr.c.

Referenced by XDR_A_required().

◆ xs_order

const xmlChar xs_order[] = "order"
static

Definition at line 70 of file xdr.c.

Referenced by XDR_E_ElementType(), and XDR_E_group().

◆ xs_processContents

const xmlChar xs_processContents[] = "processContents"
static

Definition at line 71 of file xdr.c.

Referenced by add_any_child(), and add_anyAttribute_child().

◆ xs_ref

const xmlChar xs_ref[] = "ref"
static

Definition at line 72 of file xdr.c.

Referenced by XDR_A_type().

◆ xs_required

const xmlChar xs_required[] = "required"
static

Definition at line 73 of file xdr.c.

Referenced by XDR_A_required(), XDR_E_attribute(), and XDR_E_AttributeType().

◆ xs_restriction

const xmlChar xs_restriction[] = "restriction"
static

Definition at line 74 of file xdr.c.

Referenced by XDR_E_AttributeType(), and XDR_E_ElementType().

◆ xs_schema

const xmlChar xs_schema[] = "schema"
static

Definition at line 75 of file xdr.c.

Referenced by XDR_E_Schema().

◆ xs_seq

const xmlChar xs_seq[] = "seq"
static

Definition at line 76 of file xdr.c.

Referenced by XDR_E_ElementType(), and XDR_E_group().

◆ xs_sequence

const xmlChar xs_sequence[] = "sequence"
static

Definition at line 77 of file xdr.c.

Referenced by XDR_E_ElementType(), and XDR_E_group().

◆ xs_simpleContent

const xmlChar xs_simpleContent[] = "simpleContent"
static

Definition at line 78 of file xdr.c.

Referenced by XDR_E_ElementType().

◆ xs_simpleType

const xmlChar xs_simpleType[] = "simpleType"
static

Definition at line 79 of file xdr.c.

Referenced by XDR_E_AttributeType(), and XDR_E_ElementType().

◆ xs_strict

const xmlChar xs_strict[] = "strict"
static

Definition at line 80 of file xdr.c.

Referenced by add_any_child().

◆ xs_targetNamespace

const xmlChar xs_targetNamespace[] = "targetNamespace"
static

Definition at line 81 of file xdr.c.

Referenced by XDR_E_Schema().

◆ xs_textOnly

const xmlChar xs_textOnly[] = "textOnly"
static

Definition at line 82 of file xdr.c.

Referenced by XDR_E_ElementType().

◆ xs_true

const xmlChar xs_true[] = "true"
static

Definition at line 83 of file xdr.c.

Referenced by XDR_E_ElementType().

◆ xs_type

const xmlChar xs_type[] = "type"
static

◆ xs_unbounded

const xmlChar xs_unbounded[] = "unbounded"
static

Definition at line 85 of file xdr.c.

Referenced by add_any_child(), XDR_A_maxOccurs(), and XDR_E_ElementType().

◆ xs_use

const xmlChar xs_use[] = "use"
static

Definition at line 86 of file xdr.c.

Referenced by XDR_A_required().

◆ xs_value

const xmlChar xs_value[] = "value"
static

Definition at line 87 of file xdr.c.

Referenced by XDR_E_AttributeType(), and XDR_E_ElementType().

◆ xs_values

const xmlChar xs_values[] = "values"
static

Definition at line 88 of file xdr.c.

Referenced by XDR_E_AttributeType().

◆ xs_xsd_string

const xmlChar xs_xsd_string[] = "xsd:string"
static

Definition at line 89 of file xdr.c.

Referenced by XDR_E_AttributeType(), and XDR_E_ElementType().

◆ XSD_href

const xmlChar XSD_href[] = "http://www.w3.org/2001/XMLSchema"
static

Definition at line 36 of file xdr.c.

Referenced by XDR_E_Schema().

◆ XSD_prefix

const xmlChar XSD_prefix[] = "xsd"
static

Definition at line 35 of file xdr.c.

Referenced by XDR_E_Schema().