Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSXMLDocument xsi:noNamespaceSchemaLocation attribute accepted in validateAndReturnError method?



Hi guys, kind of a funky question ... not a crisis or anything, but I was curious if anyone knows ... or if this is a bug. I am happy to radar away if it's a bug. I actually Googled "NSXMLDocument xsi:noNamespaceSchemaLocation" and it comes up a bust ... zero hits. :) So I thought I would verify here before radar-ing. :)

So okay, my issue ...

I'm trying to validate against an Apple-defined XML schema:

http://deimos.apple.com/iTunesURequest-1.0.3.xsd

Cocoa has this handy-dandy method in NSXMLDocument ... validateAndReturnError:

http://developer.apple.com/documentation/Cocoa/Reference/Foundation/ Classes/NSXMLDocument_Class/Reference/Reference.html#//apple_ref/occ/ instm/NSXMLDocument/validateAndReturnError:

it can use a DTD to validate XML ... or an XMLSchema doc. But if you go XMLSchema, it looks like your schema has to be in a namespace.

In other words, so long as you put an xsi:schemaLocation attribute in the root element of the XML you want to validate, all is cool ... but if your schema is not in a namespace (like Apple's) ... well, you're supposed to use xsi:noNamespaceSchemaLocation ... per the w3c. :) But the validateAndReturnError method in NSXMLDocument does not see that attribute ... only xsi:schemaLocation.

Am I just missing something obvious here?  :)

Many thanks in advance for any insight.

Richard K. Wolf                    University of Illinois at Chicago
email@hidden (work)  Tweets: richwolf     (work) +1 312 996-8291
email@hidden (fun)   AIM: pigthug       (mobile) +1 773 339-0574



_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden


Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.