Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] pxp question
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Gerd Stolpmann <info@g...>
Subject: Re: [Caml-list] pxp question
Am Mon, 2004-04-26 um 12.42 schrieb Paul Argentoff:
> Hello World.
> 
> I'm a novice in pxp, so here is one of my firs problems: when I compile this:
> ...
> let collector = find ~deeply:true (fun node -> node # id_attribute_value = 
> colr_name) collectors
> ...
> I get:

I think this snippet of code is not enough to see the error. The error
message looks like as if [collectors] is a function, and of course,
[find] expects that it is a node.

Gerd

> This expression has type
>   ('a Pxp_document.node #Pxp_document.extension as 'a) Pxp_document.node ->
>   'a Pxp_document.node
> but is here used with type
>   ('b Pxp_document.node #Pxp_document.extension as 'b) Pxp_document.node =
>     < add_node : ?force:bool -> 'b Pxp_document.node -> unit;
>       add_pinstr : Pxp_dtd.proc_instruction -> unit;
>       append_node : 'b Pxp_document.node -> unit;
>       attribute : string -> Pxp_core_types.att_value;
>       attribute_names : string list;
>       attribute_type : string -> Pxp_core_types.att_type;
>       attributes : (string * Pxp_core_types.att_value) list;
>       attributes_as_nodes : 'b Pxp_document.node list;
>       classify_data_node : 'b Pxp_document.node ->
>                            Pxp_document.data_node_classification;
>       comment : string option; complement_attlist : unit -> unit;
>       create_data : Pxp_dtd.dtd -> string -> 'b Pxp_document.node;
>       create_element : ?name_pool_for_attribute_values:Pxp_core_types.pool ->
>                        ?position:string * int * int ->
>                        ?valcheck:bool ->
>                        ?att_values:(string * Pxp_core_types.att_value) list ->
>                        Pxp_dtd.dtd ->
>                        Pxp_document.node_type ->
>                        (string * string) list -> 'b Pxp_document.node;
>       create_other : ?position:string * int * int ->
>                      Pxp_dtd.dtd ->
>                      Pxp_document.node_type -> 'b Pxp_document.node;
>       data : string; delete : unit; dtd : Pxp_dtd.dtd;
>       dump : Format.formatter -> unit;
>       encoding : Pxp_core_types.rep_encoding; extension : 'b;
>       id_attribute_name : string; id_attribute_value : string;
>       idref_attribute_names : string list;
>       insert_nodes : ?pos:int -> 'b Pxp_document.node list -> unit;
>       internal_adopt : 'b Pxp_document.node option -> int -> unit;
>       internal_delete : 'b Pxp_document.node -> unit;
>       internal_init : string * int * int ->
>                       Pxp_core_types.pool option ->
>                       bool ->
>                       Pxp_dtd.dtd ->
>                       string ->
>                       (string * string) list ->
>                       (string * Pxp_core_types.att_value) list -> unit;
>       internal_init_other : string * int * int ->
>                             Pxp_dtd.dtd -> Pxp_document.node_type -> unit;
>       internal_set_pos : int -> unit;
>       iter_nodes : ('b Pxp_document.node -> unit) -> unit;
>       iter_nodes_sibl : ('b Pxp_document.node option ->
>                          'b Pxp_document.node ->
>                          'b Pxp_document.node option -> unit) ->
>                         unit;
>       local_validate : ?use_dfa:bool ->
>                        ?check_data_nodes:bool -> unit -> unit;
>       localname : string; namespace_info : 'b Pxp_document.namespace_info;
>       namespace_manager : Pxp_dtd.namespace_manager; namespace_uri : 
>       string; next_node : 'b Pxp_document.node; node_path : int list;
>       node_position : int; node_type : Pxp_document.node_type;
>       normprefix : string; nth_node : int -> 'b Pxp_document.node;
>       optional_list_attribute : string -> string list;
>       optional_string_attribute : string -> string option;
>       orphaned_clone : 'b Pxp_document.node;
>       orphaned_flat_clone : 'b Pxp_document.node;
>       parent : 'b Pxp_document.node;
>       pinstr : string -> Pxp_dtd.proc_instruction list;
>       pinstr_names : string list; position : string * int * int;
>       previous_node : 'b Pxp_document.node;
>       quick_set_attributes : (string * Pxp_core_types.att_value) list -> unit;
>       remove : unit -> unit;
>       remove_nodes : ?pos:int -> ?len:int -> unit -> unit;
>       required_list_attribute : string -> string list;
>       required_string_attribute : string -> string;
>       reset_attribute : string -> unit; root : 'b Pxp_document.node;
>       set_attribute : ?force:bool ->
>                       string -> Pxp_core_types.att_value -> unit;
>       set_attributes : (string * Pxp_core_types.att_value) list -> unit;
>       set_comment : string option -> unit; set_data : string -> unit;
>       set_namespace_info : 'b Pxp_document.namespace_info option -> unit;
>       set_nodes : 'b Pxp_document.node list -> unit;
>       sub_nodes : 'b Pxp_document.node list; validate : unit -> unit;
>       validate_attlist : unit -> unit;
>       validate_contents : ?use_dfa:bool ->
>                           ?check_data_nodes:bool -> unit -> unit;
>       write : ?prefixes:string list ->
>               ?default:string ->
>               Pxp_core_types.output_stream -> Pxp_core_types.encoding -> unit 
> >
> 
> Maybe I haven't understood the idea of Pxp_document.find function?
> -- 
> Yours truly, WBR, Paul Argentoff.
> Jabber:	paul@jabber.rtelekom.ru
> RIPE:	PA1291-RIPE
> 
> -------------------
> To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
> Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
> Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
> 
> 
-- 
------------------------------------------------------------
Gerd Stolpmann * Viktoriastr. 45 * 64293 Darmstadt * Germany 
gerd@gerd-stolpmann.de          http://www.gerd-stolpmann.de
------------------------------------------------------------

-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners