|
Re: User specified XML parser features and xinclude [message #228450 is a reply to message #228440] |
Thu, 26 February 2009 22:10 |
Eclipse User |
|
|
|
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
>
|
|
|
|
Powered by
FUDForum. Page generated in 0.02048 seconds