SlideShare a Scribd company logo
1 of 3
Download to read offline
XML Schema and RELAX NG
                Element Comparison
                                      Michael Fitzgerald
                                      http://www.overduebooks.net

This document briefly compares XML Schema’s 42 elements with RELAX NG’s 28 elements. In the table
that follows, the first column lists all the XML Schema elements while the second column lists any
RELAX NG elements that have a one-to-one relationship, a comparable purpose, or only a roughly similar
purpose to XML Schema elements. Elements unique to each language are also listed in separate tables
below.

The prefixes in the tables, xs:, rng:, and a:, are associated with the following namespaces:

    •   xs: with http://www.w3.org/2001/XMLSchema
    •   rng: with http://relaxng.org/ns/structure/1.0
    •   a: with http://relaxng.org/ns/compatibility/annotations/1.0

                XML Schema Element                               RELAX NG Element
     xs:all                                        rng:interleave, rng:optional
     xs:annotation                                 a:documentation
     xs:any                                        rng:anyName, rng:nsName
     xs:anyAttribute                               rng:anyName, rng:nsName
     xs:appInfo                                    a:documentation
     xs:attribute                                  rng:attribute
     xs:attributeGroup                             rng:define
     xs:choice                                     rng:choice
     xs:complexContent
     xs:complexType                                rng:element, rng:define, rng:ref
     xs:documentation                              a:documentation
     xs:element                                    rng:element
     xs:enumeration                                rng:choice, rng:value
     xs:extension                                  rng:param
     xs:field
     xs:fractionDigits                             rng:param
     xs:group                                      rng:group, rng:div
     xs:import                                     rng:externalRef, rng:parentRef
     xs:include                                    rng:include, rng:externalRef
     xs:key
     xs:keyref
     xs:length                                     rng:param
     xs:list                                       rng:list

                                                   1
xs:maxExclusive                               rng:param
    xs:maxInclusive                               rng:param
    xs:maxLength                                  rng:param
    xs:minExclusive                               rng:param
    xs:minInclusive                               rng:param
    xs:minLength                                  rng:param
    xs:notation
    xs:pattern                                    rng:param
    xs:redefine                                   rng:include, rng:define
    xs:restriction                                rng:except, rng:notAllowed
    xs:schema                                     rng:grammar
    xs:selector
    xs:sequence
    xs:simpleContent
    xs:simpleType
    xs:totalDigits                                rng:param
    xs:union                                      rng:list
    xs:unique
    xs:whiteSpace                                 rng:param




XML Schema Unique Elements
The following table lists XML Schema elements for which there is no similar or equivalent RELAX NG
element (first column) followed by an explanation why (second column).

         XML Schema Element                              Explanation
        xs:complexContent Not necessary in RELAX NG syntax
        xs:field                 RELAX NG does not implement keys
        xs:key                   RELAX NG does not implement keys
        xs:keyref                RELAX NG does not implement keys
        xs:notation              RELAX NG does not directly support notations
        xs:selector              RELAX NG does not implement keys
        xs:sequence              Not necessary in RELAX NG syntax
        xs:simpleContent         Not necessary in RELAX NG syntax
        xs:simpleType            RELAX NG uses external datatype libraries; types are external
        xs:unique                RELAX NG does not implement keys




                                                  2
