[XML-DEV Mailing List Archive Home]
[By Thread]
[By Date]
[Recent Entries]
[Reply To This Message]
Re: Why does my browser treat the XML Schema document ata URL
- From: Mike Sokolov <sokolov@ifactory.com>
- To: "Rushforth, Peter" <Peter.Rushforth@NRCan-RNCan.gc.ca>
- Date: Mon, 10 Sep 2012 09:40:34 -0400
In my experience the content negotiation Peter is referring to is used
almost exclusively for choosing a resource in an appropriate (human)
language. I've never seen it used for mime type negotiation: people
usually seem to use different URLs to represent the same resource in
different formats. Peter, can you point to any examples where the same
resource is served in multiple formats using content negotiation that
are in common practice?
-Mike
On 09/10/2012 09:30 AM, Rushforth, Peter wrote:
1CD55F04538DEA4F85F3ADF7745464AF1AE50CFC@S-BSC-MBX1.nrn.nrcan.gc.ca"
type="cite">
> I don't understand what this means. For
example, xsi:schemaLocation?
xsi:schemaLocation _is_ a typed
link, the type is implied by the design/context of this
attribute. It's just that
there's no media type apart from
application/xml to go with it.
Regarding
http://www.w3.org/2001/xml, when
accessed with no media type preference, you get application/xml
with an xml-stylesheet PI
which styles the result to HTML. However, most 'properly configured
web servers' would
provide an html
representation and an xml representation, and not use the
xml-stylesheet trick.
Take xsi:schemaLocation="http://www.w3.org/2001/xml" On
a 'properly configured web server', there would be
different representations
of that resource, and it would be up to the client to negotiate for the
right one. There
would likely be a default
representation, one which would be served in the absence of an Accept
header, or where
the media type ranges
provided by the Accept value could not be honoured. Mostly on the web
this is text/html,
but where the most common
use is in an xml toolchain it makes sense to make the default
application/xml,
as is the case here.
>
The content-type of a resource is independant of any entity which links
to it.
Yes. But there can be
more than one view of that content type.
Cheers,
Peter
> Because there are no typed links in XML so
it is impossible for the
> client to disambiguate except perhaps by context / hardcoding?
I don't understand what this
means. For example, xsi:schemaLocation? If you fetch a document at
that link, or you fetch an XSD document as Roger initially did, any
properly-configured web server will return that with an XML
content-type. The content-type of a resource is independant of any
entity which links to it.
/r$
--
STSM, WebSphere Appliance Architect
https://www.ibm.com/developerworks/mydeveloperworks/blogs/soma/
|
[Date Prev]
| [Thread Prev]
| [Thread Next]
| [Date Next]
--
[Date Index]
| [Thread Index]
|
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
RSS 2.0 |
|
Atom 0.3 |
|
|
Stylus Studio has published XML-DEV in RSS and ATOM formats,
enabling users to easily subcribe to the list from their preferred news reader application.
|
Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website.
they were not included by the author in the initial post. To view the content without the Sponsor Links please
click here.
|
|