* [Caml-list] PXP
@ 2002-06-04 16:19 Gaurav Chanda
2002-06-04 19:55 ` Stefano Zacchiroli
2002-06-04 22:53 ` Gerd Stolpmann
0 siblings, 2 replies; 9+ messages in thread
From: Gaurav Chanda @ 2002-06-04 16:19 UTC (permalink / raw)
To: caml-list
Hello
I am using PXP to parse and validate an XML document. The follwing code
<?xml version="1.0"?>
<methodCall>
<methodName>examples.getStateName</methodName>
<params>
<param>
<value><i4>41</i4></value>
</param>
</params>
</methodCall>
gave this error at runtime:
Fatal error: exception Pxp_types.At("In entity [toplevel] = ANONYMOUS, at line 2, position 12:", _)
Could anybody help me solve this problem ?
Gaurav
________________________________________________________
Outgrown your current e-mail service?
Get a 25MB Inbox, POP3 Access, No Ads and No Taglines with LYCOS MAIL PLUS.
http://login.mail.lycos.com/brandPage.shtml?pageId=plus
-------------------
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
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Caml-list] PXP
2002-06-04 16:19 [Caml-list] PXP Gaurav Chanda
@ 2002-06-04 19:55 ` Stefano Zacchiroli
2002-06-04 22:53 ` Gerd Stolpmann
1 sibling, 0 replies; 9+ messages in thread
From: Stefano Zacchiroli @ 2002-06-04 19:55 UTC (permalink / raw)
To: Inria Ocaml Mailing List
On Tue, Jun 04, 2002 at 09:19:08AM -0700, Gaurav Chanda wrote:
> <?xml version="1.0"?>
> <methodCall>
> <methodName>examples.getStateName</methodName>
> <params>
> <param>
> <value><i4>41</i4></value>
> </param>
> </params>
> </methodCall>
>
> gave this error at runtime:
> Fatal error: exception Pxp_types.At("In entity [toplevel] = ANONYMOUS, at line 2, position 12:", _)
>
> Could anybody help me solve this problem ?
Which function are you using to parse the above XML document?
If you are using functions like "parse_document_entity" you will get the
reported error because your XML document is _not_ valid, it doesn't
refer to any DTD.
Fixes:
- use a DTD
- use a non validating parsing, using functions like
"parse_wfdocument_entity"
Cheers.
--
Stefano Zacchiroli - undergraduate student of CS @ Univ. Bologna, Italy
zack@cs.unibo.it | ICQ# 33538863 | http://www.cs.unibo.it/~zacchiro
"I know you believe you understood what you think I said, but I am not
sure you realize that what you heard is not what I meant!" -- G.Romney
-------------------
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
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Caml-list] PXP
2002-06-04 16:19 [Caml-list] PXP Gaurav Chanda
2002-06-04 19:55 ` Stefano Zacchiroli
@ 2002-06-04 22:53 ` Gerd Stolpmann
1 sibling, 0 replies; 9+ messages in thread
From: Gerd Stolpmann @ 2002-06-04 22:53 UTC (permalink / raw)
To: gaurav_chanda; +Cc: caml-list
On 2002.06.04 18:19 Gaurav Chanda wrote:
> Hello
>
> I am using PXP to parse and validate an XML document. The follwing code
>
>
> <?xml version="1.0"?>
> <methodCall>
> <methodName>examples.getStateName</methodName>
> <params>
> <param>
> <value><i4>41</i4></value>
> </param>
> </params>
> </methodCall>
>
> gave this error at runtime:
> Fatal error: exception Pxp_types.At("In entity [toplevel] = ANONYMOUS, at line 2, position 12:", _)
>
> Could anybody help me solve this problem ?
In addition to Stefano's answer: Unfortunately, you do not get the full error message.
This is an annoying problem of the runtime environment. Try the following code in the
toploop:
# raise(At("x",WF_error "y"));;
Exception: Pxp_types.At ("x", Pxp_types.WF_error "y").
# try raise(At("x",WF_error "y")) with any -> Failure(Printexc.to_string any);;
- : exn = Failure "Pxp_types.At(_)"
If you compile raise(At("x",WF_error "y")), and start the program, you get a third
variant:
Fatal error: exception Pxp_types.At("x", _)
There are three different built-in routines to print uncaught exceptions, and all three
have different capabilitites, and only one can print nested exceptions.
The workaround for PXP is to use the special exception printer Pxp_types.string_of_exn
like
try
<your code raising the exception>
with
error ->
failwith(Pxp_types.string_of_exn error)
and you get always an exception that can be printed, regardless which printer happens
to catch the exception.
Gerd
--
----------------------------------------------------------------------------
Gerd Stolpmann Telefon: +49 6151 997705 (privat)
Viktoriastr. 45
64293 Darmstadt EMail: gerd@gerd-stolpmann.de
Germany
----------------------------------------------------------------------------
-------------------
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
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Caml-list] PXP
2002-06-24 9:14 ` Claudio Sacerdoti Coen
@ 2002-06-24 9:23 ` Alessandro Baretta
0 siblings, 0 replies; 9+ messages in thread
From: Alessandro Baretta @ 2002-06-24 9:23 UTC (permalink / raw)
To: Ocaml
Stefano Zacchiroli wrote:
>
> PXP works also with OCaml 3.04 (e.g. the debian package
> libpxp-ocaml-dev).
> I don't know if it works also with OCaml CVS.
>
> Cheers.
>
Claudio Sacerdoti Coen wrote:
>
> Of course it works also with 3.04.
>
> Cheers,
> C.S.C.
Grazie mille!
Alex
-------------------
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
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Caml-list] PXP
2002-06-24 8:58 Alessandro Baretta
2002-06-24 9:06 ` Stefano Zacchiroli
@ 2002-06-24 9:14 ` Claudio Sacerdoti Coen
2002-06-24 9:23 ` Alessandro Baretta
1 sibling, 1 reply; 9+ messages in thread
From: Claudio Sacerdoti Coen @ 2002-06-24 9:14 UTC (permalink / raw)
To: Alessandro Baretta; +Cc: Ocaml
> I have read PXP *only* works with O'Caml 3.00. Is this
> _literally_ true? That is, will not work with Ocaml
> 3.04/OcamlCVS?
Of course it works also with 3.04.
Cheers,
C.S.C.
--
----------------------------------------------------------------
Real name: Claudio Sacerdoti Coen
PhD Student in Computer Science at University of Bologna
E-mail: sacerdot@cs.unibo.it
http://caristudenti.cs.unibo.it/~sacerdot
----------------------------------------------------------------
-------------------
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
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Caml-list] PXP
2002-06-24 8:58 Alessandro Baretta
@ 2002-06-24 9:06 ` Stefano Zacchiroli
2002-06-24 9:14 ` Claudio Sacerdoti Coen
1 sibling, 0 replies; 9+ messages in thread
From: Stefano Zacchiroli @ 2002-06-24 9:06 UTC (permalink / raw)
To: Ocaml
On Mon, Jun 24, 2002 at 10:58:11AM +0200, Alessandro Baretta wrote:
> I have read PXP *only* works with O'Caml 3.00. Is this
> _literally_ true? That is, will not work with Ocaml
> 3.04/OcamlCVS?
PXP works also with OCaml 3.04 (e.g. the debian package
libpxp-ocaml-dev).
I don't know if it works also with OCaml CVS.
Cheers.
--
Stefano Zacchiroli - undergraduate student of CS @ Univ. Bologna, Italy
zack@cs.unibo.it | ICQ# 33538863 | http://www.cs.unibo.it/~zacchiro
"I know you believe you understood what you think I said, but I am not
sure you realize that what you heard is not what I meant!" -- G.Romney
-------------------
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
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Caml-list] PXP
@ 2002-06-24 8:58 Alessandro Baretta
2002-06-24 9:06 ` Stefano Zacchiroli
2002-06-24 9:14 ` Claudio Sacerdoti Coen
0 siblings, 2 replies; 9+ messages in thread
From: Alessandro Baretta @ 2002-06-24 8:58 UTC (permalink / raw)
To: Ocaml
I have read PXP *only* works with O'Caml 3.00. Is this
_literally_ true? That is, will not work with Ocaml
3.04/OcamlCVS?
Alex
-------------------
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
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Caml-list] PXP
2002-05-31 15:58 Gaurav Chanda
@ 2002-05-31 16:12 ` Gerd Stolpmann
0 siblings, 0 replies; 9+ messages in thread
From: Gerd Stolpmann @ 2002-05-31 16:12 UTC (permalink / raw)
To: gaurav_chanda; +Cc: caml-list
On 2002.05.31 17:58 Gaurav Chanda wrote:
> Hello
>
> I am working on the implementation of an XMLRPC Server. In order to parse an XML document, I am using PXP (Polymorphic XML Parser). I get no errors during my compilation. However, on executing my code, I am getting the following error:
>
> Fatal error: exception Failure ("No lexical analyzer available ! (Badly linked executable?)")
>
> Could anybody help me solve this problem ??
This is essentially the same as
http://www.ocaml-programming.de/packages/documentation/pxp/index_rel.html
although the error message has been improved in the meantime.
Gerd
--
----------------------------------------------------------------------------
Gerd Stolpmann Telefon: +49 6151 997705 (privat)
Viktoriastr. 45
64293 Darmstadt EMail: gerd@gerd-stolpmann.de
Germany
----------------------------------------------------------------------------
-------------------
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
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Caml-list] PXP
@ 2002-05-31 15:58 Gaurav Chanda
2002-05-31 16:12 ` Gerd Stolpmann
0 siblings, 1 reply; 9+ messages in thread
From: Gaurav Chanda @ 2002-05-31 15:58 UTC (permalink / raw)
To: caml-list; +Cc: gaurav_chanda
Hello
I am working on the implementation of an XMLRPC Server. In order to parse an XML document, I am using PXP (Polymorphic XML Parser). I get no errors during my compilation. However, on executing my code, I am getting the following error:
Fatal error: exception Failure ("No lexical analyzer available ! (Badly linked executable?)")
Could anybody help me solve this problem ??
Gaurav
________________________________________________________
Outgrown your current e-mail service?
Get a 25MB Inbox, POP3 Access, No Ads and No Taglines with LYCOS MAIL PLUS.
http://login.mail.lycos.com/brandPage.shtml?pageId=plus
-------------------
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
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2002-06-24 9:17 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-06-04 16:19 [Caml-list] PXP Gaurav Chanda
2002-06-04 19:55 ` Stefano Zacchiroli
2002-06-04 22:53 ` Gerd Stolpmann
-- strict thread matches above, loose matches on Subject: below --
2002-06-24 8:58 Alessandro Baretta
2002-06-24 9:06 ` Stefano Zacchiroli
2002-06-24 9:14 ` Claudio Sacerdoti Coen
2002-06-24 9:23 ` Alessandro Baretta
2002-05-31 15:58 Gaurav Chanda
2002-05-31 16:12 ` Gerd Stolpmann
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox