Looking for an example of a custom XmlSchemaProvider

OK, since my previous question is still left unanswered (I actually was able to figure it out), here's a new one :) I would like to be able to register a bunch of custom schemas within my plugin, so I'm looking for an example of a custom XmlSchemaProvider. Any examples, howto's, etc. would be very much appreciated.

 

 

0
4 comments
Avatar
Permanently deleted user

As a follow-up question, I tried to implement my own Xml schema provider and namespace helper classes, and I added them to my plugin.xml.

<xml.schemaProvider implementation="com.foo.bar.AcmeXmlSchemaProvider"/>
<xml.namespaceHelper implementation="com.foo.bar.AcmeXmlNamespaceHelper"/>

When I place a breakpoint in the namespace helper getLocation() method, I can see that the list of the XML schema providers is empty. Is there any additional step I need to take so that my schema provider is registered?

 

0

Hmm, I can't find getLocation() method in XmlNamespaceHelper.

0
Avatar
Permanently deleted user

Sorry, I meant the DefaultXmlNamespaceHelper.getLocation(). It doesn't seem like it is invoked at all. The problem I'm trying to solve is when I add the tag with undeclared prefix, I want to insert the xmlns attribute and update the psi:schemaLocation attribute. Currently the xmlns declaration is inserted automatically, but schema locations are not updated.

0

Eugene Berman, have you managed to have custom XmlNamespaceHelper working? I created and registered my XmlNamespaceHelper and it's class even not instantiated! Is XmlNamespaceHelper.getHelper() still used in the XmlPlugin?

1

Please sign in to leave a comment.