|
Re: Fetching xml.xsd from the cache [message #53944 is a reply to message #53930] |
Thu, 07 October 2004 11:03 |
Eclipse User |
|
|
|
Originally posted by: merks.ca.ibm.com
This is a multi-part message in MIME format.
--------------040803000906020108030401
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 7bit
Klaas,
The global resource set that loads the schema for schemas is initialized
like this:
public static synchronized ResourceSet getGlobalResourceSet()
{
if (globalResourceSet == null)
{
globalResourceSet = createResourceSet();
String baseURL = XSDPlugin.INSTANCE.getBaseURL().toString();
globalResourceSet.getURIConverter().getURIMap().put
(URI.createURI("http://www.w3.org/2001/xml.xsd"),
URI.createURI(baseURL + "cache/www.w3.org/2001/xml.xsd"));
}
return globalResourceSet;
}
It takes advantage of the URI converter's URI map to redirect the
physical location of a URI to another physical location. You can do the
same thing in the resource set you create.
Klaas Dellschaft wrote:
>Hi,
>
>I've seen that the file http://www.w3.org/2001/03/xml.xsd is contained in
>the cache of XSD. But when I load a file containing the following import
>statement:
>
> <xsd:import namespace="http://www.w3.org/XML/1998/namespace"
>schemaLocation="http://www.w3.org/2001/03/xml.xsd"/>
>
>XSD doesn't try to get the schema from the cache but from the internet.
>But the Schema for Schema is fetched from the cache. How do I tell XSD to
>load xml.xsd from the cache and not from the internet?
>
>Cheers
>Klaas
>
>
>
--------------040803000906020108030401
Content-Type: text/html; charset=ISO-8859-15
Content-Transfer-Encoding: 8bit
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-15"
http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Klaas,<br>
<br>
The global resource set that loads the schema for schemas is
initialized like this:<br>
<blockquote><big><tt><small>
|
|
|
Re: Fetching xml.xsd from the cache [message #592057 is a reply to message #53930] |
Thu, 07 October 2004 11:03 |
Ed Merks Messages: 33264 Registered: July 2009 |
Senior Member |
|
|
This is a multi-part message in MIME format.
--------------040803000906020108030401
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 7bit
Klaas,
The global resource set that loads the schema for schemas is initialized
like this:
public static synchronized ResourceSet getGlobalResourceSet()
{
if (globalResourceSet == null)
{
globalResourceSet = createResourceSet();
String baseURL = XSDPlugin.INSTANCE.getBaseURL().toString();
globalResourceSet.getURIConverter().getURIMap().put
(URI.createURI("http://www.w3.org/2001/xml.xsd"),
URI.createURI(baseURL + "cache/www.w3.org/2001/xml.xsd"));
}
return globalResourceSet;
}
It takes advantage of the URI converter's URI map to redirect the
physical location of a URI to another physical location. You can do the
same thing in the resource set you create.
Klaas Dellschaft wrote:
>Hi,
>
>I've seen that the file http://www.w3.org/2001/03/xml.xsd is contained in
>the cache of XSD. But when I load a file containing the following import
>statement:
>
> <xsd:import namespace="http://www.w3.org/XML/1998/namespace"
>schemaLocation="http://www.w3.org/2001/03/xml.xsd"/>
>
>XSD doesn't try to get the schema from the cache but from the internet.
>But the Schema for Schema is fetched from the cache. How do I tell XSD to
>load xml.xsd from the cache and not from the internet?
>
>Cheers
>Klaas
>
>
>
--------------040803000906020108030401
Content-Type: text/html; charset=ISO-8859-15
Content-Transfer-Encoding: 8bit
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-15"
http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Klaas,<br>
<br>
The global resource set that loads the schema for schemas is
initialized like this:<br>
<blockquote><big><tt><small>
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
Powered by
FUDForum. Page generated in 0.03375 seconds