~ubuntu-branches/ubuntu/precise/kompozer/precise

« back to all changes in this revision

Viewing changes to mozilla/extensions/webservices/schema/src/nsSchemaPrivate.h

  • Committer: Bazaar Package Importer
  • Author(s): Anthony Yarusso
  • Date: 2007-08-27 01:11:03 UTC
  • Revision ID: james.westby@ubuntu.com-20070827011103-2jgf4s6532gqu2ka
Tags: upstream-0.7.10
ImportĀ upstreamĀ versionĀ 0.7.10

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 
2
/*
 
3
 * The contents of this file are subject to the Mozilla Public
 
4
 * License Version 1.1 (the "License"); you may not use this file
 
5
 * except in compliance with the License. You may obtain a copy of
 
6
 * the License at http://www.mozilla.org/MPL/
 
7
 * 
 
8
 * Software distributed under the License is distributed on an "AS
 
9
 * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
 
10
 * implied. See the License for the specific language governing
 
11
 * rights and limitations under the License.
 
12
 * 
 
13
 * The Original Code is Mozilla.
 
14
 * 
 
15
 * The Initial Developer of the Original Code is Netscape
 
16
 * Communications.  Portions created by Netscape Communications are
 
17
 * Copyright (C) 2001 by Netscape Communications.  All
 
18
 * Rights Reserved.
 
19
 * 
 
20
 * Contributor(s): 
 
21
 *   Vidur Apparao <vidur@netscape.com> (original author)
 
22
 */
 
23
 
 
24
#ifndef __nsSchemaPrivate_h__
 
25
#define __nsSchemaPrivate_h__
 
26
 
 
27
#include "nsISchema.h"
 
28
 
 
29
// XPCOM Includes
 
30
#include "nsCOMPtr.h"
 
31
#include "nsSupportsArray.h"
 
32
#include "nsHashtable.h"
 
33
#include "nsString.h"
 
34
#include "nsIDOMElement.h"
 
35
 
 
36
#define NS_SCHEMA_2001_NAMESPACE "http://www.w3.org/2001/XMLSchema"
 
37
#define NS_SCHEMA_1999_NAMESPACE "http://www.w3.org/1999/XMLSchema"
 
38
#define NS_SOAP_1_1_ENCODING_NAMESPACE \
 
39
   "http://schemas.xmlsoap.org/soap/encoding/"
 
40
#define NS_SOAP_1_2_ENCODING_NAMESPACE \
 
41
   "http://www.w3.org/2001/09/soap-encoding"
 
42
 
 
43
class nsSchema : public nsISchema 
 
44
{
 
45
public:
 
46
  nsSchema(nsISchemaCollection* aCollection, nsIDOMElement* aElement);
 
47
  virtual ~nsSchema();
 
48
 
 
49
  NS_DECL_ISUPPORTS
 
50
  NS_DECL_NSISCHEMACOMPONENT
 
51
  NS_DECL_NSISCHEMA
 
52
 
 
53
  NS_IMETHOD AddType(nsISchemaType* aType);
 
54
  NS_IMETHOD AddAttribute(nsISchemaAttribute* aAttribute);
 
55
  NS_IMETHOD AddElement(nsISchemaElement* aElement);
 
56
  NS_IMETHOD AddAttributeGroup(nsISchemaAttributeGroup* aAttributeGroup);
 
57
  NS_IMETHOD AddModelGroup(nsISchemaModelGroup* aModelGroup);
 
58
  void DropCollectionReference();
 
59
  nsresult ResolveTypePlaceholder(nsISchemaType* aPlaceholder,
 
60
                                  nsISchemaType** aType);
 
61
  PRBool IsElementFormQualified() { return mElementFormQualified; }
 
62
 
 
63
protected:
 
64
  nsString mTargetNamespace;
 
65
  nsString mSchemaNamespace;
 
66
  nsSupportsArray mTypes;
 
67
  nsSupportsHashtable mTypesHash;
 
68
  nsSupportsArray mAttributes;
 
69
  nsSupportsHashtable mAttributesHash;
 
70
  nsSupportsArray mElements;
 
71
  nsSupportsHashtable mElementsHash;
 
72
  nsSupportsArray mAttributeGroups;
 
73
  nsSupportsHashtable mAttributeGroupsHash;
 
74
  nsSupportsArray mModelGroups;
 
75
  nsSupportsHashtable mModelGroupsHash;
 
76
  nsISchemaCollection* mCollection;  // [WEAK] it owns me
 
77
  PRPackedBool mElementFormQualified;
 
78
};
 
79
 
 
80
class nsSchemaComponentBase {
 
81
public:
 
82
  nsSchemaComponentBase(nsSchema* aSchema);
 
83
  virtual ~nsSchemaComponentBase();
 
84
 
 
85
  NS_IMETHOD GetTargetNamespace(nsAString& aTargetNamespace);
 
86
 
 
87
protected:
 
88
  nsSchema* mSchema;  // [WEAK] It owns me
 
89
  // Used to prevent infinite recursion for cycles in the object graph
 
90
  PRPackedBool mIsResolved;
 
91
  PRPackedBool mIsCleared;
 
92
};
 
