Community
Participate
Working Groups
Bugfix for bug 119084 allows the content model for namespaces to be retrieved from XSD docs. However, in general I think that the namespace should not have to be defined by an XSD file (I don't think XML says this is required?). Instead of passing XSD as the resourceType in the call to getCMDocument(String,String,String) in method XMLAssociationProvider.getCMElementDeclaration(Element,List,NamespaceTable) I think that no resourceType should be specified. This would then allow the CMDocumentManager to sort out building the content model based on the actual file associated with the namespace. I am looking into this as part of adding support for the editing of Facelets XHTML files by writing a content model for the Facelet *.taglib.xml files. Of course this also depends on the use of the contentModel extension point (which is not a public API, but I am hopong it will be at some point) As an additional note, perhaps the registering and lookup of content models (in ContentModelManager.createCMDocument(String,String) should work using contentTypes rather than just the filename extension. I think this would allow better lookup?
These are all correct ideas. Not sure how much progress we'll make in 2.0 release on this, but feel free to submit patches/unit tests, etc., and we will make progress.
Targetting 3.0, but for further investigation. We haven't had any other requests for facelet (?) support, but it makes sense to me that XHTML would support namespaces properly. Steven, I think you're on to something about the ContentModelManager, but it seems to want the filename extension of the file where the grammar is stored, not of the resource referencing it. Content Types in that case would be very difficult to leverage.