[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Using Namespaces for Validation
Hi Everyone, This is a proposal for using namespaces for validation. I thought I'd send it here because it might actalluy be *discussed* for a change... > > If find it interesting that they used the XHTML namespace as a namespace > > here. That may sound a bit odd, but consider: in the Modularization > >spec. they have on at least one occasion allowed us to use DTDs as a > > namespace. I can't help thinking "why can't we just use the DTD as a > > namespace?" > > Could you elaborate, Sean? What do you mean -- "use the DTD as a > namespace"? Certainly: <html xmlns="http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <head> <title>A Simple XHTML Document</title> </head> <body> <p>A clean example!</p> </body> </html> As condoned by: http://www.w3.org/TR/xhtml-building/developing.html#sec_6.5. "<html xmlns:myml="http://www.my.org/DTDs/mylanguage-1_0.dtd">" This is a core tenet of my current work with XHTML Schemas. The DTD method of implementation "Document Type Declaration" is out of date, and never really caught on in the first place. This all dates back to the very first days of the Internet when DC and Tim B-L decided to make it an application of SGML. At first it was good idea, but as the WWW grew, it became clear that a more extensible future was needed, and so XML came about. Then came XML Schema as a replacement for DTD, and although we know that XML Schema are too complicated to use, we at least have the spin-off of Namespaces to define what namespace certain parts of the document have. I'm just saying we should use these namespaces to *properly* define them, i.e. point them to any form of validation document (DTD or Schema at the mo'). This means that mixing languages becomes incredibly simple, especially when you compare it to DTD Modularization. I know the W3C swore they wouldn't use namespaces for validation, but I'm not a member of the W3C, and I say that using them is a good idea, because it simplifies the WWW (like recent discussions on XHTML-L allude to), and makes it more extensible. Simon mentioned the XHTML 1.0 spec. even points out that using namespaces is a good way to mix languages. So why not use them properly (or not, as the case may be!). If anyone bothered to read my last post [for members of this list, see http://lists.w3.org/Archives/Public/www-talk/2000SepOct/0026.html], you would have seen it is a tounge in cheek reply to a Dan Connolly message of *1992*. I really think anyone interested in this conversation should read it, even if it was only a joke! I know I'll get flamed for using his name, but Dan Connolly was one of the first people to suggest a means of expressing HTML as SGML: that is apparent from the message of 1992 that I replied to. He supported SGML DTDs for many years, but then found that no-one was using them, or supporting them for validation. So he looked for a simpler system, and namespaces and Schemas caught his attention. That's how I see it anyway... The way I approach it from is that I used to be a terrible coder. When I learned about the W3C and proper validatable HTML coding, I thought "well why are so few people using it?", and it wasn't long before I realised that the answer was that SGML Document Type Declarations (not definitions), are a pain in the neck. Namespaces offer us a way out. We even have emerging validation support in the form of XSV: but for that you have to use xsi:schemaLocation. I'm saying just refer to it straight with the xmlns attribute. And anyway, as long as the target namespace is declared in whatever schema you use (if you want to use schema), then there isn't a problem. That way we exploit the XML properties of XHTML. In the future, the DTD could be replaced by a Schema, but not XML Schema, I would suggest. I think we should consider using namespaces for validation and extension purposes, though. This may have to be issued as an extension to XML 2.0, but I'm not sure about the logistics of that. At any rate, a simple Note from the W3C would get the ball rolling. Final word: http://xhtml.waptechinfo.com/future/ Kindest Regards, Sean B. Palmer President and Founder WAP Tech Info - http://www.waptechinfo.com/
|
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
|