Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » XML Schema Definition (XSD) » Fetching xml.xsd from the cache
Fetching xml.xsd from the cache [message #53930] Thu, 07 October 2004 09:24 Go to next message
Klaas Dellschaft is currently offline Klaas DellschaftFriend
Messages: 58
Registered: July 2009
Member
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
Re: Fetching xml.xsd from the cache [message #53944 is a reply to message #53930] Thu, 07 October 2004 11:03 Go to previous message
Eclipse UserFriend
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 Go to previous message
Ed Merks is currently offline Ed MerksFriend
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/
Previous Topic:Fetching xml.xsd from the cache
Next Topic:How to load Include/Redefine/Import Namespaces?
Goto Forum:
  


Current Time: Thu Dec 26 12:50:58 GMT 2024

Powered by FUDForum. Page generated in 0.03375 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top