Skip to main content



      Home
Home » Language IDEs » ServerTools (WTP) » XML Editor and the use of only specific validation files for certain file types
XML Editor and the use of only specific validation files for certain file types [message #67089] Mon, 24 January 2005 04:19 Go to next message
Eclipse UserFriend
Hi everybody,

I am wondering if there is an easy solution to tell the XML editor to
use for specifc file endings only specific xsd schema files.

As far as I can see the XML Editor tries to parse the
xsi:noNamespaceSchemaLocation and generates from that the code
completion and error checking things.

Where would be a good starting point to change this behaviour without
changing the source code of wtp?

Many thanks,

Raphael
Re: XML Editor and the use of only specific validation files for certain file types [message #67143 is a reply to message #67089] Mon, 24 January 2005 12:06 Go to previous messageGo to next message
Eclipse UserFriend
Hi Raphael,

>I am wondering if there is an easy solution to tell the XML editor to
>use for specifc file endings only specific xsd schema files.

Do you mean how can you use the XML editor and validator for files with
certain extensions other than .xml?

>As far as I can see the XML Editor tries to parse the
>xsi:noNamespaceSchemaLocation and generates from that the code
>completion and error checking things.

The XML validator parses the XML document, extracts the namespaces used,
and then tries to locate schemas for the namespaces to use for validation.
Can you give me an idea of what isn't working here? An example use case
would be helpful.

>Where would be a good starting point to change this behaviour without
>changing the source code of wtp?

I need a little more information before I can answer this one.

Thanks,


Lawrence
Re: XML Editor and the use of only specific validation files for certain file types [message #67193 is a reply to message #67089] Mon, 24 January 2005 16:56 Go to previous messageGo to next message
Eclipse UserFriend
Raphael A. Bauer wrote:
> I am wondering if there is an easy solution to tell the XML editor to
> use for specifc file endings only specific xsd schema files.
>
> As far as I can see the XML Editor tries to parse the
> xsi:noNamespaceSchemaLocation and generates from that the code
> completion and error checking things.
>
> Where would be a good starting point to change this behaviour without
> changing the source code of wtp?

No, this kind of behavior would require changing/overriding the code
that's in place.

--
- Nitin
Re: XML Editor and the use of only specific validation files for certain file types [message #67331 is a reply to message #67143] Tue, 25 January 2005 04:45 Go to previous messageGo to next message
Eclipse UserFriend
Lawrence Mandel wrote:
>>I am wondering if there is an easy solution to tell the XML editor to
>>use for specifc file endings only specific xsd schema files.
>
> Do you mean how can you use the XML editor and validator for files with
> certain extensions other than .xml?
>
>>As far as I can see the XML Editor tries to parse the
>>xsi:noNamespaceSchemaLocation and generates from that the code
>>completion and error checking things.
>
> The XML validator parses the XML document, extracts the namespaces used,
> and then tries to locate schemas for the namespaces to use for validation.
> Can you give me an idea of what isn't working here? An example use case
> would be helpful.
>
>>Where would be a good starting point to change this behaviour without
>>changing the source code of wtp?
>
> I need a little more information before I can answer this one.
To explaing in detail: the xml editor of webtools opens in my case not
only xml endings but also scp and sct endings.
And I was thinking (dreaming) about a behaviour, eg a parameter I can
set in the plugin.xml of my plugin to hard-wire a xsd file to a specific
file ending (sct files always with component.xsd) and overriding the
namespaces parsed by the xml editor.

Would anybody else be interested in such a functionality or am I the
only one?

Thanks,

Raphael
Re: XML Editor and the use of only specific validation files for certain file types [message #67376 is a reply to message #67193] Tue, 25 January 2005 05:06 Go to previous messageGo to next message
Eclipse UserFriend
Nitin Dahyabhai wrote:
> Raphael A. Bauer wrote:
>
>> I am wondering if there is an easy solution to tell the XML editor to
>> use for specifc file endings only specific xsd schema files.
>>
>> As far as I can see the XML Editor tries to parse the
>> xsi:noNamespaceSchemaLocation and generates from that the code
>> completion and error checking things.
>>
>> Where would be a good starting point to change this behaviour without
>> changing the source code of wtp?
>
>
> No, this kind of behavior would require changing/overriding the code
> that's in place.
okay. But is there perhaps another easy solution to reference from an
xml file to a "static" location in the file system?

For instance I now that my xsd files are in ${eclipse-home}/. it would
be cool to have
xsi:noNamespaceSchemaLocation="${eclipse-home}/component.xsd ". So I
don't have to bother what ${eclipe-home} actually is.

The only "static" referencing I can think about right now is using
http://www.bla.com/componend.xsd what in fact works fine, but requires
an internet connection, what I don't think is too cool...

Any other ideas?

Many thanks!

Raphael
Re: XML Editor and the use of only specific validation files for certain file types [message #67723 is a reply to message #67376] Tue, 25 January 2005 18:49 Go to previous messageGo to next message
Eclipse UserFriend
Raphael A. Bauer wrote:

> The only "static" referencing I can think about right now is using
> http://www.bla.com/componend.xsd what in fact works fine, but requires
> an internet connection, what I don't think is too cool...

> Any other ideas?

> Many thanks!

> Raphael

Raphael, you can use the solution you propose above in addition to the XML
Catalog to solve this (so internet connection is required). For more info
see the tutorial here http://eclipse.org/webtools/index.html. Hope that
helps!
Re: XML Editor and the use of only specific validation files for certain file types [message #67744 is a reply to message #67723] Tue, 25 January 2005 18:54 Go to previous messageGo to next message
Eclipse UserFriend
Oops I meant to say... "so NO internet connection is required".
Re: XML Editor and the use of only specific validation files for certain file types [message #68014 is a reply to message #67723] Wed, 26 January 2005 11:55 Go to previous message
Eclipse UserFriend
Craig Salter wrote:
> Raphael A. Bauer wrote:
>
>> The only "static" referencing I can think about right now is using
>> http://www.bla.com/componend.xsd what in fact works fine, but requires
>> an internet connection, what I don't think is too cool...
....
>> For instance I now that my xsd files are in ${eclipse-home}/. it
>> would be cool to have
>> xsi:noNamespaceSchemaLocation="${eclipse-home}/component.xsd ". So I
>> don't have to bother what ${eclipe-home} actually is.

> Raphael, you can use the solution you propose above in addition to the
> XML Catalog to solve this (so internet connection is required). For
> more info see the tutorial here http://eclipse.org/webtools/index.html.
> Hope that helps!
This is a really good idea! Thanks. I'll keep that in mind.
But I just recognized that the
xsi:noNamespaceSchemaLocation evaluates as well something like:
xsi:noNamespaceSchemaLocation="platform:/base/configuration/myplugin/component.xsd ".
This is not really nice, but for the first version this will be quite
okay and flexible enough.

I am right now thinking about implementing my own Structured Source
Editor, and then the XML Catalog will certainly come into play as a
clean solution. But then there will be other questions on that (eg how
to programatically add XML Catalog Entries to the xml validator... but
this is another story :) )...

Thanks for the responses!

Raphael
Previous Topic:any progress on the flexible project structure?
Next Topic:FAQ Update
Goto Forum:
  


Current Time: Wed Jul 16 14:18:51 EDT 2025

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

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

Back to the top