Home » Language IDEs » ServerTools (WTP) » XML editor with source and GUI
XML editor with source and GUI [message #100178] |
Fri, 06 May 2005 11:21  |
Eclipse User |
|
|
|
Hi,
I'm joining the fun crowd who tries to create a rich(er) XML editor on
top of webtools. This time for Mozilla's XUL.
To give a rough idea, I want a GUI almost wysiwyg editor along with the
XML source editor provided by wst. Which is actually pretty good, really.
Things that I need include:
I need to lock down the schema for *.xul, despite of whatever the
DOCTYPE says. We use that to include locale strings, and those DTDs are
useless for validation. This one if more of a bonus, so that I can edit
existing XUL. One can fix it with changes to the XUL source, though.
I need to add elements/attributes to the source, with good indention and
such, while preserving the original text as far as possible (in terms of
CVS diff).
I would like to know which attributes and/or child text nodes are of my
xsd:string subtype for l10n purposes.
I need to hook up my own URIResolver, to cover our chrome:// protocol
and hook up existing DTDs from our toolkit.
I tried to read the schema editor, assuming that it is pretty close, but
I'm kinda lost still.
What is the actual content model that I could just get from the XML? Can
I augment that, would I need that?
The source is almost like mozilla code, moving interfaces without docs,
labelled internal and provisional. I should feel at home. It's just that
I don't. ;-)
Thanks
Axel
|
|
|
Re: XML editor with source and GUI [message #105418 is a reply to message #100178] |
Thu, 19 May 2005 02:53   |
Eclipse User |
|
|
|
Axel,
Welcome to the club. It sounds like you've got a fairly good idea of what
you're doing.
> I need to hook up my own URIResolver, to cover our chrome:// protocol
> and hook up existing DTDs from our toolkit.
You'll probably want to register your DTDs in the XML catalog and package
them in your plugin. You can probably figure this out by reading some of
the other plugins (see the 'org.wsdl' plugin).
> I tried to read the schema editor, assuming that it is pretty close, but
> I'm kinda lost still.
Well we can probably help you out there if you've got specific questions.
As a starting point I'd get familiar with the GEF project. The schema
editor is rather complex since it uses the XML editor, EMF (for modelling)
and GEF.
> What is the actual content model that I could just get from the XML? Can
> I augment that, would I need that?
If you've got DTDs then you'll get a content model that's based on those
DTD's. I've recently added 'experimental' extension points to help folks
programatically augment their DTDs or Schemas (see
https://bugs.eclipse.org/bugs/show_bug.cgi?id=95336 for more info). It's
fairly limited but it handles most of the 'augmentation' that we currently
need.
> The source is almost like mozilla code, moving interfaces without docs,
> labelled internal and provisional. I should feel at home. It's just that
> I don't. ;-)
Please, make yourself at home. Fix a few bugs and clean up some code for
us! If you've got some specific questions about the schema editor feel
free to post 'em here.
Good luck with your XUL editor and thanks for your interest!
craig
|
|
|
Re: XML editor with source and GUI [message #105645 is a reply to message #105418] |
Thu, 19 May 2005 11:27  |
Eclipse User |
|
|
|
Craig Salter wrote:
> Axel,
>
> Welcome to the club. It sounds like you've got a fairly good idea of
> what you're doing.
>
>> I need to hook up my own URIResolver, to cover our chrome:// protocol
>> and hook up existing DTDs from our toolkit.
>
>
> You'll probably want to register your DTDs in the XML catalog and
> package them in your plugin. You can probably figure this out by
> reading some of the other plugins (see the 'org.wsdl' plugin).
>
>> I tried to read the schema editor, assuming that it is pretty close,
>> but I'm kinda lost still.
>
>
> Well we can probably help you out there if you've got specific
> questions. As a starting point I'd get familiar with the GEF project.
> The schema editor is rather complex since it uses the XML editor, EMF
> (for modelling) and GEF.
>
>> What is the actual content model that I could just get from the XML?
>> Can I augment that, would I need that?
>
>
> If you've got DTDs then you'll get a content model that's based on those
> DTD's. I've recently added 'experimental' extension points to help
> folks programatically augment their DTDs or Schemas (see
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=95336 for more info). It's
> fairly limited but it handles most of the 'augmentation' that we
> currently need.
>
>> The source is almost like mozilla code, moving interfaces without
>> docs, labelled internal and provisional. I should feel at home. It's
>> just that I don't. ;-)
>
> Please, make yourself at home. Fix a few bugs and clean up some code
> for us! If you've got some specific questions about the schema editor
> feel free to post 'em here.
Hihi, that's what we say to all those whiners, too :-).
Actually, you already helped me on specific problems, and I found a few
useful hooks in the source as well, so I know the model, I get schema
data types, I got the schema up and it is associated with xul via
content type and other nice feats. Once I'm done with XTech (I'll talk
about Mozilla RDF there), I'll check out GEF.
> Good luck with your XUL editor and thanks for your interest!
Thanks for providing an infrastructure, where I have hardly anything to
do to get up to http://solid.mozdev.org/screenshots.html :-).
Oh, right, I have one real question.
Say, I have <label>foo</label> or <label>&some.ent;</label> and label is
defined to be
<element name="label">
<complexType>
<simpleContent>
<extension base="xul:l10nstring">
<attribute name="value" type="xul:l10nstring"></attribute>
</extension>
</simpleContent>
</complexType>
</element>
I got as far as getting the type name for the value attr (though not the
qualifier :-/) with
CMNamedNodeMap attributes = tmp.getAttributes();
CMAttributeDeclaration attrDecl =
(CMAttributeDeclaration)attributes.getNamedItem("title");
CMDataType tpa = attrDecl.getAttrType();
System.err.println("title type:" + tpa.getDataTypeName());
(I'm stealing stuff from XMLTagInfoHoverProcessor :-) ).
But how would I get for the "foo" and the "&some.ent;" above, if they're
l10nstring or string? Hrm. The Hover even gives me datatype string for
label :-/.
Axel
PS: If someone schema-savvy has an idea on how to make label either have
a value attribute *or* a text child, I'd be thankful for that hint.
|
|
|
Goto Forum:
Current Time: Thu Sep 18 16:01:21 EDT 2025
Powered by FUDForum. Page generated in 0.03139 seconds
|