|Re: How to do custom XML partitioning? [message #230556 is a reply to message #230541]
||Tue, 21 April 2009 21:34
Originally posted by: dcarver.starstandard.org|
It's a pain to add your own XML partitioner. We had to jump through all
sorts of hoops to add a XPath partitione for XSL related items. You can
take a look at the org.eclipse.wst.xsl.ui plugin and the various XSL
Partion types there. If you can work from the DOM model to determine
where you are at and what type of content assitance to add I'd do that
If you can provide a schema or dtd to use with your xml, I'd go that
route as you will get the necessary content assistance from that.
You can also implement your own Content Assitance provider that works
off the existing XML partition types and extends the existing
functionality as well.
We ended up using a combination of these methods within the wst.xsl
component to get things working.
Dan Hoyt wrote:
> I am trying to add custom partitioning to the "stock" XML editor in a
> standalone product that repackages the Eclipse 3.3.2 platform and adds
> our own plugins.
> How exactly does this work? Does the XML partitioner automatically
> interpret XML schemas registered with a new content type? Or do I have
> to subclass the XML partitioner and code my own tags explicity? For
> that matter, is there an extension point for a custom partitioner, or do
> I need to subclass the document provider (and, by extension, the viewer)
> and load my subclassed partitioner?
> I have configured a "stock" XML editor with a custom content-type, but I
> need to adapt the DOM model to another internally-developed model. I
> can parse the completed DOM model and generate the new model, but it
> seems to me that the XML partitioner is ALREADY parsing the DOM, so I
> might be able to generate the new model in parallel during the
> Or am I way off-base with the approach? I'm open to suggestions.
> -Dan Hoyt
> Senior Systems Architect, TSC
Powered by FUDForum
. Page generated in 0.01999 seconds