XML.orgXML.org
FOCUS AREAS |XML-DEV |XML.org DAILY NEWSLINK |REGISTRY |RESOURCES |ABOUT
OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]
Re: [xml-dev] Schematron is a validator generator ... Bison is aparser generator ... such a cool way of building tools!

Yes bison/flex (or rather yacc/lex which are the original
implementations that bison/flex are clones off) is a parser generator.
But that doesn't mean there are only validators in the markup world.
Ie. while XML DTD/XSD/RNG validation doesn't need a parser (and in
fact, that's the entire point of XML), SGML OTOH is kindof a parser
generator: in traditional SGML a DTD is required for things such as
tag inference and replacing SHORTREF delimiters by replacement text in
a context-dependent way before re-parsing. You wouldn't be able to
implement an SGML parser using generic off-the-shelf regexp/automaton
tools like you could use for XML DTD validation (provided that regexp
lib does Glushkov rather than Thompson DFA/NFA construction or
equivalent for validating content models according to the unique
particle attribution constraint). And you can't employ LR(1) parser
generators like yacc/bison either (to the best of my knowledge, though
AIU something like that had been tried in historic SGML implementation
ie the Amsterdam SGML parser). Rather, you must follow the canonical
construction detailed in the standard reference by Brüggemann/Klein
("One-Unambiguous Regular Languages“) with some apparently
lost-to-history details in personal communication between A.Brüggemann
and Clark.

Best regards,
Marcus
sgml.io

On 1/27/22, Andrew Sales <andrew@andrewsales.com> wrote:
> Minor quibble:
>
>
>> So a Schematron processor is a validator generator.
>>
>
> A Schematron processor *is* a validator. Common/popular *implementations*
> generate a validator from a Schematron schema.
>
>
>> Oh, that is such a cool way to build tools!
>>
>
> Agreed :-)
>
> Andrew
>


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]


News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 1993-2007 XML.org. This site is hosted by OASIS