* Jeni Tennison wrote:
>I don't think that there's anything stopping such a declarative schema
>language for microdata vocabularies being developed or reusing a
>validation technology from elsewhere. Actually, Philip JÃ¤genstedt was
>talking on IRC earlier about possibly generating XML from microdata and
>then using RELAX NG to validate over it:
>
> http://krijnhoetmer.nl/irc-logs/whatwg/20110728#l-549
>
>but I'm not sure how serious that suggestion was...
I would have thought "hsivonen" would be Henri Sivonen, but then again I
tell visitors every now and then to post things under my accounts. Some
time back I made a tool like that for CSS, it turned style sheets into a
XML http://lists.w3.org/Archives/Public/www-archive/2005Aug/0025.html
(http://lists.w3.org/Archives/Public/www-validator/2005Aug/0129.html)
which could then be validated using RELAX NG (a simple schema included).
This kind of indirection is largely redundant though given how trivial
it is to implement RELAX NG for some custom object model from scratch or
via some flexible library. For CSS I did something like that in ... let
me see, http://sourceforge.net/projects/stylevalid/ and later I made a
<http://lists.w3.org/Archives/Public/www-archive/2011Jan/0029.html>, now
at <https://github.com/hoehrmann/srng2json/>, compiler that turns a
simplified RELAX NG schema into a simple automaton, expressed in JSON,
with some HTML-based demo application for XHTML (also see the references
to earlier work).
I don't know if recognizing some subset of context-free languages is
useful when validating "microdata", but I would recommend against trying
to implement this through conversion to other formats (importantly there
are usability issues to consider, like maintaining the right column and
line information, which can be quite difficult with some libraries). The
idea was appealing to me in 2005 mainly because I hadn't yet implemented
various regular expression engines at the time and doing it seemed hard.
--
BjÃ¶rn HÃ¶hrmann Â· mailto:bjoern@hoehrmann.de Â· http://bjoern.hoehrmann.de
Am Badedeich 7 Â· Telefon: +49(0)160/4415681 Â· http://www.bjoernsworld.de
25899 DagebÃ¼ll Â· PGP Pub. KeyID: 0xA4357E78 Â· http://www.websitedev.de/