93
 
 
94
#define NS_IMPL_NSISCHEMACOMPONENT_USING_BASE                           \
 
95
  NS_IMETHOD GetTargetNamespace(nsAString& aTargetNamespace) {          \
 
96
    return nsSchemaComponentBase::GetTargetNamespace(aTargetNamespace); \
 
97
  }                                                                     \
 
98
  NS_IMETHOD Resolve();                                                 \
 
99
  NS_IMETHOD Clear();
 
100
 
 
101
class nsSchemaBuiltinType : public nsISchemaBuiltinType
 
102
{
 
103
public:
 
104
  nsSchemaBuiltinType(PRUint16 aBuiltinType);
 
105
  virtual ~nsSchemaBuiltinType();
 
106
 
 
107
  NS_DECL_ISUPPORTS
 
108
  NS_DECL_NSISCHEMACOMPONENT
 
109
  NS_DECL_NSISCHEMATYPE
 
110
  NS_DECL_NSISCHEMASIMPLETYPE
 
111
  NS_DECL_NSISCHEMABUILTINTYPE
 
112
 
 
113
protected:
 
114
  PRUint16 mBuiltinType;
 
115
};
 
116
 
 
117
class nsSchemaListType : public nsSchemaComponentBase,
 
118
                         public nsISchemaListType
 
119
{
 
120
public:
 
121
  nsSchemaListType(nsSchema* aSchema, const nsAString& aName);
 
122
  virtual ~nsSchemaListType();
 
123
 
 
124
  NS_DECL_ISUPPORTS
 
125
  NS_IMPL_NSISCHEMACOMPONENT_USING_BASE
 
126
  NS_DECL_NSISCHEMATYPE
 
127
  NS_DECL_NSISCHEMASIMPLETYPE
 
128
  NS_DECL_NSISCHEMALISTTYPE
 
129
  
 
130
  NS_IMETHOD SetListType(nsISchemaSimpleType* aListType);
 
131
 
 
132
protected:
 
133
  nsString mName;
 
134
  nsCOMPtr<nsISchemaSimpleType> mListType;
 
135
};
 
136
 
 
137
class nsSchemaUnionType : public nsSchemaComponentBase,
 
138
                          public nsISchemaUnionType
 
139
{
 
140
public:
 
141
  nsSchemaUnionType(nsSchema* aSchema, const nsAString& aName);
 
142
  virtual ~nsSchemaUnionType();
 
143
  
 
144
  NS_DECL_ISUPPORTS
 
145
  NS_IMPL_NSISCHEMACOMPONENT_USING_BASE
 
146
  NS_DECL_NSISCHEMATYPE
 
147
  NS_DECL_NSISCHEMASIMPLETYPE
 
148
  NS_DECL_NSISCHEMAUNIONTYPE
 
149
 
 
150
  NS_IMETHOD AddUnionType(nsISchemaSimpleType* aUnionType);
 
151
 
 
152
protected:
 
153
  nsString mName;
 
154
  nsSupportsArray mUnionTypes;
 
155
};
 
156
 
 
157
class nsSchemaRestrictionType : public nsSchemaComponentBase,
 
158
                                public nsISchemaRestrictionType
 
159
{
 
160
public:
 
161
  nsSchemaRestrictionType(nsSchema* aSchema, const nsAString& aName);
 
162
  virtual ~nsSchemaRestrictionType();
 
163
 
 
164
  NS_DECL_ISUPPORTS
 
165
  NS_IMPL_NSISCHEMACOMPONENT_USING_BASE
 
166
  NS_DECL_NSISCHEMATYPE
 
167
  NS_DECL_NSISCHEMASIMPLETYPE
 
168
  NS_DECL_NSISCHEMARESTRICTIONTYPE
 
169
 
 
170
  NS_IMETHOD SetBaseType(nsISchemaSimpleType* aBaseType);
 
171
  NS_IMETHOD AddFacet(nsISchemaFacet* aFacet);
 
172
 
 
173
protected:
 
174
  nsString mName;
 
175
  nsCOMPtr<nsISchemaSimpleType> mBaseType;
 
176
  nsSupportsArray mFacets;
 
177
};
 
178
 
 
179
class nsComplexTypeArrayInfo {
 
180
public:
 
181
  nsComplexTypeArrayInfo(nsISchemaType* aType, PRUint32 aDimension) :
 
182
    mType(aType), mDimension(aDimension) {}
 
183
  ~nsComplexTypeArrayInfo() {}
 
184
 
 
185
  void GetType(nsISchemaType** aType) { *aType = mType; NS_ADDREF(*aType); }
 
186
  PRUint32 GetDimension() { return mDimension; }
 
187
 
 
188
private:
 
189
  nsCOMPtr<nsISchemaType> mType;
 
190
  PRUint32 mDimension;
 
191
};
 
