Skip to main content



      Home
Home » Language IDEs » ServerTools (WTP) » XML Validation without .xml suffix
XML Validation without .xml suffix [message #81039] Mon, 07 March 2005 20:04 Go to next message
Eclipse UserFriend
Is there a simple way to tell the XML Validator to run on files that don't
have an .xml suffix?

Thanks
- Richard

P.S. It was great to meet the helpful WTP developers at EclipseCon!
Re: XML Validation without .xml suffix [message #81084 is a reply to message #81039] Mon, 07 March 2005 23:39 Go to previous messageGo to next message
Eclipse UserFriend
On Tue, 8 Mar 2005 01:04:52 +0000 (UTC), Richard Rodseth <rrodseth@mac.com> wrote:

> Is there a simple way to tell the XML Validator to run on files that don't
> have an .xml suffix?
>
> Thanks
> - Richard
>
> P.S. It was great to meet the helpful WTP developers at EclipseCon!
>

There's no "end user" way. You could "hack" the plugin.xml in the xml.validation plugin and add to its list
of recognized file extensions, if you wanted to experiment.

In future versions, we have plans to allow specifying validators by contentType, which will make it easier to
capture the right files.
Re: XML Validation without .xml suffix [message #81143 is a reply to message #81084] Tue, 08 March 2005 01:46 Go to previous messageGo to next message
Eclipse UserFriend
See bug 86385 at https://bugs.eclipse.org/bugs/show_bug.cgi?id=86385.


Lawrence
Re: XML Validation without .xml suffix [message #81185 is a reply to message #81039] Tue, 08 March 2005 04:11 Go to previous messageGo to next message
Eclipse UserFriend
Richard Rodseth wrote:
> Is there a simple way to tell the XML Validator to run on files that
> don't have an .xml suffix?
> Thanks
> - Richard
>
> P.S. It was great to meet the helpful WTP developers at EclipseCon!

In my "early" webtoools days I used this in the plugin.xml of my plugin
to tweak the file endings the XML Validation runs on.
(discussed at the webtools newsgroup with nitind at us.ibm.com as
"Problems using the org.eclipse.wst.xml.ui.StructuredTextEditorXML"-
thanks again for the support...)

<editor
name="%com.temis.scs.texteditor.editor.sct"
icon="icons/temis_icon_skillunit.gif"
extensions="sct"
contributorClass="org.eclipse.wst.xml.ui.actions.ActionContributorXML "
class="org.eclipse.wst.xml.ui.StructuredTextEditorXML"
id="org.eclipse.wst.xml.ui.StructuredTextEditorXML.SkillUnit ">
</editor>


<extension point="org.eclipse.core.runtime.contentTypes">
<file-association
content-type="org.eclipse.core.runtime.xml"
file-extensions="sct"/>
</extension>

hope this helps,

Raphael
Re: XML Validation without .xml suffix [message #81316 is a reply to message #81143] Tue, 08 March 2005 11:11 Go to previous messageGo to next message
Eclipse UserFriend
Thanks. I just cast my first vote. If it's not going to be in the next
milestone, I will need a workaround, presumably creating my own validator
that invokes the XMLValidator internal class.

- Richard

Lawrence Mandel wrote:

> See bug 86385 at https://bugs.eclipse.org/bugs/show_bug.cgi?id=86385.


> Lawrence
Re: XML Validation without .xml suffix [message #81369 is a reply to message #81039] Tue, 08 March 2005 12:57 Go to previous message
Eclipse UserFriend
Richard Rodseth wrote:
> Is there a simple way to tell the XML Validator to run on files that
> don't have an .xml suffix?
> Thanks
> - Richard
>
> P.S. It was great to meet the helpful WTP developers at EclipseCon!
>

Richard,

Each validator has filter that is used to filter files on which the
validation has to run. like

<filter
objectClass="org.eclipse.core.resources.IFile"
nameFilter="*.xml">
</filter>

If you remove this filter from the XML Validator extension implmentation
in the plugin.xml then it will run all types. You can try the above
approach for testing purposes. If you really want a XML Validator kind
validator that you want run on other files type then you can create an
custom one for yourself subclassing the base XML Validator and register
this validator custom validator on your project using an extension
definition in plugin.xml very similar to what base XML Validator does

- Vijay
Previous Topic:Using Postgresql with Database Explorer
Next Topic:Flexible Project Layout
Goto Forum:
  


Current Time: Fri Jul 25 07:54:08 EDT 2025

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

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

Back to the top