Bug 115467 - wst.html does not allow supor for custom tags
Summary: wst.html does not allow supor for custom tags
Status: RESOLVED DUPLICATE of bug 157407
Alias: None
Product: WTP Source Editing
Classification: WebTools
Component: wst.html (show other bugs)
Version: 0.7   Edit
Hardware: Macintosh All
: P2 normal (vote)
Target Milestone: 2.0 M6   Edit
Assignee: David Williams CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-11-08 07:56 EST by Mike Schrag CLA
Modified: 2007-03-08 18:46 EST (History)
2 users (show)

See Also:


Attachments
support for custom HTML tags (34.48 KB, patch)
2005-11-08 08:01 EST, Mike Schrag CLA
no flags Details | Diff
example code for adding a WebObject tag (3.94 KB, application/octet-stream)
2005-11-08 10:04 EST, Mike Schrag CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mike Schrag CLA 2005-11-08 07:56:19 EST
Currently the necessary API's for adding custom tags are not public.  As an example, Apple's WebObjects 
has <webobject> tags in its HTML templates, but most of the API's that need to be hooked into are either 
private or final.  The attached patch for 0.7 makes a series of fairly minor modifications to allow hooking 
into the html parser to add custom tags.
Comment 1 Mike Schrag CLA 2005-11-08 08:01:12 EST
Created attachment 29525 [details]
support for custom HTML tags
Comment 2 David Williams CLA 2005-11-08 09:48:42 EST
I'll take a look to see if we can include for 1.0. 
(Off hand, though, its likely we'd still java doc as "not API" 
as I haven't looked at whole content model picture for a while. 
... that is, haven't formed long term planned). 

But, btw, are all these "api like" changes just for external clients 
to add one tag (webobject) and its attributes? ... or is there a family 
of "webobject elements"? 

Comment 3 Mike Schrag CLA 2005-11-08 10:02:16 EST
Not ALL of the changes were strictly required to add a <webobject> tag, actually.  There were several 
classes that needed to be made public and non-final and I went ahead and made all the similar classes 
public and non-final as well mostly to keep things consistent (and I figured others might want to hook 
into those later even though I personally didn't just for this).  Some things only needed to be made public 
so I could implement a method that returns something of that type, some things needed to be public so 
that I could extend them.  It was kind of a mixed bag of changes -- all of them pretty minor though.

I'll attach the source for what I had to implement in our code to actually add the tag since that might be a 
good example of why I needed to do some of the things I did.
Comment 4 Mike Schrag CLA 2005-11-08 10:04:56 EST
Created attachment 29542 [details]
example code for adding a WebObject tag

<webobject> can basically appear anywhere, so this code hooks into all the
CTD's and adds in support for them to contain a <webobject> tag.  The only code
that's not included is the initialization code that bootstraps this in our
plugin:

    CMNamespaceImpl h40ns = new CMNamespaceImpl(HTML40Namespace.HTML40_URI,
HTML40Namespace.HTML40_TAG_PREFIX);
    WebObjectsHCMDocImpl webobjectHtml40doc = new
WebObjectsHCMDocImpl(CMDocType.HTML_DOC_TYPE, h40ns);
    HTMLCMDocumentFactory.addCMDocument(CMDocType.HTML_DOC_TYPE,
webobjectHtml40doc);
    ComplexTypeDefinitionFactory.setInstance(new
WebObjectsComplexTypeDefinitionFactory());
Comment 5 Amy Wu CLA 2007-03-08 18:46:17 EST
I'm going to resolve this bug as a duplicate of bug 157407.  Even though bug 157407, it already has more votes than this bug, so please feel free to shift your votes from this bug to bug 157407.

*** This bug has been marked as a duplicate of bug 157407 ***