Bug 164957 - [content model] XHTML editor to allow various content models for namespaces
Summary: [content model] XHTML editor to allow various content models for namespaces
Status: NEW
Alias: None
Product: WTP Source Editing
Classification: WebTools
Component: wst.xml (show other bugs)
Version: 1.5   Edit
Hardware: PC Windows XP
: P4 enhancement with 1 vote (vote)
Target Milestone: Future   Edit
Assignee: wst.xml CLA
QA Contact: Nick Sandonato CLA
URL:
Whiteboard:
Keywords: helpwanted
Depends on:
Blocks:
 
Reported: 2006-11-17 08:32 EST by Steven Oglesby CLA
Modified: 2013-07-18 14:17 EDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Steven Oglesby CLA 2006-11-17 08:32:59 EST
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?
Comment 1 David Williams CLA 2007-01-07 22:57:47 EST
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. 

Comment 2 Nitin Dahyabhai CLA 2007-09-20 05:40:14 EDT
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.