Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » ServerTools (WTP) » User specified XML parser features and xinclude
User specified XML parser features and xinclude [message #228440] Thu, 26 February 2009 21:39 Go to next message
DaSH is currently offline DaSHFriend
Messages: 2
Registered: July 2009
Junior Member
I'm using eclipse 3.4.1 & WST 3.0.2 (which uses xerces 2.9.0).

I can enable XInclude processing via eclipse preferences which is good and
works well, except in my case I need to specify additional parser features
to disable the lang and base fixup by the parser. Currently the UI only
allows enabling XInclude, and not any of these other features that Xerces
supports.

So my main question is:
Is there a way to specify additional xml parser features to be used?
If not, can I tell eclipse to use my own parser instead?

I haven't found that Xerces by itself supports specifying features from
properties (to my surprise) and I can't find any eclipse mechanism for
this either. Ideally eclipse would have a global xml parser feature set
and I could then enable project-specific parser features on. I'd even be
happy if I could at least just specify a properties file that lists parser
features and tell xerces/eclipse to use it somehow. In my RCP application
I have my own parser which defaults many xml parser features to be set the
way my application needs them to be given my schemas (e.g. enable
xinclude, don't fixup lang and base uri, etc), so in the end I'm just
trying to get eclipse to validate my xml files the same way my RCP
application does.
Re: User specified XML parser features and xinclude [message #228450 is a reply to message #228440] Thu, 26 February 2009 22:10 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: dcarver.starstandard.org

DaSH wrote:
> I'm using eclipse 3.4.1 & WST 3.0.2 (which uses xerces 2.9.0).
>
> I can enable XInclude processing via eclipse preferences which is good
> and works well, except in my case I need to specify additional parser
> features to disable the lang and base fixup by the parser. Currently
> the UI only allows enabling XInclude, and not any of these other
> features that Xerces supports.
>
> So my main question is:
> Is there a way to specify additional xml parser features to be used?
> If not, can I tell eclipse to use my own parser instead?
Currently you can't specify these additional options. Open an
enhancement request for this.

You would need to contribute your own Validator to be used. Much of
Eclipse in WTP is hardcoded to use Xerces.



>
> I haven't found that Xerces by itself supports specifying features from
> properties (to my surprise) and I can't find any eclipse mechanism for
> this either. Ideally eclipse would have a global xml parser feature set
> and I could then enable project-specific parser features on. I'd even
> be happy if I could at least just specify a properties file that lists
> parser features and tell xerces/eclipse to use it somehow. In my RCP
> application I have my own parser which defaults many xml parser features
> to be set the way my application needs them to be given my schemas (e.g.
> enable xinclude, don't fixup lang and base uri, etc), so in the end I'm
> just trying to get eclipse to validate my xml files the same way my RCP
> application does.

You might also want to look at the XInclude ant task that is included in
XSL Tools. It also leverages Xerces, and the source for it is much
easier to understand. Patches to it are encourged and welcomed.

But your best bet is to create a custom validator that uses your pacific
parser instead of the built in validator that WTP supplies.

Dave



>
Re: User specified XML parser features and xinclude [message #228458 is a reply to message #228450] Thu, 26 February 2009 22:51 Go to previous message
DaSH is currently offline DaSHFriend
Messages: 2
Registered: July 2009
Junior Member
Thanks for the info. I couldn't find any related bugs regarding XML
Validators so I submitted bug 266392: https://bugs.eclipse.org/266392
Previous Topic:Validator works with projects only?
Next Topic:JSDT - Usage in an RCP application
Goto Forum:
  


Current Time: Tue Mar 19 04:13:54 GMT 2024

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

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

Back to the top