RELAX NG Unique Elements
The following tables lists RELAX NG elements for which there is no equivalent or similar XML Schema
element (first column) followed by an explanation why (second column).

         RELAX NG Element                                 Explanation
      rng:data                    Uses the xs:type attribute
      rng:empty                   Uses the xs:complexType element
      rng:interleave              XML Schema requires deterministic content models
      rng:mixed                   Uses with xs:mixed attribute
                                  Achieved with xs:minOccurs="1" and
      rng:oneOrMore
                                  xs:maxOccurs="unbounded"
                                  Achieved with xs:minOccurs="0" and
      rng:optional
                                  xs:maxOccurs="1"
      rng:param                   Uses facet elements (xs:maxLength, xs:minLength, etc.
      rng:ref                     Achieved with the xs:ref attribute
      rng:start                   Uses global xs:element declaration
      rng:text                    Achieved with xs:type="xsd:string" attribute
      rng:value                   Achieved with xs:value attribute
                                  Achieved with xs:minOccurs="0" and
      rng:zeroOrMore
                                  xs:maxOccurs="unbounded"




                                                  3

More Related Content

Similar to XML Schema and RELAX NG Element Comparison

Parsers Combinators in Scala, Ilya @lambdamix Kliuchnikov
Parsers Combinators in Scala, Ilya @lambdamix KliuchnikovParsers Combinators in Scala, Ilya @lambdamix Kliuchnikov
Parsers Combinators in Scala, Ilya @lambdamix KliuchnikovVasil Remeniuk
 
Native XML processing in C++ (BoostCon'11)
Native XML processing in C++ (BoostCon'11)Native XML processing in C++ (BoostCon'11)
Native XML processing in C++ (BoostCon'11)Sumant Tambe
 
Searching for AI - Leveraging Solr for classic Artificial Intelligence tasks
Searching for AI - Leveraging Solr for classic Artificial Intelligence tasksSearching for AI - Leveraging Solr for classic Artificial Intelligence tasks
Searching for AI - Leveraging Solr for classic Artificial Intelligence tasksAlexandre Rafalovitch
 
ArangoDB - Using JavaScript in the database
ArangoDB - Using JavaScript in the databaseArangoDB - Using JavaScript in the database
ArangoDB - Using JavaScript in the databaseArangoDB Database
 
Sperasoft‬ talks j point 2015
Sperasoft‬ talks j point 2015Sperasoft‬ talks j point 2015
Sperasoft‬ talks j point 2015Sperasoft
 

Similar to XML Schema and RELAX NG Element Comparison (7)

Quick start reg ex
Quick start reg exQuick start reg ex
Quick start reg ex
 
I1
I1I1
I1
 
Parsers Combinators in Scala, Ilya @lambdamix Kliuchnikov
Parsers Combinators in Scala, Ilya @lambdamix KliuchnikovParsers Combinators in Scala, Ilya @lambdamix Kliuchnikov
Parsers Combinators in Scala, Ilya @lambdamix Kliuchnikov
 
Native XML processing in C++ (BoostCon'11)
Native XML processing in C++ (BoostCon'11)Native XML processing in C++ (BoostCon'11)
Native XML processing in C++ (BoostCon'11)
 
Searching for AI - Leveraging Solr for classic Artificial Intelligence tasks
Searching for AI - Leveraging Solr for classic Artificial Intelligence tasksSearching for AI - Leveraging Solr for classic Artificial Intelligence tasks
Searching for AI - Leveraging Solr for classic Artificial Intelligence tasks
 
ArangoDB - Using JavaScript in the database
ArangoDB - Using JavaScript in the databaseArangoDB - Using JavaScript in the database
ArangoDB - Using JavaScript in the database
 
Sperasoft‬ talks j point 2015
Sperasoft‬ talks j point 2015Sperasoft‬ talks j point 2015
Sperasoft‬ talks j point 2015
 

Recently uploaded

DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
What is Artificial Intelligence?????????
What is Artificial Intelligence?????????What is Artificial Intelligence?????????
What is Artificial Intelligence?????????blackmambaettijean
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rick Flair
 
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...AliaaTarek5
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsNathaniel Shimoni
 

Recently uploaded (20)

DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
What is Artificial Intelligence?????????
What is Artificial Intelligence?????????What is Artificial Intelligence?????????
What is Artificial Intelligence?????????
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...
 
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directions
 

XML Schema and RELAX NG Element Comparison

  • 1. XML Schema and RELAX NG Element Comparison Michael Fitzgerald http://www.overduebooks.net This document briefly compares XML Schema’s 42 elements with RELAX NG’s 28 elements. In the table that follows, the first column lists all the XML Schema elements while the second column lists any RELAX NG elements that have a one-to-one relationship, a comparable purpose, or only a roughly similar purpose to XML Schema elements. Elements unique to each language are also listed in separate tables below. The prefixes in the tables, xs:, rng:, and a:, are associated with the following namespaces: • xs: with http://www.w3.org/2001/XMLSchema • rng: with http://relaxng.org/ns/structure/1.0 • a: with http://relaxng.org/ns/compatibility/annotations/1.0 XML Schema Element RELAX NG Element xs:all rng:interleave, rng:optional xs:annotation a:documentation xs:any rng:anyName, rng:nsName xs:anyAttribute rng:anyName, rng:nsName xs:appInfo a:documentation xs:attribute rng:attribute xs:attributeGroup rng:define xs:choice rng:choice xs:complexContent xs:complexType rng:element, rng:define, rng:ref xs:documentation a:documentation xs:element rng:element xs:enumeration rng:choice, rng:value xs:extension rng:param xs:field xs:fractionDigits rng:param xs:group rng:group, rng:div xs:import rng:externalRef, rng:parentRef xs:include rng:include, rng:externalRef xs:key xs:keyref xs:length rng:param xs:list rng:list 1
  • 2. xs:maxExclusive rng:param xs:maxInclusive rng:param xs:maxLength rng:param xs:minExclusive rng:param xs:minInclusive rng:param xs:minLength rng:param xs:notation xs:pattern rng:param xs:redefine rng:include, rng:define xs:restriction rng:except, rng:notAllowed xs:schema rng:grammar xs:selector xs:sequence xs:simpleContent xs:simpleType xs:totalDigits rng:param xs:union rng:list xs:unique xs:whiteSpace rng:param XML Schema Unique Elements The following table lists XML Schema elements for which there is no similar or equivalent RELAX NG element (first column) followed by an explanation why (second column). XML Schema Element Explanation xs:complexContent Not necessary in RELAX NG syntax xs:field RELAX NG does not implement keys xs:key RELAX NG does not implement keys xs:keyref RELAX NG does not implement keys xs:notation RELAX NG does not directly support notations xs:selector RELAX NG does not implement keys xs:sequence Not necessary in RELAX NG syntax xs:simpleContent Not necessary in RELAX NG syntax xs:simpleType RELAX NG uses external datatype libraries; types are external xs:unique RELAX NG does not implement keys 2
  • 3. RELAX NG Unique Elements The following tables lists RELAX NG elements for which there is no equivalent or similar XML Schema element (first column) followed by an explanation why (second column). RELAX NG Element Explanation rng:data Uses the xs:type attribute rng:empty Uses the xs:complexType element rng:interleave XML Schema requires deterministic content models rng:mixed Uses with xs:mixed attribute Achieved with xs:minOccurs="1" and rng:oneOrMore xs:maxOccurs="unbounded" Achieved with xs:minOccurs="0" and rng:optional xs:maxOccurs="1" rng:param Uses facet elements (xs:maxLength, xs:minLength, etc. rng:ref Achieved with the xs:ref attribute rng:start Uses global xs:element declaration rng:text Achieved with xs:type="xsd:string" attribute rng:value Achieved with xs:value attribute Achieved with xs:minOccurs="0" and rng:zeroOrMore xs:maxOccurs="unbounded" 3