Thursday, June 06, 2002 | |
I read today that Sun has something that will validate RNG. MHV? Can't recall now. And Greg can attest to my penchant for inflicting obscure solutions on the development team :-) But the point's taken. XML Schema has the mindshare, and the fact is, a lot of us, myself included, have been clamoring for Schema for years. Gotta be more careful what I ask for next time :-)
Thanks for the link, it's on my queue. What language is your implementation in? Some more followup to my reading from tonight. Simon St. Laurent has a blog entry that he wrote in response to the brouhaha on xml-dev. Then there's Len Bullard, on xml-dev: Nodes is nodes. Properties is properties. Tell me who gets to name the names so we can get on with business. That's it. 250 emails later, plus a bunch of other pages, I'm going to bed. 10:49:32 PM permalink
|
Just for the sake of experimenting, I decided to try the original idea. Guess what? It doesn't work. Why? Because System.Xml.XmlValidatingReader throws an exception if the System.Xml.XmlReader you pass in to the constructor is not System.Xml.XmlTextReader. Of course, the documentation does specify that it will throw an exception so it is my own fault for trying something that was destined to fail. Just seems kind of lame to me. [Justin Rudd's Radio Weblog] Now that restriction sounds familiar, I remember being burned by this a few months ago. The System.Xml classes seem to be that way: they entice you to do something that doesn't work. I guess we can hold forth hope that the v.next of the FCL will allow other XmlReader types to be used here, why else would they declare the constructor that way? My own experiments were a little disappointing too, though in retrospect I was expecting too much. What I thought I could do was to validate a document part way, attach a schema, then validate the rest. But this really doesn't make sense; considering that there's no namespaces, by introducing a schema that wasn't namespaced, you'd have to completely reparse the document to make sure it was valid. How would this work with namespaces? I suppose that the XmlResolver would get a call at the point a new namespace was introduced, which would cause the schema to be loaded. Would the reparse restriction still apply? I bet it would. All this seems to be discouraging validation on documents, which might be good practice in general on a production environment, but still might be desirable. Schema validation is already expensive and it seems like this makes it more so. Justin, are you going to publish your RSS schemas? One other experiment I was considering is whether it would be possible to combine your schemas into 1, using the fixed attribute on the version attribute's declaration to determine which way to validate. This could be another wild goose chase, but offhand, could you construct something like this? <xs:schema elementFormDefault="unqualified" xmlns:xs="http://www.w3.org/2001/XMLSchema"> <xs:element name=RSS type="rssType"/> <xs:complexType name="rssType" abstract="true"/> <xs:complexType name="rss091Type" > <xs:complexContent> <xs:extension base="rssType"> <xs:attribute name="version" fixed="0.91"/> </xs:extension> </xs:complexContent> </xs:complexType> <xs:complexType name="rss092Type"> <xs:complexContent> <xs:extension base="rssType"> <xs:attribute name="version" fixed="0.92"/> </xs:extension> </xs:complexContent> </xs:complexType> </xs:schema> It seems like it would work, but I get the feeling that I'm just moving the hack from the code to the schema. 9:13:07 PM permalink
|
Clay Shirkey: HTTP and HTML are the Whoopee Cushion and Joy Buzzer of Internet protocols. Guido Casper: It's certainly worth a read for anyone involved in the SOAP vs. REST debate. Thanks Guido! [Sam Ruby] [Sam Gentile's Radio Weblog] This is pretty interesting and reinforces my earlier argument that Paul Prescod was really using some weak arguments when he was trying to fit REST into the ISO model. The Internet and later the web have been historically at odds with more scholarly efforts. Somewhere, I saw that this article is about 4 years old. It's interesting to watch the debates in the XML and Web Services communities; on the one hand there's the Schema vs. RELAX-NG (vs. the DTD crowd that's still hanging on) on xml-dev, where there seems to be serious rebellion against Schema among people like Simon St. Laurent, E.R. Harold, and Tim Bray, mostly objecting to its complexity. This same group opposes SOAP on mostly the same grounds, but I don't consider them REST proponents, they're just non-adopters of SOAP. On the other hand, there's REST vs. SOAP, which is interesting in that the REST proponents are using arguments of architectural purity, while the SOAP side's stronger argument is the number of working implementations of SOAP web services, yet REST is trying to claim that ground by saying that they've had working implementations for years. Each of these battles has the sides well dug in, though the resistance from the non-adopters seems to be stronger than the push from the early adopters. I have a ton of catching up to do. I've been busy building servers and working through deployment issues, and I have 250 unread emails that I want to get through tonight. Someone started a topic on rest-discuss about a RESTful travel agent implementation, it's always entertaining, and sometimes enlightening, to hear outside ideas about how the travel industry works, or should work. 8:11:57 PM permalink
|
Just got an email regarding a couple .NET bugs that I thought I'd pass along:
2:52:43 PM permalink
|
A message from Tim Bray on xml-dev pointed me to a message from James Clark on another mailing list, blasting XML-Schema and specifically, its promotion by the IETF as the schema language of choice for IETF specs. James favors RELAX-NG (clearly there's a conflict of interest here), but I think that the points he brings out about XML-Schema are interesting. (Dare Obasanjo offered a refutation of point #7, and my experience is that James' observation isn't valid). I have passing interest in alternatives to XML-Schema, but it's one of those things that never gets enough priority for me to really do anything real with.
2:52:41 PM permalink
|