WST XML editor schema finding using name of the schema [message #191902] |
Wed, 02 May 2007 02:04  |
Eclipse User |
|
|
|
Hi,
is there anyway to configure WST XML editor in a way that all the XML files
in an eclipse prject locate to the schema files at the project root?? The
project may have subfolders to hold XMl files. What I want is to just
mention the name of the schema file and don't want to mention the project
relative path. Your comment in this regard will be helpfull.
Thanks,
Kashif
|
|
|
|
Re: WST XML editor schema finding using name of the schema [message #191927 is a reply to message #191918] |
Wed, 02 May 2007 08:00   |
Eclipse User |
|
|
|
Hi Ed Merks,
Let me explain my problem....
My project structure looks like this
Project
a.. TemplateFolder
a.. Template1.xml
b.. Template2.xml
a.. MenuFolder
a.. Menu1.xml
b.. Menu2.xml
a.. Project.xml
b.. Tokens.xml
c.. Settings.xml
d.. SchemaFolder
a.. Schema for Template XML files
b.. Schema for Menu XML files
c.. Schema for Project XML files
d.. Schema for Tokens XMl files
e.. .....
f.. .....
What I really wanted to do is to just have a subfolder at the project level
say "schema". This is the folder which will have the schema files for all
the different types of XML files (template, menu, project, tokens and
settings). I don't want to put absolute the location of the schema file. If
I mention the absolute location of the schema file in the XML file then all
the projects does not preserve the shareable nature. It means if in my
project the location of the schema file is
F:\Infelxion_handheld\schema\temp\uiTemplate.xsd
This same location will not be valid for other user at his system. What I
can do is for the user I can place all my schema files in the in the project
root and might be XML editor allow me some sort of configuration mechanism
to resolve these schema files placed under the project root. If it does have
already built in mechanism that will be great which I don't know.
I got know that it can resolve the schema file location if I use
<uiMenu xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="../uiMenu.xsd">
uiMenu is the root element in my XMl file. This XML file is placed under the
Menu folder in the Project. But this is too an issue as user is allowed to
move file from one directory to another and then we have to track the
copying operation as well which seems not to be realistic.
I would really appreciate your valuable comments to solve the above problem.
Thanks,
Kashif
"Ed Merks" <merks@ca.ibm.com> wrote in message
news:f19rs6$pib$4@build.eclipse.org...
> Kashif,
>
> I don't know the details, but I'm quite sure WTP supports an XML catalog
> that allows you to specify the location of the schema for each target
> namespace. So look for a way to configure the catalog.
>
>
> kashif wrote:
>> Hi,
>> is there anyway to configure WST XML editor in a way that all the XML
>> files in an eclipse prject locate to the schema files at the project
>> root?? The project may have subfolders to hold XMl files. What I want is
>> to just mention the name of the schema file and don't want to mention the
>> project relative path. Your comment in this regard will be helpfull.
>>
>> Thanks,
>> Kashif
>>
>>
|
|
|
|
Re: WST XML editor schema finding using name of the schema [message #191940 is a reply to message #191930] |
Wed, 02 May 2007 08:37   |
Eclipse User |
|
|
|
Originally posted by: merks.ca.ibm.com
This is a multi-part message in MIME format.
--------------080807010501050207020208
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Kashif,
I'm really not familiar with how WTP manages the catalog but if relative
paths don't make you happy, and paths of the form
platform:/resource/project/My.xsd don't make you happy (maybe you don't
know about those?), then your last alternative appears to be the
catalog. In general a relative path like "Test" will/should be resolved
against the containing document's URI. I.e., if the example below were
in resource with URI platform:/resource/project/my.xml then the schema's
location should resolve to platform:/resource/project/Test and that
should be what's looked up in the XML catalog.
kashif wrote:
> Hi Ed Merks,
>
> I just created a namespace entry thorugh catlog
>
>
> Location: Spiderman Theme/uiMenu.xsd
> URI: platform:/resource/Spiderman Theme/uiMenu.xsd
> Key Type: Namespace Name
> Key: Test1
>
> My XMl file the looks like this
>
> <uiMenu xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:schemaLocation="http://www.w3.org/2001/XMLSchema-instance Test">
>
> I found the following warning message "No grammer constraint detected for
> the Document"
>
> May be I am missing something which needs to be address. When I use schema
> location option it says there needs to be full path to the location is
> required which does not fit wiht the requirement which I mentioned in the
> Last email. Any thoughts at this??
>
> Thanks,
>
> Kashif
>
>
>
>
>
>
>
>
>
>
> "Ed Merks" <merks@ca.ibm.com> wrote in message
> news:f19rs6$pib$4@build.eclipse.org...
>
>> Kashif,
>>
>> I don't know the details, but I'm quite sure WTP supports an XML catalog
>> that allows you to specify the location of the schema for each target
>> namespace. So look for a way to configure the catalog.
>>
>>
>> kashif wrote:
>>
>>> Hi,
>>> is there anyway to configure WST XML editor in a way that all the XML
>>> files in an eclipse prject locate to the schema files at the project
>>> root?? The project may have subfolders to hold XMl files. What I want is
>>> to just mention the name of the schema file and don't want to mention the
>>> project relative path. Your comment in this regard will be helpfull.
>>>
>>> Thanks,
>>> Kashif
>>>
>>>
>>>
>
>
>
--------------080807010501050207020208
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Kashif,<br>
<br>
I'm really not familiar with how WTP manages the catalog but if
relative paths don't make you happy, and paths of the form
platform:/resource/project/My.xsd don't make you happy (maybe you don't
know about those?), then your last alternative appears to be the
catalog. In general a relative path like "Test" will/should be
resolved against the containing document's URI. I.e., if the example
below were in resource with URI platform:/resource/project/my.xml then
the schema's location should resolve to platform:/resource/project/Test
and that should be what's looked up in the XML catalog.<br>
<br>
<br>
kashif wrote:
<blockquote cite="midf19vc2$2eb$1@build.eclipse.org" type="cite">
<pre wrap="">Hi Ed Merks,
I just created a namespace entry thorugh catlog
Location: Spiderman Theme/uiMenu.xsd
URI: platform:/resource/Spiderman Theme/uiMenu.xsd
Key Type: Namespace Name
Key: Test1
My XMl file the looks like this
<uiMenu xmlns:xsi=<a class="moz-txt-link-rfc2396E" href="http://www.w3.org/2001/XMLSchema-instance">"http://www.w3.org/2001/XMLSchema-instance"</a>
xsi:schemaLocation=<a class="moz-txt-link-rfc2396E" href="http://www.w3.org/2001/XMLSchema-instanceTest">"http://www.w3.org/2001/XMLSchema-instance Test"</a>>
I found the following warning message "No grammer constraint detected for
the Document"
May be I am missing something which needs to be address. When I use schema
location option it says there needs to be full path to the location is
required which does not fit wiht the requirement which I mentioned in the
Last email. Any thoughts at this??
Thanks,
Kashif
"Ed Merks" <a class="moz-txt-link-rfc2396E" href="mailto:merks@ca.ibm.com"><merks@ca.ibm.com></a> wrote in message
<a class="moz-txt-link-freetext" href="news:f19rs6$pib$4@build.eclipse.org">news:f19rs6$pib$4@build.eclipse.org</a>...
</pre>
<blockquote type="cite">
<pre wrap="">Kashif,
I don't know the details, but I'm quite sure WTP supports an XML catalog
that allows you to specify the location of the schema for each target
namespace. So look for a way to configure the catalog.
kashif wrote:
</pre>
<blockquote type="cite">
<pre wrap="">Hi,
is there anyway to configure WST XML editor in a way that all the XML
files in an eclipse prject locate to the schema files at the project
root?? The project may have subfolders to hold XMl files. What I want is
to just mention the name of the schema file and don't want to mention the
project relative path. Your comment in this regard will be helpfull.
Thanks,
Kashif
</pre>
</blockquote>
</blockquote>
<pre wrap=""><!---->
</pre>
</blockquote>
<br>
</body>
</html>
--------------080807010501050207020208--
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04542 seconds