OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   RE: <!NOTATION>

[ Lists Home | Date Index | Thread Index ]
  • From: "Matthew Sergeant (EML)" <Matthew.Sergeant@eml.ericsson.se>
  • To: "'John Cowan'" <cowan@locke.ccil.org>, XML Dev <xml-dev@ic.ac.uk>
  • Date: Fri, 22 Jan 1999 10:07:28 +0100

> -----Original Message-----
> From:	John Cowan [SMTP:cowan@locke.ccil.org]
> 
> Let's say that you have an element with #PCDATA content that's
> supposed to contain a date, like this:
> 
> 	<CREATED>1999-01-21</CREATED>
> 
> You can say that this is a date in a standard way by adding the
> following to the DTD:
> 
> 	<!NOTATION ISO-8601-date SYSTEM "http://www.iso.ch/8601">
> 	<!ATTLIST CREATED
> 		type NOTATION(ISO-8601-date) #FIXED "ISO-8601-date">
> 
> which says that all CREATED elements have an attribute named "type",
> of type NOTATION, with fixed value "ISO-8601-date", which is a
> notation bound to the ISO 8601 definition of a date.  This notation
> is verbose because there's flexibility in it which I'm not really
> exercising, to have elements whose content can be one of multiple
> datatypes, like:
> 
> 	<!NOTATION int32 SYSTEM "...">
> 	<!NOTATION int64 SYSTEM "....">
> 	<!NOTATION float SYSTEM "......">
> 	<!ATTLIST MUTABLE
> 		type NOTATION(int32,int64,float) #REQUIRED>
> 
> which declares that MUTABLE elements must have a "type" attribute
> whose value is either "int32" or "int64" or "float", and the notation
> declarations tell you what those mean.  The systemids are
> URLs that point to the definition of the datatype (in English or
> whatever language natural or formalized).
> 
	Unfortunately that information is only really useful for document
authors (which is fine, in itself) - it doesn't appear (to me) to be any use
to parsers. It can be of /some/ use to custom parser code, but only when
that code has prior knowledge of these notation definitions. And that's a
shame. Perhaps we need some standard notations?

	Matt.

xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/
To (un)subscribe, mailto:majordomo@ic.ac.uk the following message;
(un)subscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)





 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS