Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [wtp-dev] replacing the default xml model handler

Lars,
This would probably be best answered within the newsgroups.

A cleaner approach would still begin with a custom model handler and model 
loader.  The model loader would then replace the default ModelQueryAdapter 
adapter factory with one of your own that creates a ModelQuery instance 
combining a SimpleAssociationProvider with a ModelQueryCMProvider 
defaulting to whichever CMDocument you favor in the 
ModelQueryCMProvider.getCorrespondingCMDocument(Node) method.  The 
ModelQueryCMProvider could then vary its behavior based on the content 
type of the model.  This approach was used to provide the content model 
for JSP Tag files, a content type that extends the existing JSP content 
type.  The DOM document shouldn't be modified since changing the 
Document.getDoctype() results violates the interface's contract.  Also, 
there's no telling if your users might still want to specify a specific 
DTD or XML Schema to use--ignoring it altogether wouldn't leave a good 
impression.

All of this is still internal, of course, and subject to change.

---
Nitin Dahyabhai
Structured Source Editing



Back to the top