Tired of complicated specifications You just RELAX - PowerPoint PPT Presentation

1 / 27
About This Presentation
Title:

Tired of complicated specifications You just RELAX

Description:

tag name= 'section' ref pred= 'common'/ /tag Comparison with XML Schema ... tag tag name='div' pred='div-as-subsection' ... – PowerPoint PPT presentation

Number of Views:43
Avg rating:3.0/5.0
Slides: 28
Provided by: gca
Category:

less

Transcript and Presenter's Notes

Title: Tired of complicated specifications You just RELAX


1
Tired of complicated specifications? You just
RELAX!
  • MURATA Makoto (INSTAC XML SWGHIYAMA Masayuki
    (INSTAC XML SWG KOSAKI Motohiro (Matsushita AVC
    Multimedia Software)

2
What is RELAX?
  • RELAX (REgular LAnguage description for XML) is a
    specification for describing XML-based languages.
  • RELAX is expected to become JIS technical
    reports.

3
Comparison with DTD
  • Description in RELAX is represented by tags and
    attributes.
  • RELAX has rich datatypes.
  • RELAX is namespace-aware.

4
Standardization of RELAX
  • INSTAC XML SWG of Japan standardizes RELAX.
  • RELAX is expected to become JIS technical reports
    by June, 2000.
  • RELAX is likely to be submitted to the fast track
    of ISO.

5
RELAX Core and RELAX Namespace
  • RELAX RELAX Core RELAX Namespace
  • RELAX Core single namespace
  • 2000 March
  • RELAX Namespace multiple namespaces
  • 2000 June

6
Conformance levels of RELAX Core
  • RELAX Core, classic DTD features - default
    values - entities - notations datatypes
  • RELAX Core, fully relaxed RELAX Core, classic
    Horn clauses regular hedge grammars

7
RELAX Core, classic
  • ltmodulegt elements and ltinterfacegt elements
  • Element type declarations
  • Parameter entities for content models
  • Attribute-list declarations
  • Parameter entities for attribute declarations

8
ltmodulegt and ltinterfacegt
  • ltmodulegt ltinterfacegt ltexport labels "doc " /gt
    lt/interfacegt ...lt/modulegt

9
Element type declarartions (1)
  • lt!ELEMENT section (para)gt
  • ltelementRule pred"section"gt ltref label"para"
    occurs""/gtlt/elementRulegt

10
Element type declarartions (2)
  • lt!ELEMENT para (PCDATA fnote)gt
  • ltelementRule pred"para"gt ltmixedgt ltref
    label"fnote" occurs""/gt lt/mixedgtlt/elementR
    ulegt

11
Parameter entities for content models
  • lthedgeRule label "inline"gt ltchoicegt ltref
    label "a"/gt ltref label "special"/gt ltref
    label "phrase"/gt lt/choicegtlt/hedgeRulegt

12
Attribute-List Declarations
  • lt!ATTLIST section id ID REQUIREDgt
  • lttag name"section"gt ltattribute
    name"id" type"ID" required"true"/gtlt/taggt

13
Parameter entities for attribute declarations
  • ltattList pred "common "gt ltattribute
    name"id" type"ID" required"true"/gtlt/attLis
    tgt
  • lttag name "section" gt ltref pred
    "common"/gtlt/taggt

14
Comparison with XML Schema
  • Datatypes are borrowed from XML Schema Part 2.
  • RELAX is much simpler than XML Schema Part 1.
  • XML Schema will take long time. RELAX will be
    available very soon.
  • XML Schema attaches semantics to documents, but
    RELAX does not.
  • XML Schema requires extensions to DOM and SAX,
    but RELAX does not.

15
Will RELAX survive?
  • As of today, nobody knows.
  • At best, standard bodies merely suggest
    specifications.
  • Users and developers make the final call.
  • RELAX may survive
  • RELAX can be easily implemented
  • Migration from DTD to RELAX and from RELAX to XML
    Schema are kept easy
  • RELAX is not controlled by any private company.

16
RELAX helps migration from DTD to XML Schema
  • Use RELAX and datatypes right now.
  • Migrate to XML Schema or DTD, when necessary and
    possible.
  • If you use RELAX Core, classic,
  • Conversion is automatic
  • No loss of information

17
RELAX Core, fully relaxed
  • Regular Hedge Grammars
  • Ancestor-sensitive content models
  • Local scoping
  • Equivalence classes
  • Horn Clauses
  • Mutually-exclusive attributes
  • Attribute-sensitive content models

18
Ancestor-sensitive content models
  • ltelementRule pred"para" label"paraWithFNotes"gtlt
    mixedgt ltref label"footnote" occurs""/gtlt/mixed
    gt
  • lt/elementRulegt
  • ltelementRule pred"para" label"paraWithoutFNotes"
    gtltmixedgt ltempty/gtltmixed/gt
  • lt/elementRulegt

19
Ancestor-sensitive content models, continued
  • ltelementRule pred "sec"gtltref label"paraWithFNot
    es" occurs""/gt
  • lt/elementRulegt
  • ltelementRule pred "table-cell"gtltref
    label"paraWithoutFNotes" occurs""/gt
  • lt/elementRulegt

20
Simulating local scoping
  • ltelementRule pred"point"gt ltelement name"x"
    type"integer"/gt ltelement name"y"
    type"integer"/gtlt/elementRulegt

21
Simulating equivalence classes
  • blockElement
  • ol
  • ul
  • lthedgeRule label"blockElement"gt ltref
    label"ol"/gtlt/hedgeRule gtlthedgeRule
    label"blockElement"gt ltref label"ul"/gtlt/hedgeRu
    le gt

22
Mutually exclusive attributes
  • lttag name"A"gt ltattribute name"name"
    type"NMTOKEN"/gt ltattribute name"href"
    type"none"/gtlt/taggtlttag name"A"gt ltattribute
    name"href" type"URI"/gt ltattribute name"name"
    type"none"/gtlt/taggt

23
Attribute-sensitive content models
  • lttag name"div" pred"div-as-section"gtltattribute
    name"class" type"NMTOKEN" required"true"gt ltenu
    meration value"section /gtlt/attributegt
  • lt/taggt
  • lttag name"div" pred"div-as-subsection"gt
    ltattribute name"class" type"NMTOKEN"
    required"true"gt ltenumeration value"subsection
    /gtlt/attributegt
  • lt/taggt

24
Attribute-sensitive content models, continued
  • ltelementRule pred"div-as-section"gt
  • ltref label"div-as-subsection" occurs""/gt
  • lt/elementRulegt

25
Implementations
  • DTD-to-RELAX (in Java)
  • Alpha version is already available
  • Verifier of RELAX Core (in C)
  • Alpha version is already available
  • Generation of Java classes from RELAX Core
  • Alpha version is already available

26
Official site for RELAX
  • http//www.xml.gr.jp/relax/
  • FAQ
  • Tutorial (HOW TO RELAX)
  • Implementations
  • Specifications (in preparation)

27
Conclusion
  • RELAX will be available very soon.
  • Enjoy and RELAX!
Write a Comment
User Comments (0)
About PowerShow.com