Re: [xml-dev] Visual XML Editor Customizations
Petr Kuzel <[email protected]> Sat, 30 Nov 2002 00:14:28 +0100
| Newsgroups | gmane.comp.java.netbeans.modules.xml.devel |
|---|---|
| Organization | CollabNet Hosting |
| Message-ID | <[email protected]> |
Rich Unger wrote:
>>I have two suggestions:
>> - bind using doctype public ID instead of root element name
>
> Good one. It brings up a larger problem, which I've been mulling
> over, though. In the case where schemas are being used, there's no
> really good way to specify a document type. These documents generally
> specify a unique string for a namespace. The framework right now
> assumes that the root namespace (xmlns) is a sufficient unique
> identifier for a doctype.
Yes, grammar framework uses this simplification. Intention
was that all namespace grammars will inherit for a NamespaceSwitcher
grammar that will create GrammerEnvironments for embedded grammar
queries. Something like XSLTGrammarQuery does. So it should be
grammar responsibility to recognize such condition and proxy to
embedded one (located using the framework).
Declarative customization is much simpler. Anyone needs just
{namespace-URI,local name} -> customization mapping. Where
namespace-URI groups customizations in the same manner as
root element name (or doctype ID). e.g:
<doctype publicID="+//W3C//XHTML 1.0//EN" ns="uri:w3c:xhtml-1_0:en">
<element name="h1" iconbase="heading1"/>
</doctype>
>> - extend element text format by entry for element name
>> (so could ommit :-)) e.g. "{#element} {name}" for my file
>> customization.
>
> Another good one.
>
> I'm out of the office next week, so I probably won't get to these for
> a couple of weeks.
OK, I'll implement them.
Cc.