accès aux groupes de discussion, consultation et publication d'articles, recherche de "newsgroups"...
membres, identifiez-vous
é-mail Mot de passe
nouveau ? mot de passe oublié ?
Chargement... Chargement en cours...

Groupes français belges canadiens suisses internationaux Nétiquette
Échangez opinions et commentaires dans les forums de discussion.

Need for Entities Support in DTD parser for OCaml

 [  Nouvelle Discussion Nouvelle discussion  |  Répondre au groupe Répondre au groupe  |  fr.comp.lang.caml ] 

Retour : Accueil du site fr comp lang caml   charte stats de ce groupe


  Sujet:   Need for Entities Support in DTD parser for OCaml  
 De: jchampav...@gmail.com (jchampavere)
 Groupes: fa.caml, fr.comp.lang.caml
 Organisation: http://groups.google.com
 Date: 01. Nov 2007, 11:14:04
Hi,

I'm currently using PXP to parse XML DTDs. My aim is to build tree
automata from DTDs.

I would like to use the defined parameter entities (for instance those
of XHTML) in my OCaml programs but until now I didn't find any way of
doing it.

Precisely in PXP there is a class called Pxp_dtd from which I can
obtain instances of type Pxp_entity.entity. There is a module Entity
inside Pxp_dtd to manipulate entities but it doesn't exactly
corresponds to my needs.

I tried to find what I was looking for in the class Pxp_entity but I
have to admit that it is beyond my technical skills. I don't know how
entities are stored and how the parser processes.

So in short, I need an abstraction for parameter entities. In XHTML
you have for example:
<!ENTITY % special.extra "object | applet | img | map | iframe">
<!ENTITY % special.basic "br | span | bdo">
<!ENTITY % special      "%special.basic; | %special.extra;">
But there are other forms of entities. If I use the function
'Pxp_dtd.Entity.replacement_text entity_special', I get the string
"object | applet | img | map | iframe | br | span | bdo". I'd rather
have an instance of something of type like:
type param_entity = param_entity list | string
I could then manipulate entities easily.

I hope that you understand my problem. If not I can try to say more
about it.

If someone has already faced this kind of issue and solved it, I'd
really appreciate some help. Or if you know another parser for DTDs in
OCaml (xml-light doesn't manage entities and the documentation of
expat didn't leave me nay hope to find how I could do what I want to
do). Or any easy way to solve my problem.

Bye.


DateSujet  Auteur
01.01.
o 
Groups Explorer contact votre avis comment ça marche? rechercher un groupe suggérer un groupe abuse accueil du site   Imprimer cette page   Envoyer cette page à un(e) ami(e)
Usenet Gratuit