[xsd-users] Schema server

Loyen, Hans H (NSC) Hans.Loyen at ns.nl
Tue Feb 13 04:35:13 EST 2007


Hi,

I thought that we needed a special server for this. But I now understand
that it is enough to have the xsd's available as text document on the
apache server!?. We will try this.

Thanks a lot

Hans Loyen

-----Oorspronkelijk bericht-----
Van: Boris Kolpackov [mailto:boris at codesynthesis.com] 
Verzonden: dinsdag 13 februari 2007 9:55
Aan: Loyen, Hans H (NSC)
CC: xsd-users at codesynthesis.com
Onderwerp: Re: [xsd-users] Schema server

Hi Hans,

I've CC'ed xsd-users so that others can benefit from this information.
Please keep xsd-users in the CC list in your future replies.

Loyen, Hans H (NSC) <Hans.Loyen at ns.nl> writes:

> We have created a number of nested xsd-files which are used on a 
> interfaces between some systems. In the xsd-files there is a reference

> to the schemaLocation. Until now we saved the xsd's on the local 
> filesystem. All our systems have to do so. It must be possible to get 
> them from a schema server like "http://www.w3.org/2001/XMLSchema". 
> Maybe I am not using the right terms here, but I hope that you do 
> understand me now.

Any http server would do (e.g., apache). Note, however, that if you are
parsing a lot of XML documents and every time the parser has to fetch
the schema over the network, then you can end up with a pretty poor
performance. One way to address this would be to cache the schema.


>
> Top of one of the xsd-files
>
>   <?xml version="1.0" encoding="ISO-8859-1" ?>
> - <xs:schema
> targetNamespace="http://schemaserver/schemas/1.0/ik_tds_dmt"
> xmlns:xs="http://www.w3.org/2001/XMLSchema"
> xmlns:ik_tds_dmt="http://schemaserver/schemas/1.0/ik_tds_dmt"
> xmlns:ik_vprod="http://schemaserver/schemas/1.0/ik_vprod"
> xmlns:ik_dmt="http://schemaserver/schemas/1.0/ik_dmt"
> attributeFormDefault="qualified" elementFormDefault="qualified"
> version="1.0">
> - <xs:annotation>
>   <xs:documentation>CVS Id: $Id: TDS_DOMAIN_TYPES.xsd,v 1.13 
> 2007/02/12
> 15:45:57 hans Exp $ Hier worden de domeinen beschreven, die binnen de 
> TicketDistributionService worden gehanteerd.</xs:documentation>
>   </xs:annotation>
>   <xs:import namespace="http://schemaserver/schemas/1.0/ik_dmt"
> schemaLocation="INET_DOMAIN_TYPES.xsd" />
>   <xs:import

I think you are confusing namespace and schemaLocation attributes above.
Normally you would place all your schemas on a web server somewhere, say
"http://schemaserver/". Then in an instance document you will add the
xsi:schemaLocation attribute like this:

xsi:schemaLocation="http://www.company.com/foo
http://schemaserver/foo.xsd"

Here is "http://www.company.com/foo" is a vocabulary namespace and
"http://schemaserver/foo.xsd" is the schema location. Note that in
xs:import declarations you would normally use relative paths which will
be automatically prefixed with the URI prefix (e.g.,
"http://schemaserver/").


hth,
-boris

------------------------------------------------------------------------------------------
Deze e-mail, inclusief eventuele bijlage(n), is uitsluitend bestemd voor gebruik door de 
geadresseerde(n). Indien u dit bericht abusievelijk heeft ontvangen, mag de informatie 
daarvan niet worden gebruikt of openbaar gemaakt, noch aan derden worden 
verstrekt. Wij verzoeken u om in dat geval direct contact op te nemen met de 
afzender en de e-mail te vernietigen.

This e-mail, including any appendix or appendices, is intended solely for use by the 
addressee(s). If you have received this message in error, the information it contains 
may not be used or disclosed, nor may it be revealed to third parties. In that case, 
please contact the sender immediately and destroy the e-mail.





More information about the xsd-users mailing list