From: Gerd Stolpmann <info@gerd-stolpmann.de>
To: Yoann Padioleau <padator@wanadoo.fr>
Cc: oliver <oliver@first.in-berlin.de>, caml-list@inria.fr
Subject: Re: [Caml-list] ocamlnet: Netheml: simple-dtd: how does this work?
Date: Mon, 07 Mar 2011 17:24:06 +0100 [thread overview]
Message-ID: <1299515046.30035.96.camel@thinkpad> (raw)
In-Reply-To: <11C1C5E7-7265-47DA-A5B5-82E2F5B7FEB6@wanadoo.fr>
Am Montag, den 07.03.2011, 07:40 -0800 schrieb Yoann Padioleau:
> On Mar 7, 2011, at 4:27 AM, Gerd Stolpmann wrote:
>
> > Am Sonntag, den 06.03.2011, 23:52 +0100 schrieb oliver:
> >> Hello,
> >>
> >> tried around using the simple-dtd argument
> >> for Nethtme.parse.
> >>
> >> It changes the behaviour compared to
> >> the default behaviour, but I could not find out
> >> how this works.
> >>
> >> Someone here who can explain me this
> >> argument and describe, how it can be used?
> >
> > Maybe the HTML specification would be a good reference here:
> > http://www.w3.org/TR/1999/REC-html401-19991224. You will see there that
> > most HTML elements are either an inline element, a block element, or
> > both ("flow" element). The grammar of HTML is described in terms of
> > these classes. For instance, a P tag (paragraph) is a block element and
> > contains block elements whereas B (bold) is an inline element and
> > contains inline elements. From this follows that you cannot put a P
> > inside a B: <B><P>something</P></B> is illegal.
> >
> > The parser needs this information to resolve such input, i.e. do
> > something with bad HTML. As HTML allows tag minimization (many end tags
> > can be omitted), the parser can read this as: <B></B><P>something</P>
> > (and the </B> in the input is ignored).
> >
> > If all start and all end tags are written out, changing the
> > simplified_dtd does not make any difference.
> >
> > There is no normative text that says how to read bad HTML. Because of
> > this, it is - to a large degree - an interpretation of HTML what you put
> > into simplified_dtd.
> >
> >> The description IMHO is not sufficient to explain
> >> this feature.
> >
> > I'd say your formal knowledge about HTML is insufficient. It is
> > impossible to explain all the basics of HTML in the scope of an mli.
>
> Well the explanation you've given above, with a link to the HTML spec and
> the inlne vs block comment is excellent and would have been a good fit for a comment
> in a .mli IMHO.
Thanks for the suggestion. Just copied the text to the mli.
Gerd
> >
> > Gerd
> >
> >> I created a simplified dtd and used it as
> >> is mentioned in the manual. But changing the
> >> Arguments of element-class and model constraint
> >> did not brought any results that make sense to me.
> >> Usint that argument jsut creates a different behaviour than
> >> using no such arg, but more is not clear to me.
> >>
> >> An explanation or a pointer to explanational docs would be fine.
> >>
> >> Ciao,
> >> Oliver
> >>
> >
> >
> > --
> > ------------------------------------------------------------
> > Gerd Stolpmann, Bad Nauheimer Str.3, 64289 Darmstadt,Germany
> > gerd@gerd-stolpmann.de http://www.gerd-stolpmann.de
> > Phone: +49-6151-153855 Fax: +49-6151-997714
> > ------------------------------------------------------------
> >
> >
> > --
> > Caml-list mailing list. Subscription management and archives:
> > https://sympa-roc.inria.fr/wws/info/caml-list
> > Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
> > Bug reports: http://caml.inria.fr/bin/caml-bugs
> >
>
>
--
------------------------------------------------------------
Gerd Stolpmann, Bad Nauheimer Str.3, 64289 Darmstadt,Germany
gerd@gerd-stolpmann.de http://www.gerd-stolpmann.de
Phone: +49-6151-153855 Fax: +49-6151-997714
------------------------------------------------------------
prev parent reply other threads:[~2011-03-07 16:25 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-06 22:52 oliver
2011-03-07 12:27 ` Gerd Stolpmann
2011-03-07 12:57 ` oliver
2011-03-07 13:40 ` Gerd Stolpmann
2011-03-07 14:44 ` oliver
2011-03-07 14:53 ` oliver
2011-03-07 15:14 ` Gerd Stolpmann
2011-03-07 20:18 ` oliver
2011-03-07 15:40 ` Yoann Padioleau
2011-03-07 16:24 ` Gerd Stolpmann [this message]
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=1299515046.30035.96.camel@thinkpad \
--to=info@gerd-stolpmann.de \
--cc=caml-list@inria.fr \
--cc=oliver@first.in-berlin.de \
--cc=padator@wanadoo.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