Relative links in schemata

Arnold Rots arots at head.cfa.harvard.edu
Wed Jan 12 22:41:16 PST 2005


Ray,

Now I'm confused (again).
I thought your recommendation, albeit for import, was to omit the
SchemaLocation, so it would default to the URI of the namespace.
Which says that the intent is to always get the schema from the
network.  Did we change our mind on this?

Cheers,

  - Arnold

Ray Plante wrote:
> Hey Guy,
> 
> On Wed, 12 Jan 2005, Guy Rixon wrote:
> > <xs:include schemaLocation="VODataServiceCoverage-v0.5.xsd"/>
> > 
> > The intended semantics of the URI in this code are clear: "get the subsidiary
> > file from the same place that you got the main file". However, the XSD
> > standard (W3C XML Schema recommendation) doesn't specify these semantics, 
> 
> Actually, I think it does, albeit indirectly.  The value of the
> schemaLocation attribute is defined to be an "anyURI" (Part 1; 4.2.1), and
> "anyURI" is allowed to be absolute or relative in accordance with the URI 
> definition in IETF RFC 2396 (Part 2; 3.2.17), which in turn describes a 
> relative URI as the difference from the URI of the current context.  
> 
> > at least one of my XML tools (oXygen 5.0) seems not to find the susidiary
> > file.
> > 
> > Is it possible to change the URL to be absolute or to actually include the
> > child schema in the parent at source?
> 
> I'm open to the idea, but my suspision is that this will cause more 
> problems than it fixes.  The relative URL was chosen because it works with 
> many parsers regardless of whether you are drawing the files from the 
> network or local disk.  In particular, you would have to change the schema 
> if you were not conncected with the network.  
> 
> cheers,
> Ray
> 
> 
--------------------------------------------------------------------------
Arnold H. Rots                                Chandra X-ray Science Center
Smithsonian Astrophysical Observatory                tel:  +1 617 496 7701
60 Garden Street, MS 67                              fax:  +1 617 495 7356
Cambridge, MA 02138                             arots at head.cfa.harvard.edu
USA                                     http://hea-www.harvard.edu/~arots/
--------------------------------------------------------------------------



More information about the registry mailing list