blob: 6cca1049e2ad395c604263bdab66454dae853299 [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="../../../../../default_style.css"
type="text/css">
<link rel="stylesheet" href="../../../../wtp.css" type="text/css">
<title>XML development mode for restricted internet access</title>
<style>
<!--
dd {
padding-bottom: 1em;
}
dt {
text-decoration: underline;
}
-->
</style>
</head>
<body>
<h1>
XML Development Mode to Support Restricted Internet Access
</h1>
<p>
Markup languages such as XML, XML Schema and WSDL support a 'distributed' design
by allowing references to internet resource via URI's. These references are not
simply optional links (like href's in HTML) but refer to important and often
required information that must be processed in order to validate or compile an
XML artifact. This works perfectly well when the markup is deployed on the web,
but at development time software developers are accustomed to having all of
their development artifacts available on their local machine. Many developers get
paranoid and frustrated when their development tools go off
to the internet to fetch resources. These developers want to prohibit the tools
from opening internet connections (unless explicitly directed to by the user).
They also want compilers and validators to produce error or warning message to
identify places in their markup code where internet access is implied (e.g. an
XML Schema import that isn't mapped to a local file in the XML Catalog).
</p>
The following proposal attempts to address this issue by introducing optional
development modes to statisfy this class of user.
<h3>
Preference Page
</h3>
A preference page will be provide to allow users to choose between development modes.
<ol>
<li><b>Restricted Internet Access</b><br/> Development tools are restricted from
accessing the internet. Explicit user action is required to enable
tools to open internet connections. Remote references in markup
languages that require opening internet connections will be treated as warnings or errors.
<li><b>Unresricted Internet Access - with warnings</b><br/> Development tools are granted
permission to automatically open internet connections when required to resolve references in artifacts.
Remote references in markup languages that require opening internet connections are flagged with warning markers.</li>
<li><b>Unresricted Internet Access</b><br/> Development tools are granted
permission to automatically open internet connections when required to resolve references in artifacts.
Remote references in markup languages that require opening internet connections are permitted.</li>
</ol>
<br/>
<h3>
XML Validators
</h3>
Before opening an input stream an XML validator (this includes validators for XML, DTD, XML Schema, WSDL, etc.) will consider the preference settings (described above) and the resolved 'physical' location of a URI.
URI's using the HTTP, FTP or (todo... are there more?) protocols are considered to be internet references. The validator will poroceed as follows..
<br/>
<pre>
if internet access is restricted and the URI is consider to be an internet reference
produce an error message
else
if the URI is consider to be an internet reference
if the preferences indicate warning should be produced for internet references
produce a warning message
the validator opens the input stream for the URI
</pre>
<br/>
<h3>
Quick Fixes
</h3>
An error or warning message produced by an XML Validator (as described above) will provide a Quick Fix to help resolve the error.
The Quick Fix will enable the user to download the remote artifact and save it (1) in the workspace (2) in a directory on the local file system.
The Quick Fix will then add an XML Catalog entry tro redirect the remote resource reference to the local copy.
At this point the validator will be invoked to revalidate the XML artifact at which point the error will go away.
<br/><br/>
<h3>
XML Artifact Models
</h3>
Various XML artifact models such as XML Schema and WSDL models automatically traverse resource references (such as imports and includes) when
to build up a logical model composed of several artifacts. Before opening an input stream a model will consider the preference settings (described above) and the resolved 'physical' location of a URI.
URI's using the HTTP, FTP or (todo... are there more?) protocols are considered to be internet references. The model will poroceed as follows..
<br/>
<pre>
if internet access is restricted and the URI is consider to be an internet reference
the model will behave as though an error occured opening the stream
else
the model opens the input stream for the URI
</pre>
<br/><br/>
<b>Related bugs :</b> <br/>
<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=112970">112970</a>
</body>
</html>