LASXML, Validation, and RELAX NG - PowerPoint PPT Presentation

1 / 11
About This Presentation
Title:

LASXML, Validation, and RELAX NG

Description:

Have all configuration information in XML. Be ... Well formed' vs. valid' 10% of XML documents have errors! Well formed' means that the XML syntax is correct. ... – PowerPoint PPT presentation

Number of Views:37
Avg rating:3.0/5.0
Slides: 12
Provided by: jonathan190
Category:

less

Transcript and Presenter's Notes

Title: LASXML, Validation, and RELAX NG


1
LAS-XML, Validation, and RELAX NG
  • Jon Callahan(standing in for Roland Schweitzer)

2
LAS use of XML
  • LAS (will) store all configuration information
    in XML documents
  • Server configuration
  • User Interface components
  • Dataset descriptions
  • Variables
  • User Interface presentation
  • Product generation hints
  • Data access hints

3
LAS use of XML
4
Sister servers

5
Improving our use of XML
  • GOALS
  • Have all configuration information in XML
  • Be able to create a schema for validation
  • Better separate UI vs. product server info
  • Expanded set of information
  • Clean up inconsistencies

6
New dataset XML
  • ltlasdata version"6.5"gt
  • ltdataset
  • doc"http//www.cdc.noaa.gov/cdc/data.coad
    s.ltm.html"
  • ID"CDC014"
  • name"COADS LTMs"gt
  • ltvariable
  • ID"V2"
  • name"Sea Surface Temperature"
  • units"degC"
  • url"file//Datasets/coads_2d_g_std/ss
    t.mean.ncsst"gt
  • ltgrid IDREF"G88"/gt
  • lt/variablegt
  • ltvariablegt lt/variablegt
  • lt/datasetgt

7
New dataset XML
  • ltgrid ID"G88"gt
  • ltaxis IDREF"CDC014-lon17"/gt
  • ltaxis IDREF"CDC014-lat18"/gt
  • ltaxis ID"CDC014-time88" type"t"
    units"month"gt
  • ltarange size"120" start"1990-01-01"
    step"1"/gt
  • lt/axisgt
  • lt/gridgt
  • ltaxis ID"CDC014-lon17" type"x"
    units"degrees_east"gt
  • ltarange size"180" start"1" step"2"/gt
  • lt/axisgt
  • ltaxis ID"CDC014-lat18" type"y"
    units"degrees_north"gt
  • ltarange size"90" start"-89" step"2"/gt
  • lt/axisgt
  • lt/lasdatagt

8
Well formed vs. valid
  • 10 of XML documents have errors!
  • Well formed means that the XML syntax is
    correct.
  • Valid means that the XML conforms to a schema
    (or DTD).
  • Tools are available to validate XML against your
    schema.
  • Automatic validation means less user support!

9
Writing schemas with RELAX NG
  • RELAX NG is a newly popular tool for writing XML
    schemas.
  • RELAX NG focuses on XML tree structure(not
    element content).
  • RELAX NG schemas are easy to write.
  • RELAX NG schemas are easy to read.
  • Working with RELAX NG is fun! (Roland)

10
RELAX NG schema for ltlasdatagt
  • ltdefine name"Lasdata"gt
  • ltelement name"lasdata"gt
  • ltattribute name"version"/gt
  • ltinterleavegt
  • ltoneOrMoregt
  • ltref name"Dataset"/gt
  • lt/oneOrMoregt
  • ltoneOrMoregt
  • ltref name"Grid"/gt
  • lt/oneOrMoregt
  • ltoneOrMoregt
  • ltref name"Axis"/gt
  • lt/oneOrMoregt
  • lt/interleavegt
  • lt/elementgt
  • lt/definegt

11
Useful links
  • The RELAX NG Tutorial at Oasis.
  • A 3-part series of "XML Matters" columns entitled
    "Kicking back with RELAX NG" by David Mertz (Part
    1, Part 2, and Part 3).
  • An article about the design philosophy behind
    RELAX NG.
  • The text of a book on RELAX NG to be published by
    O'Reilly Associates.
  • A C-library that includes RELAX NG validation
    with Perl bindings via XML-LibXML.
Write a Comment
User Comments (0)
About PowerShow.com