Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Web Tools Project (WTP) » How to do custom XML partitioning?
How to do custom XML partitioning? [message #230541] Tue, 21 April 2009 15:31 Go to next message
Dan Hoyt is currently offline Dan Hoyt
Messages: 13
Registered: July 2009
Junior Member
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 partitioning.

Or am I way off-base with the approach? I'm open to suggestions.

-Dan Hoyt
Senior Systems Architect, TSC
Re: How to do custom XML partitioning? [message #230556 is a reply to message #230541] Tue, 21 April 2009 17:34 Go to previous message
Eclipse User
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
first.

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.

Dave

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
> partitioning.
>
> Or am I way off-base with the approach? I'm open to suggestions.
>
> -Dan Hoyt
> Senior Systems Architect, TSC
>
>
Previous Topic:JSPJavaHyperlinkDetector contains invalid attributes??
Next Topic:Add a source page viiew in Web Page Editor
Goto Forum:
  


Current Time: Thu Aug 28 09:33:13 EDT 2014

Powered by FUDForum. Page generated in 0.03277 seconds