[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Where have the element types gone?
(sorry for the previous, incomplete post) It's probably foolish of me to send this email just before flying to Orlando, but having to do a presentation about namespaces (those of you who read French can download it as pdf [1] or word [2]), I have noticed that the element types which were playing a significant role in XML 1.0, which "disambiguation" has been the number 1 objective of namespaces in XML and which are playing a significant role in RDF have kind of vanished. Let's remind the facts first. XML 1.0 defines, out the scope of validation, element types as being identifiers: "[Definition: Each XML document contains one or more elements, the boundaries of which are either delimited by start-tags and end-tags, or, for empty elements, by an empty-element tag. Each element has a type, identified by name, sometimes called its "generic identifier" (GI), and may have a set of attribute specifications.]" Namespaces in XML defines its motivation as a way to disambiguate element types: "[Definition:] An XML namespace is a collection of names, identified by a URI reference [RFC2396], which are used in XML documents as element types and attribute names. " OTH, W3C XML Schema ignores the notion of element types to define instead element names which identify only global elements and simple or complex datatypes. This is IMO, more than a matter of vocabulary. The notion of element type just doesn't exit in W3C XML Schema and an element which is not defined as global by W3C XML Schema cannot be referenced (except if you have defined an id for it, but then you have no way to identify the same element type which would have been defined in different locations in a schema). The consequence which is already visible in most of the schemas I have seen recently is that people are relying on datatypes more than on element types to convey semantic information. For instance, to include a content model from a namespace "b" in a namespace "a", many people will create an element belonging to namespace "a" with a datatype defined in namespace "b". What does this mean for an application processing such a document? That the application, to be as generic as possible should ignore the element type to determine its behavior depending on the schema. Which means that these applications are unable to process the documents without a schema. One will argue that this makes the life of the document authors easiers to avoid multiple namespaces in documents... doesn't this ring a bell? don't you remember a markup language which was concise for document authors but required a schema? Looks like we are closing the loop and that we could have save a lot of effort by having kept SGML! Eric [1] http://www.atica.pm.gouv.fr/XML/documents/vdv.pdf [2] http://www.atica.pm.gouv.fr/XML/documents/vdv.doc [3] http://www.w3.org/TR/REC-xml#sec-starttags [4] http://www.w3.org/TR/REC-xml-names/#sec-intro -- See you in Orlando for XML 2001. http://www.xmlconference.net/xmlusa/ ------------------------------------------------------------------------ Eric van der Vlist http://xmlfr.org http://dyomedea.com http://xsltunit.org http://4xt.org http://examplotron.org ------------------------------------------------------------------------
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|