xml schema for wired
DESCRIPTION
Mark Dönszelmann, Applications for Physics and Infrastructure, IT, CERN XML Detector Description Workshop CERN, 14 April, 2000. XML Schema for WIRED. Contents. XML Schema Features Tools XML-Data Binding Current Status and Implementation. Features (basic). A better DTD, written in XML - PowerPoint PPT PresentationTRANSCRIPT
-
XML Schema for WIREDMark Dnszelmann, Applications for Physics and Infrastructure, IT, CERNXML Detector Description WorkshopCERN, 14 April, 2000
-
ContentsXML Schema FeaturesToolsXML-Data BindingCurrent Status and Implementation
-
Features (basic)A better DTD, written in XMLThere is both a DTD and an XSD (recursive) for XML SchemaBasic ConceptsTypessimpleType: boolean, float, double, string, enumeration, ...complexType: may contain primitives and other elementsreuse simpleType and complexType to type elements and attributesAnnotations, Versions and CommentsGroups of elements or attributesone of manyall, in order
-
Features (advanced)Advanced ConceptsOrganizationSchema inclusionImport of types (from other schema)Schema locationTypesCardinality on elements and attributesDerived Types (Inheritance)by extensionby restrictionEquivalence of typesAbstract ElementsOtherUniqueness of elements or attributesKeys and references
-
ToolsAny XML Editor will be able to edit XML SchemaIBM Visual XML Tools provide a DTD->Schema converter (as a first start)Same toolset currently has DTD visualization tools, which may migrate to XML SchemaSame toolset can convert DTD in set of Java Classes (see next slide)
-
XML-Data BindingToday using DTD / Schema:Define a DTD / SchemaWrite/generate XMLUse a SAX or DOM parserWrite a set of Classes for your modelSAX: Write code to handle elements and attributes and build objectsDOM: Write code to browse tree and build objectsSun proposes XML-Data Binding Facility (July 1999)Java Beans Persistency proposed recently
-
XML-Data BindingSchema CompilerCompiles XML Schemas into a set of ClassesMarshalling FrameworkInternally uses SAX/DOM parserUnmarshals a set XML documents into a set of objectsMarshals a set of objects into a set of XML documentsXML SchemaJava ClassesXML DocumentsJavaObjectsCompileInstanceOfDefinedByMarshalUnmarshal
-
Current Status and ImplementationXML Schema Standard (Datatypes and Structures)Defined at the World Wide Web ConsortiumProposed Recommendation, since Dec 1999Most recent public draft: 25 Feb 2000XML Schema ImplementationXerces-j 1.0.3 (xml4j, java version) implements the latest standardsome exceptions: Unique, key and key ref no supported limitations on Inheritance elements, types, in same namespaceXerces-c 1.1.0 (xml4c, c++ version) does NOT yet implement XML Schema
-
ConclusionsWIRED is based on:Its own LoaderOne namespace for all the elementsMultiple DTDs, with some tricks to load themOur own key keyref implementationA small pre-SAX ParserXML Schema will provide WIRED with:Separate namespacesMultiple XSDs, which load properlyType checking on all the inputA standard key keyref implementationXML-Data Binding should:Get rid of the parser and loaderReplace those with a generic one