192
 
 
193
class nsSchemaComplexType : public nsSchemaComponentBase,
 
194
                            public nsISchemaComplexType
 
195
{
 
196
public:
 
197
  nsSchemaComplexType(nsSchema* aSchema, const nsAString& aName,
 
198
                      PRBool aAbstract);
 
199
  virtual ~nsSchemaComplexType();
 
200
 
 
201
  NS_DECL_ISUPPORTS
 
202
  NS_IMPL_NSISCHEMACOMPONENT_USING_BASE
 
203
  NS_DECL_NSISCHEMATYPE
 
204
  NS_DECL_NSISCHEMACOMPLEXTYPE
 
205
 
 
206
  NS_IMETHOD SetContentModel(PRUint16 aContentModel);
 
207
  NS_IMETHOD SetDerivation(PRUint16 aDerivation, nsISchemaType* aBaseType);
 
208
  NS_IMETHOD SetSimpleBaseType(nsISchemaSimpleType* aSimpleBaseType);
 
209
  NS_IMETHOD SetModelGroup(nsISchemaModelGroup* aModelGroup);
 
210
  NS_IMETHOD AddAttribute(nsISchemaAttributeComponent* aAttribute);
 
211
  NS_IMETHOD SetArrayInfo(nsISchemaType* aType, PRUint32 aDimension);
 
212
  
 
213
protected:
 
214
  nsString mName;
 
215
  PRPackedBool mAbstract;
 
216
  PRUint16 mContentModel;
 
217
  PRUint16 mDerivation;
 
218
  nsCOMPtr<nsISchemaType> mBaseType;
 
219
  nsCOMPtr<nsISchemaSimpleType> mSimpleBaseType;
 
220
  nsCOMPtr<nsISchemaModelGroup> mModelGroup;
 
221
  nsSupportsArray mAttributes;
 
222
  nsSupportsHashtable mAttributesHash;
 
223
  nsComplexTypeArrayInfo* mArrayInfo;
 
224
};
 
225
 
 
226
class nsSchemaTypePlaceholder : public nsSchemaComponentBase,
 
227
                                public nsISchemaSimpleType
 
228
{
 
229
public:
 
230
  nsSchemaTypePlaceholder(nsSchema* aSchema, const nsAString& aName);
 
231
  virtual ~nsSchemaTypePlaceholder();
 
232
 
 
233
  NS_DECL_ISUPPORTS
 
234
  NS_IMPL_NSISCHEMACOMPONENT_USING_BASE
 
235
  NS_DECL_NSISCHEMATYPE
 
236
  NS_DECL_NSISCHEMASIMPLETYPE
 
237
 
 
238
protected:
 
239
  nsString mName;
 
240
};
 
241
 
 
242
class nsSchemaParticleBase : public nsSchemaComponentBase
 
243
{
 
244
public:  
 
245
  nsSchemaParticleBase(nsSchema* aSchema);
 
246
  virtual ~nsSchemaParticleBase();
 
247
 
 
248
  NS_IMETHOD GetMinOccurs(PRUint32 *aMinOccurs);
 
249
  NS_IMETHOD GetMaxOccurs(PRUint32 *aMaxOccurs);
 
250
 
 
251
  NS_IMETHOD SetMinOccurs(PRUint32 aMinOccurs);
 
252
  NS_IMETHOD SetMaxOccurs(PRUint32 aMaxOccurs);
 
253
 
 
254
protected:
 
255
  PRUint32 mMinOccurs;
 
256
  PRUint32 mMaxOccurs;
 
257
};
 
258
 
 
259
#define NS_IMPL_NSISCHEMAPARTICLE_USING_BASE                           \
 
260
  NS_IMETHOD GetMinOccurs(PRUint32 *aMinOccurs) {                      \
 
261
    return nsSchemaParticleBase::GetMinOccurs(aMinOccurs);             \
 
262
  }                                                                    \
 
263
  NS_IMETHOD GetMaxOccurs(PRUint32 *aMaxOccurs) {                      \
 
264
    return nsSchemaParticleBase::GetMaxOccurs(aMaxOccurs);             \
 
265
  }                                                                    \
 
266
  NS_IMETHOD SetMinOccurs(PRUint32 aMinOccurs) {                       \
 
267
    return nsSchemaParticleBase::SetMinOccurs(aMinOccurs);             \
 
268
  }                                                                    \
 
269
  NS_IMETHOD SetMaxOccurs(PRUint32 aMaxOccurs) {                       \
 
270
    return nsSchemaParticleBase::SetMaxOccurs(aMaxOccurs);             \
 
271
  }                                                                    \
 
272
  NS_IMETHOD GetParticleType(PRUint16 *aParticleType);                 \
 
