One could add that XML's NOTATION construct is held over from SGML, where
it was much more common, since markup applications before the web did need
ways to denote the presence of specialized data types or notations (and it
was very nice to do this in a standard way). Accordingly it's very useful
for backward-compatibility in systems that are migrating from SGML; but
since what it provides for is also, nowadays, usefully supported in other
ways as well, e.g. though MIME typing, a pure XML system may just not need it.
At 05:52 PM 3/18/2002, you wrote:
>Luis Abreu wrote:
> > This question is about the notation element. I've seen one or two
> > examples about it. What I don't understand is if it really is used in
> > real life.
>I don't think it is. It's frequently mentioned as being one of the
>less-used or not-used parts of XML.
> > Could someone please give me an example of how an
> > application that uses XML would benefit from including notations?
>Notations provide a simple form of data typing that is similar to the
>xsi:type attribute from XML Schemas. In both cases, the instance has an
>attribute that specifies what the data type of the content is.
>For example, the following states that the notation of the OrderDate
>element is DATE. The DATE notation declaration identifies the notation
>by its URI (http://www.dates.org/date).
> Type NOTATION (DATE) #REQUIRED>
>There is no requirement that the URI be resolvable. That is, like
>namespace URIs, it can be just an identifier that the application
>recognizes and say, "Oh, I recognize that. That means I process the
>contents like this ..."
>If the URI is resolvable, it might point to something useful, such as a
>program to process the content. For example, suppose I have an unparsed
>entity that points to a JPEG. The notation URI could point to a program
>that displays JPEGs.
>I suspect that one reason notations are not commonly used is that
>applications generally know how to process their own XML documents. That
>is, there is no reason to put data typing information into the XML
>documents since it is already hard-coded in the application.
Wendell Piez mailto:[log in to unmask]
Mulberry Technologies, Inc. http://www.mulberrytech.com
17 West Jefferson Street Direct Phone: 301/315-9635
Suite 207 Phone: 301/315-9631
Rockville, MD 20850 Fax: 301/315-8285
Mulberry Technologies: A Consultancy Specializing in SGML and XML