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

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Re: [xml-dev] Datatypes - it's in the contract

[ Lists Home | Date Index | Thread Index ]

John,

> Attributes of type NOTATION have a value declared by a NOTATION
> declaration in the DTD, which specifies a system id and/or a public
> id. What for? The idea was supposed to be that the system and/or
> public id specified what the datatype was, without necessarily
> dereferencing it (the same thing later reinvented for namespace
> names). But the reason for the NOTATION attribute in the first place
> was to say that the content of this element was of the type
> specified therein.

So, aside from it being an obvious travesty to shoe-horn them into
DTDs, could you use the W3C XML Schema data types in a DTD by
declaring a NOTATION? The equivalent of:

  datatypes xs = "http://www.w3.org/2001/XMLSchema-datatypes";

  element date { xs:date }

being something along the lines of:

  <!NOTATION xs.date
             PUBLIC 'http://www.w3.org/2001/XMLSchema-datatypes#date'>

  <!ELEMENT date (#PCDATA)>
  <!ATTLIST date
    type NOTATION (xs.date) #FIXED 'xs.date'>

(Please correct; not being an SGML weenie, I've never using
NOTATIONs.)
    
I gather that you couldn't use notations to specify the type of
attributes?

Cheers,

Jeni

---
Jeni Tennison
http://www.jenitennison.com/





 

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

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