273
  NS_IMETHOD GetName(nsAString& aName);                        
 
274
 
 
275
class nsSchemaModelGroup : public nsSchemaParticleBase,
 
276
                           public nsISchemaModelGroup
 
277
{
 
278
public:
 
279
  nsSchemaModelGroup(nsSchema* aSchema, 
 
280
                     const nsAString& aName);
 
281
  virtual ~nsSchemaModelGroup();
 
282
 
 
283
  NS_DECL_ISUPPORTS
 
284
  NS_IMPL_NSISCHEMACOMPONENT_USING_BASE
 
285
  NS_IMPL_NSISCHEMAPARTICLE_USING_BASE
 
286
  NS_DECL_NSISCHEMAMODELGROUP
 
287
 
 
288
  NS_IMETHOD SetCompositor(PRUint16 aCompositor);
 
289
  NS_IMETHOD AddParticle(nsISchemaParticle* aParticle);
 
290
 
 
291
protected:
 
292
  nsString mName;
 
293
  PRUint16 mCompositor;
 
294
  nsSupportsArray mParticles;
 
295
};
 
296
 
 
297
class nsSchemaModelGroupRef : public nsSchemaParticleBase,
 
298
                              public nsISchemaModelGroup
 
299
{
 
300
public:
 
301
  nsSchemaModelGroupRef(nsSchema* aSchema, 
 
302
                        const nsAString& aRef);
 
303
  virtual ~nsSchemaModelGroupRef();
 
304
 
 
305
  NS_DECL_ISUPPORTS
 
306
  NS_IMPL_NSISCHEMACOMPONENT_USING_BASE
 
307
  NS_IMPL_NSISCHEMAPARTICLE_USING_BASE
 
308
  NS_DECL_NSISCHEMAMODELGROUP
 
309
 
 
310
protected:
 
311
  nsString mRef;
 
312
  nsCOMPtr<nsISchemaModelGroup> mModelGroup;
 
313
};
 
314
 
 
315
class nsSchemaAnyParticle : public nsSchemaParticleBase,
 
316
                            public nsISchemaAnyParticle
 
317
{
 
318
public:
 
319
  nsSchemaAnyParticle(nsSchema* aSchema);
 
320
  virtual ~nsSchemaAnyParticle();
 
321
 
 
322
  NS_DECL_ISUPPORTS
 
323
  NS_IMPL_NSISCHEMACOMPONENT_USING_BASE
 
324
  NS_IMPL_NSISCHEMAPARTICLE_USING_BASE
 
325
  NS_DECL_NSISCHEMAANYPARTICLE
 
326
 
 
327
  NS_IMETHOD SetProcess(PRUint16 aProcess);
 
328
  NS_IMETHOD SetNamespace(const nsAString& aNamespace);
 
329
 
 
330
protected:
 
331
  PRUint16 mProcess;
 
332
  nsString mNamespace;
 
333
};
 
334
 
 
335
class nsSchemaElement : public nsSchemaParticleBase,
 
336
                        public nsISchemaElement
 
337
{
 
338
public:
 
339
  enum { NILLABLE       = 1 << 1 };
 
340
  enum { ABSTRACT       = 1 << 2 };
 
341
  enum { FORM_QUALIFIED = 1 << 3 };
 
342
 
 
343
  nsSchemaElement(nsSchema* aSchema, const nsAString& aName);
 
344
  virtual ~nsSchemaElement();
 
345
 
 
346
  NS_DECL_ISUPPORTS
 
347
  NS_IMPL_NSISCHEMAPARTICLE_USING_BASE
 
348
  NS_DECL_NSISCHEMAELEMENT
 
349
 
 
350
  NS_IMETHOD GetTargetNamespace(nsAString& aTargetNamespace);
 
351
  NS_IMETHOD Resolve();
 
352
  NS_IMETHOD Clear();
 
353
  NS_IMETHOD SetType(nsISchemaType* aType);
 
354
  NS_IMETHOD SetConstraints(const nsAString& aDefaultValue,
 
355
                            const nsAString& aFixedValue);
 
356
  NS_IMETHOD SetFlags(PRInt32 aFlags);
 
357
 
 
358
protected:
 
359
  nsString mName;
 
360
  nsCOMPtr<nsISchemaType> mType;
 
361
  nsString mDefaultValue;
 
362
  nsString mFixedValue;
 
363
  PRUint8 mFlags;
 
364
};
 
365
 
 
366
class nsSchemaElementRef : public nsSchemaParticleBase,
 
367
                           public nsISchemaElement
 
368
{
 
369
public:
 
370
  nsSchemaElementRef(nsSchema* aSchema, const nsAString& aRef);
 
371
  virtual ~nsSchemaElementRef();
 
372
 
 
373
  NS_DECL_ISUPPORTS
 
374
  NS_IMPL_NSISCHEMACOMPONENT_USING_BASE
 
375
  NS_IMPL_NSISCHEMAPARTICLE_USING_BASE
 
376
  NS_DECL_NSISCHEMAELEMENT
 
377
 
 
378
protected:
 
379
  nsString mRef;
 
380
  nsCOMPtr<nsISchemaElement> mElement;
 
381
};
 
