- From: Michael Kay <mike@saxonica.com>
- Date: Sun, 18 Mar 2007 14:51:41 -0000
- To: "'Mystra x64'" <mystra_x64@fastmail.fm>, "'Pete Cordell'" <petexmldev@tech-know-ware.com>
- Cc: <xmlschema-dev@w3.org>
Personally if I were redesigning this I would go for something like xsi:schema="uri" where uri identifies a schema that either defines or imports definitions for all the namespaces used in your source document. You can always create an aggregate schema containing all the components needed by suitable use of imports. But I'm not a great fan of the idea of specifying the schema in the instance document anyway. When I validate an incoming instance document, I want it to be valid against my choice of schema, not against the document author's choice of schema. Michael Kay http://www.saxonica.com/ > -----Original Message----- > From: xmlschema-dev-request@w3.org > [mailto:xmlschema-dev-request@w3.org] On Behalf Of Mystra x64 > Sent: 18 March 2007 13:48 > To: Pete Cordell > Cc: xmlschema-dev@w3.org > Subject: Re: schemaLocation > > > But the list of pairs in an attribute is kind of... well, > ugly - you need to write schema name both in xmlns and > schemaLocation. Sounds kind of redundant. > > xmlSchemaLocation:mycoolns is a good idea, but unfortunately > that sure causes more confusion than help. > > But mycoolns:xmlSchemaLocation can work, I think. Yes, it's > the whole name that has to be xml prefixed, but well... why > not? Names starting with 'xml' > are reserved for a reason, then let's use them after all. > > If that can't be done augmenting the xml namespace will work, I guess. > > On Sun, 18 Mar 2007 10:09:43 -0000, "Pete Cordell" > <petexmldev@tech-know-ware.com> said: > > Mind you, XML already reserves any name starting with > 'xml'. So that > > got me to thinking you could do: > > > > mycoolns:xmlSchemaLocation="http://someothercoolurl.com/file.xsd" > > > > But then, it's the whole name that has to be xml prefixed, so you'd > > have to do something like: > > > > xmlSchemaLocation:mycoolns="http://someothercoolurl.com/file.xsd" > > > > This looks very xmlns use-case like, and has potential I guess. > > However, I think the xmlns use-case is a bit of a fudge (or > at best an > > exception) as normally a name is split into namespace > prefix and local > > part. Having some names being split one way and other > names that are > > split other ways is a recipe for disaster in the long term. > > (Especially if it opens the door to splitting names in other ways.) > > > > If you can't mess with the attribute name, then that really > leaves you > > with attribute value. As there may be multiple schemas > that define an > > XML instance, then you need to define multiple schema locations and > > with that, which of the schemas is actually associated with a > > particular location. > > Hence the list of pairs. (See the example in > > http://www.w3.org/TR/xmlschema-1/#schema-loc) > > > > XML has no mechanism for reserving all of the locally named > attributes > > in a particular namespace, hence putting it into the XML instance > > namespace. > > > > What would have been helpful I think is to either have > predefined that > > 'xsi' > > is automatically known to all XML processors (without > having to do an > > namespace declaration) or maybe even better, augment the > xml namespace > > so that you could do: > > > > <stylesheet xmlns="http://www.w3.org/1999/XSL/Transform" > > xmlns:html="http://www.w3.org/1999/xhtml" > > xml:schemaLocation="http://www.w3.org/1999/XSL/Transform > > > http://www.w3.org/1999/XSL/Transform.xsd > > http://www.w3.org/1999/xhtml > > http://www.w3.org/1999/xhtml.xsd"> > > and: > > xml:type > > xml:nil > > > > etc. > -- > Mystra x64 > mystra_x64@fastmail.fm > > -- > http://www.fastmail.fm - mmm... Fastmail... > >
Received on Sunday, 18 March 2007 14:51:54 UTC