[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Is XML Schema a constraint language or a specification lan

  • From: Marcus Reichardt <u123724@gmail.com>
  • To: ihe.onwuka@gmail.com
  • Date: Thu, 22 Apr 2021 12:37:26 +0200

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


PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.