From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id NAA12135; Mon, 26 Apr 2004 13:51:25 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id NAA12314 for ; Mon, 26 Apr 2004 13:51:24 +0200 (MET DST) Received: from mail.npc.de (fw.npc.de [62.225.140.214]) by nez-perce.inria.fr (8.12.10/8.12.10) with ESMTP id i3QBpNjq025223 for ; Mon, 26 Apr 2004 13:51:23 +0200 Received: from styx.ffm.npc.de (lion.npc.de [192.168.129.1]) by mail.npc.de (Postfix) with ESMTP id 34D331816; Mon, 26 Apr 2004 13:51:22 +0200 (CEST) Received: from hera.ffm.npc.de (hera.ffm.npc.de [192.168.130.8]) by styx.ffm.npc.de (Postfix STYX NPC GmbH) with ESMTP id 0BB3FC437; Mon, 26 Apr 2004 13:30:41 +0200 (CEST) Received: from ares.ffm.npc.de (ares.ffm.npc.de [192.168.130.32]) by hera.ffm.npc.de (Postfix HERA NPC GmbH) with ESMTP id BCFFD159C9; Mon, 26 Apr 2004 13:30:41 +0200 (CEST) Received: from ares.ffm.npc.de (ares.ffm.npc.de [192.168.130.32]) by ares.ffm.npc.de (Postfix ARES NPC GmbH) with ESMTP id 67C5B183F; Mon, 26 Apr 2004 13:30:41 +0200 (CEST) Subject: Re: [Caml-list] pxp question From: Gerd Stolpmann To: argentoff@rtelekom.ru Cc: caml-list@inria.fr In-Reply-To: <200404261442.12641.argentoff@rtelekom.ru> References: <200404261442.12641.argentoff@rtelekom.ru> Content-Type: text/plain Content-Transfer-Encoding: 7bit X-Mailer: Ximian Evolution 1.0.8 Date: 26 Apr 2004 13:30:41 +0200 Message-Id: <1082979041.5143.46.camel@ares> Mime-Version: 1.0 X-Miltered: at = by Joe's j-chkmail ("http://j-chkmail.ensmp.fr")! X-Loop: caml-list@inria.fr X-Spam: no; 0.00; caml-list:01 pxp:01 gerd:01 stolpmann:01 2004:99 pxp:01 gerd:01 pinstr:01 attlist:01 formatter:01 idref:01 orphaned:01 clone:01 orphaned:01 clone:01 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk 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