[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Why you should avoid Notation Declarations (by Kohsuke Kawaguchi)

  • To: xml-dev@l...
  • Subject: Why you should avoid Notation Declarations (by Kohsuke Kawaguchi)
  • From: Razvan MIHAIU <mihaiu@m...>
  • Date: Tue, 22 Feb 2005 08:36:37 +0200
  • User-agent: Internet Messaging Program (IMP) H3 (4.0)

confused pic


	In an article by Mr. Kohsuke Kawaguchi found at:


he explains why notations should be avoided. The following XML Schema is

<xsd:notation name="jpeg" public="image/jpeg" system="viewer.exe" />

<xsd:element name="picture2">
			<xsd:extension base="xsd:hexBinary">
				<xsd:attribute name="pictype">
						<xsd:restriction base="xsd:NOTATION">
							<xsd:enumeration value="jpeg"/>
							<xsd:enumeration value="png"/>

	The following XML is OK:

<picture pictype="jpeg"> ... </picture>

and so is this: (I tested with XML Spy 2005 and XSV 2.8-1)

<pic:picture pictype="jpeg"> ... </pic:picture>

but the author says that the later form is invalid:

But the following fragment is not valid even if the prefix "pic" is properly
<pic:picture pictype="jpeg"> ... </pic:picture>
Confused? You have to write it as follows because it's a QName.
<pic:picture pictype="pic:jpeg"> ... </pic:picture>
Apparently it fails to serve its only reason for existing. There's really no
reason to use notations. Notations are for SGML.

	Can somebody explain why notations are bad and they should be avoided ?



Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
First Name
Last Name
Subscribe in XML format
RSS 2.0
Atom 0.3

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.

Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.