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] Is XML Schema a constraint language or a specification language?

My 2c:

XML Schema is a language for describing a regular tree grammar
designed to cover XML DTDs (which in turn are a subset of SGML DTDs),
with extensions such as lexical types and unique constraints,
assertions (XSD 1.1), and introducing named regular and simple types
and other schema components where XML/SGML DTDs would use text
substitution variables (parameter entities) for reuse.

The part where XSD's close relationship with XML DTDs is most visible
is XSD's unique particle attribution constraint, appealing to the
notion of Glushkov automaton construction of a content model
expression just as SGML does. Whereas RNG and other schema languages
can do away with and extend these since, unlike in traditional SGML
and HTML with tag inference/omission, a grammar isn't required for
parsing but is optional and used for mere validation.

fyi: the canonical text for characterizing DTDs, XSD, RNG, and other
schema languages in terms of the languages they can define is [1]. Key
take-away is that XSD can have local redefinitions of elements within
the context of a complex type, whereas DTDs only allow global element
declarations.

[1]: Makoto Murata et. al.: Taxonomy of XML Schema Languages using
Formal Language Theory

And XSD uses a rather verbose encoding of content model expressions
(regexpes) in XML ;)

Best,
M. Reichardt
sgmljs.net

On 4/21/21, Ihe Onwuka <ihe.onwuka@gmail.com> wrote:
> You mean it constrains the language to conform the specification.
> Or it specifies a language that conforms to the constraints.
>
> Which one. No sitting  on the fence here.
>
> On Wed, Apr 21, 2021 at 10:55 AM Mukul Gandhi <mukulg@softwarebytes.org>
> wrote:
>
>> On Wed, 21 Apr, 2021, 5:57 PM Roger L Costello, <costello@mitre.org>
>> wrote:
>>
>> Is an XML Schema a constraint language? An XML Schema states constraints
>>> that must be satisfied by instances for them to be "valid". Determining
>>> if
>>> an instance is valid is a constraint satisfaction problem.
>>>
>>> Or, is an XML Schema a specification language? An XML Schema is a
>>> specification that informs instance document authors how to construct
>>> instances. Determining if an instance is valid is a matter of checking
>>> that
>>> the instance adheres to the specification.
>>>
>>
>> I find both of above interpretations about XML Schema language
>> synonymous.
>>
>>
>>
>> --
>> Regards,
>> Mukul Gandhi
>>
>>
>> Sent from an android device
>>
>>>
>


[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