caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: "Bünzli Daniel" <daniel.buenzli@erratique.ch>
To: caml-list caml-list <caml-list@yquem.inria.fr>
Subject: Re: [Caml-list] [OSR] Suggested topic - XML processing API
Date: Wed, 30 Jan 2008 11:32:41 +0100	[thread overview]
Message-ID: <920A850B-7FB2-4E2D-8E2C-573029E4C335@erratique.ch> (raw)
In-Reply-To: <47A028D0.2000909@frisch.fr>


> Jim Miller wrote:
>> type xmlNode =
>> | XmlElement of (namespace: string * tagName: string * attributes:
>> (string * string) list * (children:xmlNode list) )
>> | XmlPCData of (text:string)

Attributes can have their own namespace, have a look a the spec [1]. I  
see it more that way (but I'm biaised).

type name = string * string
type attribute = name * string
type tag = name * attribute list

etc.


Adding to Alain's list, other things that need to be specified.

- what do you do with processing instructions and comments

- whether character references and predefined entities are resolved.

- how do you deal with external entity references.

- where does the parsing end (I don't do it according to the xml spec  
because from the words of the spec editor himself [2] the spec is  
broken).

I did document many of this issues for my own parser. You may want to  
check that out [3] it may show you some of the specification details  
that are needed (note that the tree and the cursor representations are  
going away in the next version).

Best,

Daniel

[1] http://www.w3.org/TR/REC-xml-names/
[2] http://www.xml.com/axml/notes/TrailingMisc.html
[3] http://erratique.ch/software/xmlm/doc/Xmlm#io


  reply	other threads:[~2008-01-30 10:32 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-30  0:54 Jim Miller
2008-01-30  2:37 ` [Caml-list] " Bünzli Daniel
2008-01-30  3:26   ` Jim Miller
2008-01-30  7:35     ` Alain Frisch
2008-01-30 10:32       ` Bünzli Daniel [this message]
2008-01-30 10:35     ` Jon Harrop
2008-01-30 17:25       ` Jim Miller
2008-02-05  3:23         ` Jim Miller
2008-02-05  5:02           ` Alain Frisch
2008-02-05  8:36             ` Bünzli Daniel
2008-02-05  9:51               ` Vincent Hanquez
2008-02-05 10:13                 ` Jacques Garrigue
2008-02-05 11:14                   ` Vincent Hanquez
2008-02-05 10:31                 ` Bünzli Daniel
2008-02-05 10:43                   ` Nicolas Pouillard
2008-02-05 13:29                     ` Jon Harrop
2008-02-05 14:53                       ` micha
2008-02-05 14:53                         ` Jon Harrop
2008-02-05 14:57                       ` David Teller
2008-02-05 11:21                   ` Vincent Hanquez
2008-02-05  8:15           ` Vincent Hanquez
2008-02-05 11:16             ` Stefano Zacchiroli
2008-01-30 15:55   ` Vincent Hanquez

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=920A850B-7FB2-4E2D-8E2C-573029E4C335@erratique.ch \
    --to=daniel.buenzli@erratique.ch \
    --cc=caml-list@yquem.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).