382
 
 
383
class nsSchemaAttribute : public nsSchemaComponentBase,
 
384
                          public nsISchemaAttribute 
 
385
{
 
386
public:
 
387
  nsSchemaAttribute(nsSchema* aSchema, const nsAString& aName);
 
388
  virtual ~nsSchemaAttribute();
 
389
 
 
390
  NS_DECL_ISUPPORTS
 
391
  NS_IMPL_NSISCHEMACOMPONENT_USING_BASE
 
392
  NS_DECL_NSISCHEMAATTRIBUTECOMPONENT
 
393
  NS_DECL_NSISCHEMAATTRIBUTE
 
394
 
 
395
  NS_IMETHOD SetType(nsISchemaSimpleType* aType);
 
396
  NS_IMETHOD SetConstraints(const nsAString& aDefaultValue,
 
397
                            const nsAString& aFixedValue);
 
398
  NS_IMETHOD SetUse(PRUint16 aUse);
 
399
 
 
400
protected:
 
401
  nsString mName;
 
402
  nsCOMPtr<nsISchemaSimpleType> mType;
 
403
  nsString mDefaultValue;
 
404
  nsString mFixedValue;
 
405
  PRUint16 mUse;
 
406
};
 
407
 
 
408
class nsSchemaAttributeRef : public nsSchemaComponentBase,
 
409
                             public nsISchemaAttribute 
 
410
{
 
411
public:
 
412
  nsSchemaAttributeRef(nsSchema* aSchema, const nsAString& aRef);
 
413
  virtual ~nsSchemaAttributeRef();
 
414
  
 
415
  NS_DECL_ISUPPORTS
 
416
  NS_IMPL_NSISCHEMACOMPONENT_USING_BASE
 
417
  NS_DECL_NSISCHEMAATTRIBUTECOMPONENT
 
418
  NS_DECL_NSISCHEMAATTRIBUTE
 
419
 
 
420
  NS_IMETHOD SetConstraints(const nsAString& aDefaultValue,
 
421
                            const nsAString& aFixedValue);
 
422
  NS_IMETHOD SetUse(PRUint16 aUse);
 
423
 
 
424
protected:
 
425
  nsString mRef;
 
426
  nsCOMPtr<nsISchemaAttribute> mAttribute;
 
427
  nsString mDefaultValue;
 
428
  nsString mFixedValue;
 
429
  PRUint16 mUse;
 
430
};
 
431
 
 
432
class nsSchemaAttributeGroup : public nsSchemaComponentBase,
 
433
                               public nsISchemaAttributeGroup
 
434
{
 
435
public:
 
436
  nsSchemaAttributeGroup(nsSchema* aSchema, const nsAString& aName);
 
437
  virtual ~nsSchemaAttributeGroup();
 
438
  
 
439
  NS_DECL_ISUPPORTS
 
440
  NS_IMPL_NSISCHEMACOMPONENT_USING_BASE
 
441
  NS_DECL_NSISCHEMAATTRIBUTECOMPONENT
 
442
  NS_DECL_NSISCHEMAATTRIBUTEGROUP
 
443
  
 
444
  NS_IMETHOD AddAttribute(nsISchemaAttributeComponent* aAttribute);
 
445
 
 
446
protected:
 
447
  nsString mName;
 
448
  nsSupportsArray mAttributes;
 
449
  nsSupportsHashtable mAttributesHash;
 
450
};
 
451
 
 
452
class nsSchemaAttributeGroupRef : public nsSchemaComponentBase,
 
453
                                  public nsISchemaAttributeGroup
 
454
{
 
455
public:
 
456
  nsSchemaAttributeGroupRef(nsSchema* aSchema, const nsAString& aRef);
 
457
  virtual ~nsSchemaAttributeGroupRef();
 
458
  
 
459
  NS_DECL_ISUPPORTS
 
460
  NS_IMPL_NSISCHEMACOMPONENT_USING_BASE
 
461
  NS_DECL_NSISCHEMAATTRIBUTECOMPONENT
 
462
  NS_DECL_NSISCHEMAATTRIBUTEGROUP
 
463
 
 
464
protected:
 
465
  nsString mRef;
 
466
  nsCOMPtr<nsISchemaAttributeGroup> mAttributeGroup;
 
467
};
 
468
 
 
469
class nsSchemaAnyAttribute : public nsSchemaComponentBase,
 
470
                             public nsISchemaAnyAttribute
 
471
{
 
472
public:
 
473
  nsSchemaAnyAttribute(nsSchema* aSchema);
 
474
  virtual ~nsSchemaAnyAttribute();
 
475
 
 
476
  NS_DECL_ISUPPORTS
 
477
  NS_IMPL_NSISCHEMACOMPONENT_USING_BASE
 
478
  NS_DECL_NSISCHEMAATTRIBUTECOMPONENT
 
479
  NS_DECL_NSISCHEMAANYATTRIBUTE
 
480
  
 
481
  NS_IMETHOD SetProcess(PRUint16 aProcess);
 
482
  NS_IMETHOD SetNamespace(const nsAString& aNamespace);
 
483
 
 
484
protected:
 
485
  PRUint16 mProcess;
 
486
  nsString mNamespace;
 
487
};
 
488
 
 
489
class nsSchemaFacet : public nsSchemaComponentBase,
 
490
                      public nsISchemaFacet
 
491
{
 
492
public:
 
493
  nsSchemaFacet(nsSchema* aSchema);
 
494
  virtual ~nsSchemaFacet();
 
495
 
 
496
  NS_DECL_ISUPPORTS
 
497
  NS_IMPL_NSISCHEMACOMPONENT_USING_BASE
 
498
  NS_DECL_NSISCHEMAFACET
 
499
 
 
500
  NS_IMETHOD SetFacetType(PRUint16 aFacetType);
 
501
  NS_IMETHOD SetIsFixed(PRBool aIsFixed);
 
502
  NS_IMETHOD SetValue(const nsAString& aStrValue);
 
503
  NS_IMETHOD SetUintValue(PRUint32 aUintValue);
 
504
  NS_IMETHOD SetWhitespaceValue(PRUint16 aWhitespaceValue);
 
505
 
 
506
protected:
 
507
  PRUint16 mFacetType;
 
508
  PRPackedBool mIsFixed;
 
509
  nsString mStrValue;
 
510
  PRUint32 mUintValue;
 
511
  PRUint16 mWhitespaceValue;
 
512
};
 
513
 
 
514
class nsSOAPArray : public nsISchemaComplexType
 
515
{
 
516
public:
 
517
  nsSOAPArray(nsISchemaType* aAnyType);
 
518
  virtual ~nsSOAPArray();
 
519
 
 
520
  NS_DECL_ISUPPORTS
 
521
  NS_DECL_NSISCHEMACOMPONENT
 
522
  NS_DECL_NSISCHEMATYPE
 
523
  NS_DECL_NSISCHEMACOMPLEXTYPE
 
524
 
 
525
protected:
 
526
  nsCOMPtr<nsISchemaType> mAnyType;
 
527
};
 
528
 
 
529
class nsSOAPArrayType : public nsISchemaRestrictionType
 
530
{
 
531
public:
 
532
  nsSOAPArrayType();
 
533
  virtual ~nsSOAPArrayType();
 
534
 
 
535
  NS_DECL_ISUPPORTS
 
536
  NS_DECL_NSISCHEMACOMPONENT
 
537
  NS_DECL_NSISCHEMATYPE
 
538
  NS_DECL_NSISCHEMASIMPLETYPE
 
539
  NS_DECL_NSISCHEMARESTRICTIONTYPE
 
540
};
 
541
 
 
542
#define NS_SCHEMA_CID                              \
 
543
{ /* 58870ef5-cb65-4220-8317-dbe236059c58 */       \
 
544
 0x58870ef5, 0xcb65, 0x4220,                       \
 
545
 {0x83, 0x17, 0xdb, 0xe2, 0x36, 0x05, 0x9c, 0x58}}
 
546
 
 
547
#define NS_SCHEMA_CONTRACTID    \
 
548
"@mozilla.org/xmlextras/schemas/schema;1"
 
549
 
 
550
#define NS_SCHEMABUILTINTYPE_CID                   \
 
551
{ /* c1db07bc-1095-4a44-9ed6-f4a00a116b4a */       \
 
552
 0xc1db07bc, 0x1095, 0x4a44,                       \
 
553
 {0x9e, 0xd6, 0xf4, 0xa0, 0x0a, 0x11, 0x6b, 0x4a}}
 
554
 
 
555
#define NS_SCHEMABUILTINTYPE_CONTRACTID    \
 
556
"@mozilla.org/xmlextras/schemas/schemabuiltintype;1"
 
557
 
 
558
#define NS_SCHEMALISTTYPE_CID                      \
 
559
{ /* 2053b685-e541-45f9-bb00-9d8897b8887d */       \
 
560
 0x2053b685, 0xe541, 0x45f9,                       \
 
561
 {0xbb, 0x00, 0x9d, 0x88, 0x97, 0xb8, 0x88, 0x7d}}
 
562
 
 
563
#define NS_SCHEMALISTTYPE_CONTRACTID    \
 
564
"@mozilla.org/xmlextras/schemas/schemalisttype;1"
 
565
 
 
566
#define NS_SCHEMAUNIONTYPE_CID                     \
 
567
{ /* ef8b74ae-da9a-4fa2-b6f1-b587b02b2262 */       \
 
568
 0xef8b74ae, 0xda9a, 0x4fa2,                       \
 
569
 {0xb6, 0xf1, 0xb5, 0x87, 0xb0, 0x2b, 0x22, 0x62}}
 
570
 
 
571
#define NS_SCHEMAUNIONTYPE_CONTRACTID    \
 
572
"@mozilla.org/xmlextras/schemas/schemauniontype;1"
 
573
 
 
574
#define NS_SCHEMARESTRICTIONTYPE_CID               \
 
575
{ /* 38622f82-c10e-48cc-aea9-1a6ed31078e5 */       \
 
576
 0x38622f82, 0xc10e, 0x48cc,                       \
 
577
 {0xae, 0xa9, 0x1a, 0x6e, 0xd3, 0x10, 0x78, 0xe5}}
 
578
 
 
579
#define NS_SCHEMARESTRICTIONTYPE_CONTRACTID    \
 
580
"@mozilla.org/xmlextras/schemas/schemarestrictiontype;1"
 
581
 
 
582
#define NS_SCHEMACOMPLEXTYPE_CID                   \
 
583
{ /* e8266b17-b5ed-4228-be18-473dbfe68f67 */       \
 
584
 0xe8266b17, 0xb5ed, 0x4228,                       \
 
585
 {0xbe, 0x18, 0x47, 0x3d, 0xbf, 0xe6, 0x8f, 0x67}}
 
586
 
 
587
#define NS_SCHEMACOMPLEXTYPE_CONTRACTID    \
 
588
"@mozilla.org/xmlextras/schemas/schemacomplextype;1"
 
589
 
 
590
#define NS_SCHEMATYPEPLACEHOLDER_CID               \
 
591
{ /* 50e026ef-e0ef-408c-a5ed-8492d7f3604e */       \
 
592
 0x50e026ef, 0xe0ef, 0x408c,                       \
 
593
 {0xa5, 0xed, 0x84, 0x92, 0xd7, 0xf3, 0x60, 0x4e}}
 
594
 
 
595
#define NS_SCHEMATYPEPLACEHOLDER_CONTRACTID    \
 
596
"@mozilla.org/xmlextras/schemas/schematypeplaceholder;1"
 
597
 
 
598
#define NS_SCHEMAMODELGROUP_CID                    \
 
599
{ /* 8f75863d-a724-40d5-a271-72bb67ef2105 */       \
 
600
 0x8f75863d, 0xa724, 0x40d5,                       \
 
601
 {0xa2, 0x71, 0x72, 0xbb, 0x67, 0xef, 0x21, 0x05}}
 
602
 
 
603
#define NS_SCHEMAMODELGROUP_CONTRACTID    \
 
604
"@mozilla.org/xmlextras/schemas/schemamodelgroup;1"
 
605
 
 
606
#define NS_SCHEMAMODELGROUPREF_CID                 \
 
607
{ /* 2e9dca3a-5684-44a1-99cb-94f8aef95c03 */       \
 
608
 0x2e9dca3a, 0x5684, 0x44a1,                       \
 
609
 {0x99, 0xcb, 0x94, 0xf8, 0xae, 0xf9, 0x5c, 0x03}}
 
610
 
 
611
#define NS_SCHEMAMODELGROUPREF_CONTRACTID    \
 
612
"@mozilla.org/xmlextras/schemas/schemamodelgroupref;1"
 
613
 
 
614
#define NS_SCHEMAANYPARTICLE_CID                   \
 
615
{ /* ab78c787-a356-483a-9153-92c50ba8a80d */       \
 
616
 0xab78c787, 0xa356, 0x483a,                       \
 
617
 {0x91, 0x53, 0x92, 0xc5, 0x0b, 0xa8, 0xa8, 0x0d}}
 
618
 
 
619
#define NS_SCHEMAANYPARTICLE_CONTRACTID    \
 
620
"@mozilla.org/xmlextras/schemas/schemaanyparticle;1"
 
621
 
 
622
#define NS_SCHEMAELEMENT_CID                       \
 
623
{ /* 9c3e5c69-2d47-475d-9cc8-1d6905d0f7dc */       \
 
624
 0x9c3e5c69, 0x2d47, 0x475d,                       \
 
625
 {0x9c, 0xc8, 0x1d, 0x69, 0x05, 0xd0, 0xf7, 0xdc}}
 
626
 
 
627
#define NS_SCHEMAELEMENT_CONTRACTID    \
 
628
"@mozilla.org/xmlextras/schemas/schemaelement;1"
 
629
 
 
630
#define NS_SCHEMAELEMENTREF_CID                    \
 
631
{ /* a62b4292-5d30-4085-9dbb-3f478d639188 */       \
 
632
 0xa62b4292, 0x5d30, 0x4085,                       \
 
633
 {0x9d, 0xbb, 0x3f, 0x47, 0x8d, 0x63, 0x91, 0x88}}
 
