~ubuntu-branches/ubuntu/hardy/pxp/hardy

« back to all changes in this revision

Viewing changes to src/pxp-engine/pxp_dtd.mli

  • Committer: Bazaar Package Importer
  • Author(s): Stefano Zacchiroli
  • Date: 2005-03-29 11:06:39 UTC
  • mfrom: (2.1.2 hoary)
  • Revision ID: james.westby@ubuntu.com-20050329110639-5p39hz1d4aq3r2ec
Tags: 1.1.95-6
* Rebuilt against ocaml 3.08.3
* No longer built with wlex support (since wlex is no longer supported
  upstream and corresponding package has been removed from the debian
  archive)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
(* $Id: pxp_dtd.mli,v 1.16 2002/03/10 23:39:28 gerd Exp $
 
1
(* $Id: pxp_dtd.mli 697 2004-08-21 21:02:46Z gerd $
2
2
 * ----------------------------------------------------------------------
3
3
 * PXP: The polymorphic XML parser for Objective Caml.
4
4
 * Copyright by Gerd Stolpmann. See LICENSE for details.
24
24
 *                           declaration
25
25
 * class dtd_notation ...... represents a notation declaration
26
26
 * class proc_instruction .. represents a processing instruction
 
27
 * class namespace_manager . manages the mapping from normalized prefixes
 
28
 *                           to namespace IDs
27
29
 * ======================================================================
28
30
 *
29
31
 *)
30
32
 
31
33
 
32
34
type validation_record =
33
 
    { content_model   : Pxp_types.content_model_type;
 
35
    { content_model   : Pxp_core_types.content_model_type;
34
36
      content_dfa     : Pxp_dfa.dfa_definition option Lazy.t;
35
37
      id_att_name     : string option;
36
38
      idref_att_names : string list;
37
39
      att_lookup      : int Pxp_aux.Str_hashtbl.t;
38
 
      init_att_vals   : (string * Pxp_types.att_value) array;
39
 
      att_info        : (Pxp_types.att_type * bool) array;
 
40
      init_att_vals   : (string * Pxp_core_types.att_value) array;
 
41
      att_info        : (Pxp_core_types.att_type * bool) array;
40
42
      att_required    : int list;
41
43
      accept_undeclared_atts : bool;
42
44
    }
46
48
   *)
47
49
 
48
50
 
49
 
(* Very experimental namespace support: *)
50
 
 
51
51
class namespace_manager :
52
52
  (* This class manages mappings from URIs to normalized prefixes. For every
53
53
   * namespace a namespace_manager object contains a set of mappings
54
54
   * uri1 |-> np, uri2 |-> np, ..., uriN |-> np.
55
 
   * The normalized prefix np is characterical of the namespace, and
 
55
   * The normalized prefix np is characterstic of the namespace, and
56
56
   * identifies the namespace uniquely.
57
57
   * The first URI uri1 is the primary URI, the other URIs are aliases.
58
58
   * The following operations are supported:
78
78
    method add_uri : string -> string -> unit
79
79
      (* add_uri np uri: adds uri as alias URI to the namespace identified
80
80
       * by the normprefix np (see above for detailed semantics). The method
81
 
       * raises Not_found if the normprefix np is unknown to the object,
 
81
       * raises Namespace_prefix_not_managed if the normprefix np is unknown
 
82
       * to the object,
82
83
       * and it fails (Namespace_error) if the uri is member of a
83
84
       * different namespace. Nothing happens if the uri is already member
84
85
       * of the namespace np.
 
86
       *
 
87
       * CHANGE IN PXP 1.2: Using exception Namespace_prefix_not_managed
 
88
       * instead of Not_found.
85
89
       *)
86
90
    method add_namespace : string -> string -> unit
87
91
      (* add_namespace np uri: adds a new namespace to the object. The
102
106
       * the normprefix.
103
107
       *)
104
108
    method get_primary_uri : string -> string
105
 
      (* Return the primary URI for a normprefix, or raises Not_found.
106
 
       * get_uri "" raises always Not_found.
 
109
      (* Return the primary URI for a normprefix, or raises
 
110
       * Namespace_prefix_not_managed. get_uri "" raises always this
 
111
       * exception.
 
112
       *
 
113
       * CHANGE IN PXP 1.2: Using exception Namespace_prefix_not_managed
 
114
       * instead of Not_found.
107
115
       *)
108
116
    method get_uri_list : string -> string list
109
117
      (* Return all URIs for a normprefix, or [] if the normprefix is
111
119
       * returned list is the primary URI.
112
120
       *)
113
121
    method get_normprefix : string -> string
114
 
      (* Return the normprefix for a URI, or raises Not_found *)
 
122
      (* Return the normprefix for a URI, or raises 
 
123
       * Namespace_not_managed.
 
124
       *
 
125
       * CHANGE IN PXP 1.2: Using exception Namespace_not_managed
 
126
       * instead of Not_found.
 
127
       *)
115
128
    method iter_namespaces : (string -> unit) -> unit
116
129
      (* Iterates over all namespaces contained in the object, and
117
130
       * calls the passed function for every namespace. The argument of the
118
131
       * invoked function is the normprefix of the namespace.
119
132
       *)
 
133
    method as_declaration : (string * string) list
 
134
      (* Returns the list of normprefixes and primary URIs. Useful
 
135
       * to create the corresponding namespace scope, e.g.
 
136
       * new namespace_scope_impl mng None (mng#as_declaration)
 
137
       *)
120
138
 
121
139
    (* Encodings: prefixes and URIs are always encoded in the default
122
140
     * encoding of the document
125
143
;;
126
144
 
127
145
 
 
146
val create_namespace_manager : unit -> namespace_manager
 
147
  (* Preferred way of creating a namespace_manager *)
 
148
 
 
149
 
 
150
(** The recursive class type [namespace_scope] represents the original
 
151
 * namespace declarations found in the XML text. A single [namespace_scope]
 
152
 * object contains a list of declared namespaces
 
153
 * {[ [ (dp1, uri1); (dp2; uri2); ... ] ]}
 
154
 * corresponding to the "xmlns"-type declarations found in a single
 
155
 * XML element:
 
156
 * {[ <element xmlns:dp1="uri1" xmlns:dp2="uri2" ... > ]}
 
157
 * For the declaration of a default namespace [xmlns="uri"] the pair
 
158
 * [("",uri)] must be included in the list. The special pair [("","")]
 
159
 * means that the former default namespace is "undeclared".
 
160
 *
 
161
 * Furthermore, the [namespace_scope] object may have a parent 
 
162
 * [namespace_scope], representing the namespace declarations in the
 
163
 * surrounding XML text.
 
164
 *
 
165
 * The [namespace_scope] objects are connected with the [namespace_manager]
 
166
 * to allow translations from the namespace prefixes found in the XML
 
167
 * text (also called "display prefixes" from now on) to the normalized
 
168
 * prefixes stored in the [namespace_manager], and vice versa.
 
169
 *
 
170
 * The [namespace_scope] objects are intentionally immutable in order to
 
171
 * allow memory sharing.
 
172
 *)
 
173
class type namespace_scope =
 
174
object
 
175
  method namespace_manager : namespace_manager
 
176
    (** Returns the [namespace_manager] to which this scope object is
 
177
     * connected
 
178
     *)
 
179
  method parent_scope : namespace_scope option
 
180
    (** Returns the parent object, if any *)
 
181
  method declaration : (string * string) list
 
182
    (** Returns the list of namespace declarations of this scope (i.e.
 
183
     * the declarations in parent objects are not considered). The
 
184
     * list contains pairs [ (display_prefix, uri) ].
 
185
     *)
 
186
  method effective_declaration : (string * string) list
 
187
    (** Returns the list of namespace declarations of this scope and
 
188
     * all parent scopes. The list contains pairs [ (display_prefix, uri) ].
 
189
     * Prefixes hidden by earlier declarations are suppressed in the list
 
190
     *)
 
191
  method display_prefix_of_uri : string -> string
 
192
    (** Translates the URI to the corresponding display prefix as declared
 
193
     * in this object or any parent object. Raises [Namespace_not_in_scope]
 
194
     * when the declaration cannot be found.
 
195
     *)
 
196
  method display_prefix_of_normprefix : string -> string
 
197
    (** Translates the normalized prefix to the corresponding display
 
198
     * prefix as declared in this object or any parent object. Raises
 
199
     * [Namespace_not_in_scope] when the declaration cannot be found, and
 
200
     * [Namespace_prefix_not_managed] when the
 
201
     * normalized prefix is unknown to the namespace manager.
 
202
     *)
 
203
  method uri_of_display_prefix : string -> string
 
204
    (** Translates the display prefix to the corresponding URI as
 
205
     * declared in this object or any parent object. Raises
 
206
     * [Not_found] when the declaration cannot be found.
 
207
     *)
 
208
  method normprefix_of_display_prefix : string -> string
 
209
    (** Translates the display prefix to the corresponding normalized
 
210
     * prefix as declared in this object or any parent object. Raises
 
211
     * [Not_found] when the declaration cannot be found, and
 
212
     * [Namespace_not_managed] when the
 
213
     * namespace manager does not know the namespace.
 
214
     *)
 
215
end
 
216
;;
 
217
 
 
218
 
 
219
class namespace_scope_impl : 
 
220
        namespace_manager -> 
 
221
        namespace_scope option ->
 
222
        (string * string) list ->
 
223
          namespace_scope
 
224
   (** An implementation of [namespace_scope]. New scopes are created by
 
225
    * {[ new namespace_scope_impl mng parent_opt decl ]}
 
226
    * where [mng] is the namespace managaer, [parent_opt] is the optional
 
227
    * parent scope, and [decl] is the declaration list.
 
228
    *)
 
229
 
 
230
 
 
231
val create_namespace_scope : 
 
232
    ?parent:namespace_scope -> 
 
233
    ?decl:(string * string) list ->
 
234
    namespace_manager ->
 
235
      namespace_scope
 
236
  (* Preferred way of creating a namespace_scope *)
 
237
    
 
238
 
128
239
class dtd :
129
240
  (* Creation:
130
241
   *   new dtd
131
242
   * creates a new, empty DTD object without any declaration, without a root
132
243
   * element, without an ID.
133
244
   *)
134
 
  Pxp_types.collect_warnings -> 
135
 
  Pxp_types.rep_encoding ->
 
245
  ?swarner:Pxp_core_types.symbolic_warnings ->
 
246
  Pxp_core_types.collect_warnings -> 
 
247
  Pxp_core_types.rep_encoding ->
136
248
  object
137
249
    method root : string option
138
 
      (* get the name of the root element if present *)
 
250
      (* get the name of the root element if present. This is the name
 
251
       * following "<!DOCTYPE". If there is no DOCTYPE declaration, 
 
252
       * this method will return None.
 
253
       *)
139
254
 
140
255
    method set_root : string -> unit
141
256
      (* set the name of the root element. This method can be invoked 
142
 
       * only once
143
 
       *)
144
 
 
145
 
    method id : Pxp_types.dtd_id option
146
 
      (* get the identifier for this DTD *)
147
 
 
148
 
    method set_id : Pxp_types.dtd_id -> unit
 
257
       * only once (usually by the parser)
 
258
       *)
 
259
 
 
260
    method id : Pxp_core_types.dtd_id option
 
261
      (* get the identifier for this DTD. Possible return values:
 
262
       * None: There is no DOCTYPE declaration, or only
 
263
       *    "<!DOCTYPE name>"
 
264
       * Some Internal: There is a DOCTYPE declaration with material
 
265
       *    in brackets like "<!DOCTYPE name [ declarations ... ]>"
 
266
       * Some(External xid): There is a DOCTYPE declaration with
 
267
       *    a SYSTEM or PUBLIC identifier (described by xid), but without
 
268
       *    brackets, i.e. "<!DOCTYPE name SYSTEM '...'>" or 
 
269
       *    "<!DOCTYPE name PUBLIC '...' '...'>".
 
270
       * Some(Derived xid): There is a DOCTYPE declaration with
 
271
       *    a SYSTEM or PUBLIC identifier (described by xid), _and_ with
 
272
       *    brackets
 
273
       *)
 
274
 
 
275
    method set_id : Pxp_core_types.dtd_id -> unit
149
276
      (* set the identifier. This method can be invoked only once *)
150
277
 
151
 
    method encoding : Pxp_types.rep_encoding
 
278
    method encoding : Pxp_core_types.rep_encoding
152
279
      (* returns the encoding used for character representation *)
153
280
 
 
281
    method lexer_factory : Pxp_lexer_types.lexer_factory
 
282
      (** Returns a lexer factory for the character encoding *)
 
283
 
154
284
 
155
285
    method allow_arbitrary : unit
156
286
      (* After this method has been invoked, the object changes its behaviour:
276
406
       * Otherwise Validation_error.
277
407
       *)
278
408
 
279
 
    method write : Pxp_types.output_stream -> Pxp_types.encoding -> bool -> unit
 
409
    method write : 
 
410
             Pxp_core_types.output_stream -> 
 
411
             Pxp_core_types.encoding -> 
 
412
             bool -> 
 
413
               unit
280
414
      (* write os enc doctype:
281
415
       * Writes the DTD as 'enc'-encoded string to 'os'. If 'doctype', a 
282
416
       * DTD like <!DOCTYPE root [ ... ]> is written. If 'not doctype',
288
422
       * generic way of writing references to external entities.
289
423
       *)
290
424
 
291
 
    method write_ref : Pxp_types.output_stream -> Pxp_types.encoding -> unit
 
425
    method write_ref : 
 
426
             Pxp_core_types.output_stream -> 
 
427
             Pxp_core_types.encoding -> 
 
428
               unit
292
429
     (* write_ref os enc:
293
430
      * Writes a reference to the DTD as 'enc'-encoded string to 'os'.
294
431
      * The reference looks as follows:
304
441
    (*----------------------------------------*)
305
442
    method invalidate : unit
306
443
      (* INTERNAL METHOD *)
307
 
    method warner : Pxp_types.collect_warnings
 
444
    method warner : Pxp_core_types.collect_warnings
 
445
      (* INTERNAL METHOD *)
 
446
    method swarner : Pxp_core_types.symbolic_warnings option
308
447
      (* INTERNAL METHOD *)
309
448
  end
310
449
 
330
469
       * entity.
331
470
       *)
332
471
 
333
 
    method content_model : Pxp_types.content_model_type
 
472
    method content_model : Pxp_core_types.content_model_type
334
473
      (* get the content model of this element declaration, or Unspecified *)
335
474
 
336
475
    method content_dfa : Pxp_dfa.dfa_definition option
339
478
       * deterministic.
340
479
       *)
341
480
 
342
 
    method set_cm_and_extdecl : Pxp_types.content_model_type -> bool -> unit
 
481
    method set_cm_and_extdecl : 
 
482
             Pxp_core_types.content_model_type -> bool -> unit
343
483
      (* set_cm_and_extdecl cm extdecl:
344
484
       * set the content model to 'cm'. Once the content model is not 
345
485
       * Unspecified, it cannot be set to a different value again.
347
487
       * entity ('extdecl').
348
488
       *)
349
489
 
350
 
    method encoding : Pxp_types.rep_encoding
 
490
    method encoding : Pxp_core_types.rep_encoding
351
491
      (* Return the encoding of the strings *)
352
492
 
353
493
    method allow_arbitrary : unit
363
503
      (* Returns whether arbitrary attributes are allowed or not. *)
364
504
 
365
505
    method attribute : string -> 
366
 
                         Pxp_types.att_type * Pxp_types.att_default
 
506
                         Pxp_core_types.att_type * Pxp_core_types.att_default
367
507
      (* get the type and default value of a declared attribute, or raise
368
508
       * Validation_error if the attribute does not exist.
369
509
       * If 'arbitrary_allowed', the exception Undeclared is raised instead
403
543
      (* Returns the names of the attributes with type IDREF or IDREFS. *)
404
544
 
405
545
    method add_attribute : string -> 
406
 
                           Pxp_types.att_type -> 
407
 
                           Pxp_types.att_default -> 
 
546
                           Pxp_core_types.att_type -> 
 
547
                           Pxp_core_types.att_default -> 
408
548
                           bool ->
409
549
                             unit
410
550
      (* add_attribute name type default extdecl:
422
562
       * Raises mostly Validation_error if the validation fails.
423
563
       *)
424
564
 
425
 
    method write : Pxp_types.output_stream -> Pxp_types.encoding -> unit
 
565
    method write : 
 
566
             Pxp_core_types.output_stream -> Pxp_core_types.encoding -> unit
426
567
      (* write os enc:
427
568
       * Writes the <!ELEMENT ... > declaration to 'os' as 'enc'-encoded string.
428
569
       *)
434
575
 
435
576
(* ---------------------------------------------------------------------- *)
436
577
 
437
 
and dtd_notation : string -> Pxp_types.ext_id -> Pxp_types.rep_encoding ->
 
578
and dtd_notation : 
 
579
       string -> Pxp_core_types.ext_id -> Pxp_core_types.rep_encoding ->
438
580
  (* Creation:
439
581
   *    new dtd_notation a_name an_external_ID init_encoding
440
582
   * creates a new dtd_notation object with the given name and the given
442
584
   *)
443
585
  object
444
586
    method name : string
445
 
    method ext_id : Pxp_types.ext_id
446
 
    method encoding : Pxp_types.rep_encoding
 
587
    method ext_id : Pxp_core_types.ext_id
 
588
    method encoding : Pxp_core_types.rep_encoding
447
589
 
448
 
    method write : Pxp_types.output_stream -> Pxp_types.encoding -> unit
 
590
    method write : 
 
591
             Pxp_core_types.output_stream -> Pxp_core_types.encoding -> unit
449
592
      (* write_compact_as_latin1 os enc:
450
593
       * Writes the <!NOTATION ... > declaration to 'os' as 'enc'-encoded 
451
594
       * string.
455
598
 
456
599
(* ---------------------------------------------------------------------- *)
457
600
 
458
 
and proc_instruction : string -> string -> Pxp_types.rep_encoding ->
 
601
and proc_instruction : string -> string -> Pxp_core_types.rep_encoding ->
459
602
  (* Creation:
460
603
   *   new proc_instruction a_target a_value
461
604
   * creates a new proc_instruction object with the given target string and
465
608
  object
466
609
    method target : string
467
610
    method value : string
468
 
    method encoding : Pxp_types.rep_encoding
 
611
    method encoding : Pxp_core_types.rep_encoding
469
612
 
470
 
    method write : Pxp_types.output_stream -> Pxp_types.encoding -> unit
 
613
    method write : 
 
614
             Pxp_core_types.output_stream -> Pxp_core_types.encoding -> unit
471
615
      (* write os enc:
472
616
       * Writes the <?...?> PI to 'os' as 'enc'-encoded string.
473
617
       *)
488
632
 
489
633
(* ---------------------------------------------------------------------- *)
490
634
 
 
635
val create_dtd :
 
636
      ?swarner:Pxp_core_types.symbolic_warnings ->
 
637
      ?warner:Pxp_core_types.collect_warnings -> 
 
638
      Pxp_core_types.rep_encoding ->
 
639
        dtd
 
640
  (* Preferred way of creating a DTD. Example:
 
641
   * let dtd = create_dtd 
 
642
   *             ?swarner:config.swarner
 
643
   *             ~warner:config.warner
 
644
   *             config.encoding
 
645
   *
 
646
   * See also Pxp_dtd_parser.create_empty_dtd.
 
647
   *)
 
648
 
 
649
 
 
650
(* ---------------------------------------------------------------------- *)
 
651
 
491
652
type source =
492
653
    Entity of ((dtd -> Pxp_entity.entity) * Pxp_reader.resolver)
493
 
  | ExtID of (Pxp_types.ext_id * Pxp_reader.resolver)
 
654
  | ExtID of (Pxp_core_types.ext_id * Pxp_reader.resolver)
 
655
  | XExtID of (Pxp_core_types.ext_id * string option * Pxp_reader.resolver)
494
656
  (* Sources are pairs of (1) names of entities to open, and (2) methods
495
657
   * of opening entities. See Pxp_yacc for more documentation.
496
658
   *)
509
671
  val get_full_name : Pxp_entity.entity -> string
510
672
      (* The full name includes the ID, too (for diagnostics messages) *)
511
673
 
512
 
  val get_encoding : Pxp_entity.entity -> Pxp_types.rep_encoding
 
674
  val get_encoding : Pxp_entity.entity -> Pxp_core_types.rep_encoding
513
675
      (* Return the encoding of the internal representation of the entity *)
514
676
 
515
677
  val get_type : Pxp_entity.entity -> 
521
683
       * internal and external entities.
522
684
       *)
523
685
 
524
 
  val get_xid : Pxp_entity.entity -> Pxp_types.ext_id option
 
686
  val get_xid : Pxp_entity.entity -> Pxp_core_types.ext_id option
525
687
      (* Returns the external ID for external and NDATA entities, and None
526
688
       * for internal entities
527
689
       * TRAP: The external ID may be a relative SYSTEM ID, and it is not
529
691
       * external ID may be meaningless.
530
692
       *)
531
693
 
532
 
  (* TODO: get_resolver - only for external entities. The resolver API should
533
 
   * be extended such that it is possible to retrieve the base URI, if
534
 
   * any
535
 
   *)
 
694
  val get_resolver_id : Pxp_entity.entity -> Pxp_core_types.resolver_id option
 
695
      (* Returns the resolver ID for external entities, and None for other
 
696
       * entities. This is the version as returned by the [active_id] method
 
697
       * by the resolver.
 
698
       * The resolver ID contains more information than the external ID,
 
699
       * for example the base URL relative to which SYSTEM IDs should
 
700
       * be interpreted.
 
701
       *)
 
702
 
 
703
  (* CHECK: There is still no base URL for NDATA entities *)
536
704
 
537
705
  val get_notation : Pxp_entity.entity -> string option
538
706
      (* Returns the notation of NDATA entities, and None for the other
549
717
       *)
550
718
 
551
719
  val create_ndata_entity :
552
 
      name:string -> xid:Pxp_types.ext_id -> notation:string -> dtd -> 
 
720
      name:string -> xid:Pxp_core_types.ext_id -> notation:string -> dtd -> 
553
721
        Pxp_entity.entity
554
722
      (* Creates an NDATA entity. The name and the notation must be encoded
555
723
       * in the same encoding as the DTD. The external ID must be encoded
558
726
 
559
727
  val create_external_entity :
560
728
      ?doc_entity:bool ->
561
 
      name:string -> xid:Pxp_types.ext_id -> resolver:Pxp_reader.resolver ->
562
 
        dtd ->
563
 
          Pxp_entity.entity
 
729
      ?system_base:string ->
 
730
      name:string -> 
 
731
      xid:Pxp_core_types.ext_id -> 
 
732
      resolver:Pxp_reader.resolver ->
 
733
      dtd ->
 
734
        Pxp_entity.entity
564
735
      (* Creates a reference to an external entity. The name must be encoded
565
736
       * in the same encoding as the DTD. The external ID must be encoded
566
737
       * as UTF-8 string (like all external IDs).
568
739
       * ~doc_entity: If true, the entity is a document entity. XML requires
569
740
       *   some additional restrictions for document entities. The default for
570
741
       *   the argument is false.
 
742
       * ~system_base: The base URL if SYSTEM identifiers are passed 
 
743
       *   as [xid]
571
744
       *)
572
745
 
573
746
  val from_external_source :
574
747
      ?doc_entity:bool ->
575
 
      name:string -> dtd -> source -> 
 
748
      name:string -> 
 
749
      dtd -> 
 
750
      source -> 
576
751
        Pxp_entity.entity
577
752
      (* Creates an external entity that reads from the passed source *)
578
753
 
 
754
  val entity_id : Pxp_entity.entity -> Pxp_lexer_types.entity_id
 
755
    (* Returns the abstract entity ID *)
 
756
 
 
757
  val create_entity_id : unit -> Pxp_lexer_types.entity_id
 
758
    (* Create a new abstract entity ID. This ID can be used whereever
 
759
     * an entity_id is expected but no entity is available.
 
760
     *)
 
761
 
579
762
end
580
763
;;
581
764
 
582
765
 
583
766
 
584
 
(* ======================================================================
585
 
 * History:
586
 
 * 
587
 
 * $Log: pxp_dtd.mli,v $
588
 
 * Revision 1.16  2002/03/10 23:39:28  gerd
589
 
 *      Extended the Entity module
590
 
 *
591
 
 * Revision 1.15  2001/12/03 23:45:55  gerd
592
 
 *      new method [write_ref]
593
 
 *
594
 
 * Revision 1.14  2001/07/02 23:21:40  gerd
595
 
 *      Added the Entity module.
596
 
 *
597
 
 * Revision 1.13  2001/06/08 01:15:47  gerd
598
 
 *      Moved namespace_manager from Pxp_document to Pxp_dtd. This
599
 
 * makes it possible that the DTD can recognize the processing instructions
600
 
 * <?pxp:dtd namespace prefix="..." uri="..."?>, and add the namespace
601
 
 * declaration to the manager.
602
 
 *
603
 
 * Revision 1.12  2001/06/07 22:49:11  gerd
604
 
 *      Removed: method write_compact_as_latin1
605
 
 *
606
 
 * Revision 1.11  2000/10/01 19:46:57  gerd
607
 
 *      Changed type of the att_lookup component.
608
 
 *
609
 
 * Revision 1.10  2000/09/22 22:54:30  gerd
610
 
 *      Optimized the attribute checker (internal_init of element
611
 
 * nodes). The validation_record has now more fields to support
612
 
 * internal_init.
613
 
 *
614
 
 * Revision 1.9  2000/09/09 16:41:32  gerd
615
 
 *      New type validation_record.
616
 
 *
617
 
 * Revision 1.8  2000/08/18 21:18:45  gerd
618
 
 *      Updated wrong comments for methods par_entity and gen_entity.
619
 
 * These can raise WF_error and not Validation_error, and this is the
620
 
 * correct behaviour.
621
 
 *
622
 
 * Revision 1.7  2000/07/25 00:30:01  gerd
623
 
 *      Added support for pxp:dtd PI options.
624
 
 *
625
 
 * Revision 1.6  2000/07/23 02:16:33  gerd
626
 
 *      Support for DFAs.
627
 
 *
628
 
 * Revision 1.5  2000/07/16 16:34:41  gerd
629
 
 *      New method 'write', the successor of 'write_compact_as_latin1'.
630
 
 *
631
 
 * Revision 1.4  2000/07/14 13:56:49  gerd
632
 
 *      Added methods id_attribute_name and idref_attribute_names.
633
 
 *
634
 
 * Revision 1.3  2000/07/09 00:13:37  gerd
635
 
 *      Added methods gen_entity_names, par_entity_names.
636
 
 *
637
 
 * Revision 1.2  2000/06/14 22:19:06  gerd
638
 
 *      Added checks such that it is impossible to mix encodings.
639
 
 *
640
 
 * Revision 1.1  2000/05/29 23:48:38  gerd
641
 
 *      Changed module names:
642
 
 *              Markup_aux          into Pxp_aux
643
 
 *              Markup_codewriter   into Pxp_codewriter
644
 
 *              Markup_document     into Pxp_document
645
 
 *              Markup_dtd          into Pxp_dtd
646
 
 *              Markup_entity       into Pxp_entity
647
 
 *              Markup_lexer_types  into Pxp_lexer_types
648
 
 *              Markup_reader       into Pxp_reader
649
 
 *              Markup_types        into Pxp_types
650
 
 *              Markup_yacc         into Pxp_yacc
651
 
 * See directory "compatibility" for (almost) compatible wrappers emulating
652
 
 * Markup_document, Markup_dtd, Markup_reader, Markup_types, and Markup_yacc.
653
 
 *
654
 
 * ======================================================================
655
 
 * Old logs from markup_dtd.ml:
656
 
 *
657
 
 * Revision 1.11  2000/05/29 21:14:57  gerd
658
 
 *      Changed the type 'encoding' into a polymorphic variant.
659
 
 *
660
 
 * Revision 1.10  2000/05/27 19:20:38  gerd
661
 
 *      Changed the interfaces for the standalone check: New
662
 
 * methods: standalone_declaration, set_standalone_declaration,
663
 
 * externally_declared, attribute_violates_standalone_declaration.
664
 
 *      The method set_content_model has been renamed to
665
 
 * set_cm_and_extdecl; it now initializes also whether the element
666
 
 * has been declared in an external entity.
667
 
 *      Methods add_gen_entity and gen_entity pass an additional
668
 
 * boolean argument containing whether the declaration of the
669
 
 * general entity happened in an external entity.
670
 
 *      Method add_attribute expects this argument, too, which
671
 
 * states whether the declaration of the attribute happened in an
672
 
 * external entity.
673
 
 *
674
 
 * Revision 1.9  2000/05/20 20:31:40  gerd
675
 
 *      Big change: Added support for various encodings of the
676
 
 * internal representation.
677
 
 *
678
 
 * Revision 1.8  2000/05/06 23:10:26  gerd
679
 
 *      allow_arbitrary for elements, too.
680
 
 *
681
 
 * Revision 1.7  2000/05/01 20:42:52  gerd
682
 
 *         New method write_compact_as_latin1.
683
 
 *
684
 
 * Revision 1.6  2000/03/11 22:58:15  gerd
685
 
 *      Updated to support Markup_codewriter.
686
 
 *
687
 
 * Revision 1.5  2000/02/22 02:32:02  gerd
688
 
 *      Updated.
689
 
 *
690
 
 * Revision 1.4  1999/11/09 22:15:41  gerd
691
 
 *      Added method "arbitrary_allowed".
692
 
 *
693
 
 * Revision 1.3  1999/09/01 16:21:56  gerd
694
 
 *      "dtd" classes have now an argument that passes a "warner".
695
 
 *
696
 
 * Revision 1.2  1999/08/15 02:20:23  gerd
697
 
 *         New feature: a DTD can allow arbitrary elements.
698
 
 *
699
 
 * Revision 1.1  1999/08/10 00:35:51  gerd
700
 
 *      Initial revision.
701
 
 *
702
 
 * 
703
 
 *)