caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Gerd Stolpmann <info@gerd-stolpmann.de>
To: argentoff@rtelekom.ru
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] pxp question
Date: 26 Apr 2004 13:30:41 +0200	[thread overview]
Message-ID: <1082979041.5143.46.camel@ares> (raw)
In-Reply-To: <200404261442.12641.argentoff@rtelekom.ru>

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


  reply	other threads:[~2004-04-26 11:51 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-04-26 10:42 Paul Argentoff
2004-04-26 11:30 ` Gerd Stolpmann [this message]
2004-04-26 12:02   ` Paul Argentoff
2004-04-26 11:44 ` Jacques GARRIGUE

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1082979041.5143.46.camel@ares \
    --to=info@gerd-stolpmann.de \
    --cc=argentoff@rtelekom.ru \
    --cc=caml-list@inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).