634
 
 
635
#define NS_SCHEMAELEMENTREF_CONTRACTID    \
 
636
"@mozilla.org/xmlextras/schemas/schemaelementref;1"
 
637
 
 
638
#define NS_SCHEMAATTRIBUTE_CID                     \
 
639
{ /* 7b3820e6-0fd9-4025-9ba8-73f3a1ab1ba6 */       \
 
640
 0x7b3820e6, 0x0fd9, 0x4025,                       \
 
641
 {0x9b, 0xa8, 0x73, 0xf3, 0xa1, 0xab, 0x1b, 0xa6}}
 
642
 
 
643
#define NS_SCHEMAATTRIBUTE_CONTRACTID    \
 
644
"@mozilla.org/xmlextras/schemas/schemaattribute;1"
 
645
 
 
646
#define NS_SCHEMAATTRIBUTEREF_CID                  \
 
647
{ /* 53fe1960-e0df-487f-a26c-a3073a8e863a */       \
 
648
 0x53fe1960, 0xe0df, 0x487f,                       \
 
649
 {0xa2, 0x6c, 0xa3, 0x07, 0x3a, 0x8e, 0x86, 0x3a}}
 
650
 
 
651
#define NS_SCHEMAATTRIBUTEREF_CONTRACTID    \
 
652
"@mozilla.org/xmlextras/schemas/schemaattributeref;1"
 
653
 
 
654
#define NS_SCHEMAATTRIBUTEGROUP_CID                \
 
655
{ /* 1f3d1ad4-2501-4097-9293-6e40890cf72a */       \
 
656
 0x1f3d1ad4, 0x2501, 0x4097,                       \
 
657
 {0x92, 0x93, 0x6e, 0x40, 0x89, 0x0c, 0xf7, 0x2a}}
 
658
 
 
659
#define NS_SCHEMAATTRIBUTEGROUP_CONTRACTID    \
 
660
"@mozilla.org/xmlextras/schemas/schemaattributegroup;1"
 
661
 
 
662
#define NS_SCHEMAATTRIBUTEGROUPREF_CID             \
 
663
{ /* 99596213-d550-4b46-ae04-7dd38dd7abff */       \
 
664
 0x99596213, 0xd550, 0x4b46,                       \
 
665
 {0xae, 0x04, 0x7d, 0xd3, 0x8d, 0xd7, 0xab, 0xff}}
 
666
 
 
667
#define NS_SCHEMAATTRIBUTEGROUPREF_CONTRACTID    \
 
668
"@mozilla.org/xmlextras/schemas/schemaattributegroupref;1"
 
669
 
 
670
#define NS_SCHEMAANYATTRIBUTE_CID                  \
 
671
{ /* 4e248fa3-79d7-4821-bc69-63e5275e879c */       \
 
672
 0x4e248fa3, 0x79d7, 0x4821,                       \
 
673
 {0xbc, 0x69, 0x63, 0xe5, 0x27, 0x5e, 0x87, 0x9c}}
 
674
 
 
675
#define NS_SCHEMAANYATTRIBUTE_CONTRACTID    \
 
676
"@mozilla.org/xmlextras/schemas/schemaanyattribute;1"
 
677
 
 
678
#define NS_SCHEMAFACET_CID                         \
 
679
{ /* fbaa0537-f931-4160-86a0-de849de08635 */       \
 
680
 0xfbaa0537, 0xf931, 0x4160,                       \
 
681
 {0x86, 0xa0, 0xde, 0x84, 0x9d, 0xe0, 0x86, 0x35}}
 
682
 
 
683
#define NS_SCHEMAFACET_CONTRACTID    \
 
684
"@mozilla.org/xmlextras/schemas/schemafacet;1"
 
685
 
 
686
#define NS_SOAPARRAY_CID                         \
 
687
{ /* 0df92b09-36d6-4bed-ac6f-dbc195e35218 */       \
 
688
 0x0df92b09, 0x36d6, 0x4bed,                       \
 
689
 {0xac, 0x6f, 0xdb, 0xc1, 0x95, 0xe3, 0x52, 0x18}}
 
690
 
 
691
#define NS_SOAPARRAY_CONTRACTID    \
 
692
"@mozilla.org/xmlextras/schemas/soaparray;1"
 
693
 
 
694
#define NS_SOAPARRAYTYPE_CID                       \
 
695
{ /* 9df7bcdb-3676-49dd-b5b9-4257dc326231 */       \
 
696
 0x9df7bcdb, 0x3676, 0x49dd,                       \
 
697
 {0xb5, 0xb9, 0x42, 0x57, 0xdc, 0x32, 0x62, 0x31}}
 
698
 
 
699
#define NS_SOAPARRAYTYPE_CONTRACTID    \
 
700
"@mozilla.org/xmlextras/schemas/soaparraytype;1"
 
701
 
 
702
#endif // __nsSchemaPrivate_h__
 
703
 
 
704